Closed Bug 1486716 Opened 6 years ago Closed 6 years ago

Replace bug 1486166's URL bar tooltip workaround

Categories

(Firefox :: Address Bar, task, P3)

task

Tracking

()

RESOLVED FIXED
Firefox 64
Tracking Status
firefox64 --- fixed

People

(Reporter: emilio, Assigned: bdahl)

References

Details

Attachments

(1 file)

See bug 1486166 for example, which used the tooltiptext attribute. I couldn't make it use title and instead I had to resort of setting the attribute on the parent box.
Blocks: war-on-xbl
Thanks for filing. I've noticed another problem with tooltips with XUL elements in HTML documents when fixing tests for browser.xhtml:

1) mk_add_options 'export MOZ_BROWSER_XHTML=1'
2) `./mach run` then hover over a tab title, or back button, or whatever

A small tooltip bubble pops up, but no text is inside of it. Do you think that's the same root cause as this bug or something different?
Flags: needinfo?(emilio)
Sounds likely. I'm not the most familiar with the whole setup, but there's:

  https://searchfox.org/mozilla-central/rev/55da592d85c2baf8d8818010c41d9738c97013d2/xpfe/appshell/nsXULWindow.cpp#1140

The setup as far as I can tell is that XUL elements use nsXULTooltipListener, and HTML documents end up creating a ChromeTooltipListener. I don't know how they'd interact both together, probably we should try to unify them?
Flags: needinfo?(emilio)
Priority: -- → P3
Adding the tooltip "aHTMLTooltip" to the parent XUL element causes an
nsXULTooltipListener to be added the XUL element. The "aHTMLTooltip" has
the page attribute set, so when the popup is shown the tooltip binding
will fill the tooltip text from the HTML element's title attribute.

MozReview-Commit-ID: KumhzLTTg3b
Emilio, I'm not sure this is really better, but it works. The real underlying issue is that we handle HTML and XUL tooltips very differently. For XUL, the XUL element itself is responsible for adding event listeners to show the tooltip. Whereas for HTML, there is one event listener overall that then get's the tooltip text from the element the mouse is over. The one listener is either a special "page" XUL tooltip around the content or a ChromeTooltipListener in the child process.
Comment on attachment 9007334 [details]
Bug 1486716 - Use a page tooltip for the url bar. r=emilio

Dão Gottwald [::dao] has approved the revision.
Attachment #9007334 - Flags: review+
Pushed by bdahl@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3d6dcf35e8f4
Use a page tooltip for the url bar. r=dao
Assignee: nobody → bdahl
https://hg.mozilla.org/mozilla-central/rev/3d6dcf35e8f4
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Component: DOM → Address Bar
Product: Core → Firefox
Summary: The title attribute doesn't work on HTML elements on chrome documents. → Replace bug 1486166's URL bar tooltip workaround
Target Milestone: mozilla64 → Firefox 64
Type: defect → task
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: