Closed Bug 1611099 Opened 6 years ago Closed 6 years ago

The tooltip is no longer shown when hovering over a stylesheet URL in the Browser Toolbox rule-view

Categories

(DevTools :: Inspector: Rules, defect)

defect
Not set
normal

Tracking

(firefox-esr68 unaffected, firefox72 unaffected, firefox73- unaffected, firefox74- fixed)

RESOLVED FIXED
Firefox 74
Tracking Status
firefox-esr68 --- unaffected
firefox72 --- unaffected
firefox73 - unaffected
firefox74 - fixed

People

(Reporter: Paenglab, Assigned: jdescottes)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Open Inspector and inspect a node. On the right in the rules tab the different CSS files with the applying rules are shown. Hovering the file name showed the file path. Now nothing is shown. I can't say since when.

Thanks for filing Richard. In order to investigate, we'll need a few more information: what operating system are you on? What version of Firefox did this happen on? Also, if you can provide a screenshot or a screen video recording of the bug in action, that'd be super useful.

Flags: needinfo?(richard.marti)

Screenshot showing the working tooltip when inspecting the content. When I inspect the browsers chrome with the Browser Toolbox then the tooltips are no more shown.

I tried also inspecting the content with the toolbox detached in its own window. Then the tooltips are still work.

I see this on Linux, Mac and Windows with Nightly.

Flags: needinfo?(richard.marti)

Thanks Richard. So this only happens in the Browser Toolbox. I was able to reproduce. This is a regression. Adjusting the title to make it more self-explanatory.

Component: Inspector → Inspector: Rules
Keywords: regression
Summary: Path no more shown in tooltip when hovering over the CCS file in Rules tab → The tooltip is no longer shown when hovering over a stylesheet URL in the Browser Toolbox rule-view

I found the regression:

Last good revision: a2c5a0150d9f5d29524dec420d2e4e9a3ecf8b83
First bad revision: ad5d17f68cde6b8cc3d74a528a2094412dce2b6f
Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=a2c5a0150d9f5d29524dec420d2e4e9a3ecf8b83&tochange=ad5d17f68cde6b8cc3d74a528a2094412dce2b6f

So, bug 1604491 (which landed in 74) is the culprit here.

[Tracking Requested - why for this release]: This is a regression in 74. 73 is unaffected. It would be good to get a fix in 74, but this isn't a blocker either. The problem is only in devtools and only in the browser toolbox.

Has Regression Range: --- → yes

Julian, do you have any idea how bug 1604491 could have caused this regression? I think what makes links links in the rule-view is the sourceMapURLService in devtools/client/inspector/rules/views/rule-editor.js (the function _updateLocation is what does it). Does that spark any idea?

Flags: needinfo?(jdescottes)
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED

Thanks for the heads up! It's actually impacting all title tooltips.

When we simplified the BrowserToolbox host creation, we tried to reuse the code already existing to create the devtools <frame> (previously the <frame> element for the BrowserToolbox was defined in the markup of the BrowserToolbox document).

The current code is:

function createDevToolsFrame(doc, className) {
  const frame = doc.createXULElement("browser");
  frame.setAttribute("type", "content");
  frame.flex = 1; // Required to be able to shrink when the window shrinks
  frame.className = className;
  frame.tooltip = "aHTMLTooltip";
  return frame;
}

Turns out that setting frame.tooltip = "aHTMLTooltip"; prevents the tooltips from working in the BrowserToolbox. This attribute is normally useful for toolboxes created in XUL documents, because they need to use a dedicated XUL <tooltip> element to handle HTML tooltips. But the Browser Toolbox is loaded in a HTML document and not in a XUL document. There is no <tooltip id="aHTMLTooltip"> available there, and simply adding this attribute probably tricks Firefox into trying to find this aHTMLTooltip to handle tooltips.

Only setting the attribute when loading the toolbox in XUL documents seems to fix the issue.

Flags: needinfo?(jdescottes)
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c37b67472bbf Do not set frame.tooltip when creating the devtools BrowserToolbox frame r=pbro
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 74

No need to track as this was broken and fixed during the 74 nightly cycle, thanks for pinging relman!

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: