Closed Bug 1441535 Opened 6 years ago Closed 6 years ago

Figure out what devtools wants document.getAnonymousNodes to do wrt shadow DOM.

Categories

(DevTools :: General, enhancement, P3)

enhancement

Tracking

(firefox63 fixed)

RESOLVED FIXED
Firefox 63
Tracking Status
firefox63 --- fixed

People

(Reporter: emilio, Assigned: jdescottes)

References

Details

Attachments

(1 file)

Bug 1425759 makes nsIDocument::GetAnonymousNodes not return Shadow DOM nodes, since they're not part of the XBL stuff.

I haven't fixed right away because ideally we wouldn't mix the concepts, but I can keep working as it was if you want.

There's a todo_is about the children of a shadow host in getChildren not returning them.
Julian, any opinion on this since you're working on bug 1053898?
Flags: needinfo?(jdescottes)
This makes getChildren not get the children of the shadow host. My point is that you can check whether the node is a shadow host anyway explicitly, instead of relying on getAnonymousNodes.
Thanks for the ping. This should not have a big impact on our implementation. 

The only two sites relying on this are:
- https://searchfox.org/mozilla-central/rev/14d933246211b02f5be21d2e730a57cf087c6606/devtools/shared/layout/utils.js#558
  which already special cases shadowdom right before calling getAnonymous
- https://searchfox.org/mozilla-central/rev/14d933246211b02f5be21d2e730a57cf087c6606/devtools/server/actors/inspector/node.js#189-190
  this one needs updating, and it's most likely why browser_markup_anonymous_03.js needed to be disabled in the parent bug

I'll fix it either in this bug or in bug 1053898.
Assignee: nobody → jdescottes
Severity: normal → enhancement
Status: NEW → ASSIGNED
Flags: needinfo?(jdescottes)
Priority: -- → P3
(In reply to Julian Descottes [:jdescottes][:julian] from comment #3)
> Thanks for the ping. This should not have a big impact on our
> implementation. 
> 
> The only two sites relying on this are:
> -
> https://searchfox.org/mozilla-central/rev/
> 14d933246211b02f5be21d2e730a57cf087c6606/devtools/shared/layout/utils.js#558
>   which already special cases shadowdom right before calling getAnonymous

Actually that special-case can go now, nice :)

> https://searchfox.org/mozilla-central/rev/
> 14d933246211b02f5be21d2e730a57cf087c6606/devtools/server/actors/inspector/
> node.js#189-190
>   this one needs updating, and it's most likely why
> browser_markup_anonymous_03.js needed to be disabled in the parent bug

Right.
 
> I'll fix it either in this bug or in bug 1053898.

Thanks a lot!
Product: Firefox → DevTools
Comment on attachment 8994514 [details]
Bug 1441535 - Remove unnecessary shadowdom check in isXBLAnonymous;

https://reviewboard.mozilla.org/r/259062/#review266094

Thanks
Attachment #8994514 - Flags: review?(bgrinstead) → review+
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/26cf4424046e
Remove unnecessary shadowdom check in isXBLAnonymous;r=bgrins
https://hg.mozilla.org/mozilla-central/rev/26cf4424046e
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: