Closed Bug 1442600 Opened 4 years ago Closed 1 month ago

CSS Grid highlighter doesn't work in the browser toolbox, even when selecting an HTML document as target

Categories

(DevTools :: Inspector, defect, P3)

defect

Tracking

(firefox101 fixed)

RESOLVED FIXED
101 Branch
Tracking Status
firefox101 --- fixed

People

(Reporter: pbro, Assigned: nchevobbe)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Steps to reproduce:
- open the inspector in any browser tab, switch to the fonts sidebar panel
- now open the browser console (BC)
- in the toolbar of the BC, use the "select an iframe" button to switch to the inspector.xhtml iframe
- still in the BC, switch to the Layout sidebar panel of the inspector
- you should now see a list of grid layouts that have been detected in the document
- click on the checkbox for any of them

==> Expected: the grid highlighter appears inside the font panel of the "normal" toolbox (the one in the browser tab)
==> Actual: it doesn't.

I believe that it does appear somewhere but offscreen. This might just be an offset problem. At some stage, I was able to see it, way down and to the right somehow.
Product: Firefox → DevTools

(Note that browser console/BC in comment 0 should be Browser Toolbox/BT)

I can still reproduce this.
We're hitting this line: https://searchfox.org/mozilla-central/rev/22a9cf9388cefa244ea2558efa748ce17a38d607/devtools/client/fronts/inspector.js#157-160 , which is a result of https://searchfox.org/mozilla-central/rev/22a9cf9388cefa244ea2558efa748ce17a38d607/devtools/server/actors/highlighters.js#87-89
Simply removing https://searchfox.org/mozilla-central/rev/22a9cf9388cefa244ea2558efa748ce17a38d607/devtools/server/actors/highlighters.js#72-76 makes the grid highlighter (and the flex one) just fine.

In order to fix this bug, we could in a first time just add a XULSupported getter like in other highlighters (e.g. https://searchfox.org/mozilla-central/rev/22a9cf9388cefa244ea2558efa748ce17a38d607/devtools/server/actors/highlighters/accessible.js#97-99). It would be nice to see if we still have the limitation around XUL window, and see if we can simply remove the condition

I wasn't able to retrieve the original STR this condition was preventing, but
removing it and using various highlighters (box model, flex, grid, …) in the browser
toolbox, targetting various documents, I didnt' see any error.
Most importantly, it allowed to show highlighters where it wasn't possible before
(e.g. grid highlighter for webconsole document).
TRY don't show any breakage either.

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c675dbfff651
[devtools] Remove disabled scroll frames document condition in isXUL. r=ochameau
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 101 Branch
Regressions: 1768208
Regressions: 1768209
You need to log in before you can comment on or make changes to this bug.