Closed Bug 1834249 Opened 3 years ago Closed 10 months ago

Grids in shadow dom are not listed in the "Grid" section

Categories

(DevTools :: Inspector: Layout, defect, P3)

defect

Tracking

(firefox142 verified, firefox143 verified)

VERIFIED FIXED
142 Branch
Tracking Status
firefox142 --- verified
firefox143 --- verified

People

(Reporter: nchevobbe, Assigned: nchevobbe)

Details

Attachments

(3 files)

Steps to reproduce

  1. Open the attached shadow-grid.html page
  2. Open the inspector
  3. Select the Layout panel

Expected results

There should be an element in the "Grid" section

Actual results

There is none

Severity: -- → S3
Priority: -- → P3
Attached file shadow-grid.html

It looks like this should be handled in Element::GetElementsWithGrid (https://searchfox.org/mozilla-central/rev/b63f8c50a3398aff80d2a5f185a90dcdba47f419/dom/base/Element.cpp#2127-2154).
Emilio, would it be hard to go through the shadow dom there?

Flags: needinfo?(emilio)

No, you probably want to use StyleChildrenIterator or FlattenedTreeIterator depending on whether you care about pseudo elements or not.

Flags: needinfo?(emilio)
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Pushed by nchevobbe@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/6ac0eaec09eb https://hg.mozilla.org/integration/autoland/rev/709374377209 [devtools] Return shadow DOM grid containers in Element::GetElementsWithGrid. r=emilio. https://github.com/mozilla-firefox/firefox/commit/6da43d86ae25 https://hg.mozilla.org/integration/autoland/rev/9f8e2731b18a [devtools] Add test for pseudo-element and shadow DOM grid containers. r=devtools-reviewers,jdescottes.
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 142 Branch
QA Whiteboard: [qa-triage-done-c143/b142][qa-ver-opt-c143/b142]
QA Contact: oardelean

Issue is reproducible on a 2025-07-14 Firefox Nightly build on Windows 10.
Verified as fixed on Firefox Nightly 143.0a1 and Firefox 142.0b4 on Windows 10, Ubuntu 22, macOS 15.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triage-done-c143/b142][qa-ver-opt-c143/b142] → [qa-triage-done-c143/b142][qa-ver-done-c143/b142]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: