Closed
Bug 93839
Opened 23 years ago
Closed 23 years ago
tooltiptext="" should work on all elements without specifying tooltip=""
Categories
(Core :: XUL, defect)
Tracking
()
RESOLVED
FIXED
mozilla0.9.7
People
(Reporter: hyatt, Assigned: hewitt)
References
Details
(Keywords: access, Whiteboard: [xul1.0-widgets])
Attachments
(2 files, 1 obsolete file)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
mikepinkerton
:
review+
|
Details | Diff | Splinter Review |
tooltiptext="" should use an anonymous tooltip, so that the tooltip itself
needn't be specified.
Reporter | ||
Updated•23 years ago
|
Comment 1•23 years ago
|
||
I assume that this would take some sort of default tooltip look, like a yellow
background with black text?
Comment 2•23 years ago
|
||
... and multiline tooltips!
See:
http://bugzilla.mozilla.org/show_bug.cgi?id=57599
Comment 3•23 years ago
|
||
Wouldn't you be able to do multiline tooltips with <description>?
Reporter | ||
Comment 4•23 years ago
|
||
Yes, when I'm done, all tooltips will be multi-line by default.
Reporter | ||
Updated•23 years ago
|
Whiteboard: [xul1.0-widgets]
Updated•23 years ago
|
Reporter | ||
Updated•23 years ago
|
Target Milestone: mozilla0.9.5 → mozilla0.9.6
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Target Milestone: mozilla0.9.6 → mozilla0.9.8
Assignee | ||
Updated•23 years ago
|
Target Milestone: mozilla0.9.8 → mozilla0.9.7
Assignee | ||
Comment 8•23 years ago
|
||
Ok, so here's what I have done here. I am moving all of the tooltip listening
stuff out of nsXULPopupListener and into layout. nsXULPopupListener will now
only worry about popup and context popup types.
I'm creating an anonymous tooltip element in nsDocElementBoxFrame, and storing
a reference to it in nsRootBoxFrame. Whenever a xul frame is created for an
element that wants a tooltip, nsRootBoxFrame will create a tooltip listener for
it and send it on its merry way.
This anonymous tooltip will be used for all elements that only have tooltiptext
specified on them. tooltip="..." is still supported, of course. The default
tooltip can be overriden by the user by placing a <tooltip default="true"/> in
their document.
There is also some special handling to support tooltips in outliners. As you
hover over each cell in the outlinerbody the tooltip will change. You can
determine which cell the mouse is over using the mouse coordinates from
onpopupshow* events and outlinerBoxObject.getCellAt (see bug 112286).
Assignee | ||
Comment 9•23 years ago
|
||
Reporter | ||
Comment 10•23 years ago
|
||
sr=hyatt
+ if (aModType == 3) // removal
+ rootBox->RemoveTooltipSupport(aContent);
+ if (aModType == 2) // addition
+ rootBox->AddTooltipSupport(aContent);
Ick. Use the real constants here, not hardcoded numbers.
Also, my sr is conditional on you running the leak tests to make sure this
doesn't leak.
Assignee | ||
Comment 11•23 years ago
|
||
I ran the leak log and there were no extra leaks with this patch turned on. I
tested created and destroying a bunch of xul documents and showing a variety of
tooltips.
Comment 12•23 years ago
|
||
a few things:
1) could you step through in the debugger to make sure that the dtor for
nsXULTooltipListener is actually getting called? Just being paranoid.
2) I'm not familiar with nsDocElementBoxFrame. We're creating tooltip node for
every one of these, regardless? Doesn't that sound a bit wasteful? How many of
these are there in, say, the navigator window?
3) Check that the TITLE attribute still works (just a reminder, i'm sure it does).
Assignee | ||
Comment 13•23 years ago
|
||
1). Yes, the destructor is called when the tooltip source content goes away.
2). There is only one nsDocElementBoxFrame per XUL window, so, there will only
be one tooltip content instance created for the navigator window, or 2 if you
have the sidebar open with a xul page visible.
3). Yes, the title attribute still works in html pages.
Comment 14•23 years ago
|
||
This hasn't been checked in yet has it?
Assignee | ||
Comment 15•23 years ago
|
||
I had implemented titletips in xbl/js a long time ago, but never really liked
doing it that way. This new version of the patch rolls titletip support into
the C++ tooltip listener, which is a much cleaner way to do it.
Also, I moved that 21px top offset we had hard-coded in C++ and moved it into
CSS as a margin.
Attachment #59676 -
Attachment is obsolete: true
Comment 16•23 years ago
|
||
Comment on attachment 60146 [details] [diff] [review]
new patch with titletip support
r=pink, looking good
Attachment #60146 -
Flags: review+
Assignee | ||
Comment 17•23 years ago
|
||
fixed
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
Comment 18•6 years ago
|
||
Keywords: sec508
You need to log in
before you can comment on or make changes to this bug.
Description
•