Replace bug 1486166's URL bar tooltip workaround

RESOLVED FIXED in Firefox 64

Status

()

defect
P3
normal
RESOLVED FIXED
8 months ago
7 months ago

People

(Reporter: emilio, Assigned: bdahl)

Tracking

(Blocks 1 bug)

unspecified
Firefox 64
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox64 fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

8 months ago
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.
(Reporter)

Updated

8 months ago
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)
(Reporter)

Comment 2

8 months ago
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)
See Also: → 1461798
Priority: -- → P3
(Assignee)

Comment 3

8 months ago
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
(Assignee)

Comment 4

8 months ago
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+

Comment 6

8 months ago
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

Comment 7

7 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/3d6dcf35e8f4
Status: NEW → RESOLVED
Last Resolved: 7 months 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
You need to log in before you can comment on or make changes to this bug.