Closed
Bug 1483660
Opened 6 years ago
Closed 6 years ago
Annotate UA Widget Shadow Root in DevTools Inspector
Categories
(DevTools :: Inspector, enhancement, P2)
DevTools
Inspector
Tracking
(firefox65 fixed)
RESOLVED
FIXED
Firefox 65
Tracking | Status | |
---|---|---|
firefox65 | --- | fixed |
People
(Reporter: timdream, Assigned: jdescottes)
References
(Blocks 3 open bugs)
Details
Attachments
(4 files)
Inspector currently considers UA Widget Shadow Root as normal, closed, Shadow Root. It's probably less confusing to the developers if 1) It's hidden behind a pref like devtools.inspector.showAllAnonymousContent 2) It is marked as "UA Shadow Root" or "UA Widget" or "generated" when shown. We don't do (2) even for XBL anonymous content and native anonymous content though.
Comment 1•6 years ago
|
||
Agreed with (1) - we should hide this for most users.
Blocks: devtools-webcomponents
Comment 2•6 years ago
|
||
Once Bug 1431255 lands, this should be visible with `data:text/html,<video controls />`
I agree with (1) too, possibly calling the pref something like `devtools.inspector.showUserAgentShadowRoots` or something.
Updated•6 years ago
|
Priority: -- → P3
Assignee | ||
Comment 4•6 years ago
|
||
Chrome has a DevTools preference for this, and when enabled they show them as "#shadow-root (user agent)". I don't think we need to expose this in our Settings panel here. As additional information, the shadowdom UA widgets are currently disabled even though Bug 1431255 landed. You need to flip dom.ua_widget.enabled to true to enable them. The pref will be flipped to true for NIGHTLY in https://bugzilla.mozilla.org/show_bug.cgi?id=1484048 As long as it is Nightly-only I don't think we _have_ to fix it for 63, but nevertheless we should address this soon.
Assignee | ||
Comment 5•6 years ago
|
||
Tim: can you confirm there is no plan to turn on dom.ua_widget.enabled on beta and release in 63?
Flags: needinfo?(timdream)
Reporter | ||
Comment 6•6 years ago
|
||
(In reply to Julian Descottes [:jdescottes][:julian] from comment #5) > Tim: can you confirm there is no plan to turn on dom.ua_widget.enabled on > beta and release in 63? No. I am hoping to enable it on Nightly 64.
Flags: needinfo?(timdream)
Updated•6 years ago
|
Priority: P3 → P2
Assignee | ||
Comment 7•6 years ago
|
||
Is there a way to differentiate a regular closed shadow root from a user-agent shadowroot?
Flags: needinfo?(timdream)
Reporter | ||
Comment 8•6 years ago
|
||
I didn't expose the getter to JS, just the setter. It should be easy to expose a method on ShadowRoot and have it return ShadowRoot#mIsUAWidget.
Flags: needinfo?(timdream)
Reporter | ||
Comment 9•6 years ago
|
||
Or perhaps changing this to a property so it's usable for both tests and devtools. https://searchfox.org/mozilla-central/rev/a23c3959b62cd3f616435e02810988ef5bac9031/dom/webidl/ShadowRoot.webidl#48-50
Reporter | ||
Comment 10•6 years ago
|
||
Or not, because of bug 1484474.
Assignee | ||
Updated•6 years ago
|
Priority: P2 → P1
Assignee | ||
Updated•6 years ago
|
Priority: P1 → P2
Assignee | ||
Comment 11•6 years ago
|
||
Tim: we are checking if we should prioritize this bug in Fx64. Is there a chance that UA widgets will be flipped beyond Nightly and will ride the trains in 64? Can it slip to 65?
Flags: needinfo?(timdream)
Reporter | ||
Comment 12•6 years ago
|
||
At the current pace, I guess it would slip to 65. Will comment if otherwise.
Flags: needinfo?(timdream)
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Assignee | ||
Comment 13•6 years ago
|
||
Tim, I have a basic implementation ready but I have a couple questions: - is there an added value to use a new pref instead of `devtools.inspector.showAllAnonymousContent`? - is there any use case where a UA widget might have children that should be visible to a developer? Right now I simply return an empty children list as soon as I detect a UA widget.
Flags: needinfo?(timdream)
Assignee | ||
Comment 14•6 years ago
|
||
Assignee | ||
Comment 15•6 years ago
|
||
Depends on D10536
Assignee | ||
Comment 16•6 years ago
|
||
Depends on D10537
Assignee | ||
Comment 17•6 years ago
|
||
Depends on D10538
Reporter | ||
Comment 18•6 years ago
|
||
(In reply to Julian Descottes [:jdescottes][:julian] from comment #13) > Tim, I have a basic implementation ready but I have a couple questions: > - is there an added value to use a new pref instead of > `devtools.inspector.showAllAnonymousContent`? I don't think there is other than naming, UA Widgets aren't exactly "anonymous content". > - is there any use case where a UA widget might have children that should be > visible to a developer? Right now I simply return an empty children list as > soon as I detect a UA widget. UA Widget Shadow DOM should be visible to the developer (when pref'd on) for Firefox development. Over bug 1425874 I have over implemented <marquee> with UA Widget and <slot> so web developers should definitely be able to see the content of <marquee> slotted in.
Flags: needinfo?(timdream)
Updated•6 years ago
|
Attachment #9021771 -
Attachment description: Bug 1483660 - Hide UA Widget children in inspector by default;r=ladybenko → Bug 1483660 - Hide UA Widget shadow root in inspector by default;r=ladybenko
Assignee | ||
Comment 19•6 years ago
|
||
Thanks Tim! I just changed the implementation in order keep regular children visible (don't know why I didn't think about that earlier but anyway). This means that for the following authored markup <video controls> <div>some content</div> </video> The markup view now shows devtools.inspector.showUserAgentShadowRoots = false: <video controls> <div>some content</div> </video> devtools.inspector.showUserAgentShadowRoots = true: <video controls> #shadow-root (closed) <div>some content</div> </video>
Reporter | ||
Comment 20•6 years ago
|
||
I can verify that the patch does what desired for video controls. Thank you so much! I am going to build your patch on top of bug 1425874 to see if it behaves correctly.
Reporter | ||
Comment 21•6 years ago
|
||
... and <marquee> work as expected too.
Assignee | ||
Comment 22•6 years ago
|
||
thanks for testing Tim!
Reporter | ||
Comment 23•6 years ago
|
||
No worries, thank you for working on this. There is actually an improvement over XBL <marquee> since we would hide the web content child together with XBL anonymous content, while in UA Widget we hide the root but continue to list web content under it.
Assignee | ||
Comment 24•6 years ago
|
||
Will land the first patch and leave open, so that devtools peers can review the other patches and use artifact builds
Keywords: leave-open
Updated•6 years ago
|
Attachment #9021770 -
Attachment description: Bug 1483660 - Expose ShadowRoot::isUAWidget() to chrome code;r=timdream → Bug 1483660 - Expose ShadowRoot::isUAWidget() to chrome code;r=smaug
Comment 25•6 years ago
|
||
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/648d56b39b4c Expose ShadowRoot::isUAWidget() to chrome code;r=smaug
Comment 26•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/648d56b39b4c
Assignee | ||
Updated•6 years ago
|
Keywords: leave-open
Comment 27•6 years ago
|
||
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5c5e2473ba3a Hide UA Widget shadow root in inspector by default;r=ladybenko https://hg.mozilla.org/integration/autoland/rev/f6ca26f35f11 Add mochitest for UA widgets in inspector;r=ladybenko https://hg.mozilla.org/integration/autoland/rev/bd0cbc059da3 Add server test for UA widget support in inspector;r=ladybenko
Comment 28•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5c5e2473ba3a https://hg.mozilla.org/mozilla-central/rev/f6ca26f35f11 https://hg.mozilla.org/mozilla-central/rev/bd0cbc059da3
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox65:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
You need to log in
before you can comment on or make changes to this bug.
Description
•