Closed Bug 1473902 Opened 6 years ago Closed 6 years ago

Wrong number in "more nodes" button in shadow root

Categories

(DevTools :: Inspector, defect, P3)

defect

Tracking

(firefox63 verified)

VERIFIED FIXED
Firefox 63
Tracking Status
firefox63 --- verified

People

(Reporter: jdescottes, Assigned: ladybenko)

References

Details

Attachments

(1 file)

STRs:
- go to https://juliandescottes.github.io/webcomponents-playground/test-too-many-light-dom/
- expand: body > test-component > slot
- scroll down to the first "more nodes" button

ER: Button should read "Show all 200 nodes"
AR: Button reads "Show one more node"
Assignee: nobody → balbeza
Status: NEW → ASSIGNED
Comment on attachment 8994861 [details]
Bug 1473902 - Wrong node count in 'show all nodes' button.

https://reviewboard.mozilla.org/r/259400/#review266582

Great find! Thanks for fixing this and adding a test.

::: devtools/server/actors/inspector/node.js:207
(Diff revision 1)
>      }
>  
>      // Normal counting misses ::before/::after.  Also, some anonymous children
>      // may ultimately be skipped, so we have to consult with the walker.
> -    if (numChildren === 0 || hasAnonChildren || isShadowHost(this.rawNode)) {
> +    if (numChildren === 0 || hasAnonChildren || isShadowHost(this.rawNode) ||
> +      isShadowAnonymous(this.rawNode)) {

I guess in theory we only need to check that for <slot> elements, but we can revisit in case we see a performance issue here.
Attachment #8994861 - Flags: review?(jdescottes) → review+
Pushed by balbeza@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/596379b80471
Wrong node count in 'show all nodes' button. r=jdescottes
https://hg.mozilla.org/mozilla-central/rev/596379b80471
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
Flags: qe-verify+
Flags: needinfo?(timea.zsoldos)
I have reproduced this issue using Firefox 62.0a1 (2018.07.06) on Windows 10 x64.
I can confirm this issue is fixed, I verified using Firefox 63.0b3 on Ubuntu 16.04 x64, Windows 10 x64 and Mac OS X 10.13.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
Flags: needinfo?(timea.zsoldos)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: