WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
173121
Web Inspector: Web inspector does not show non-shadow children of an element with a shadow root (e.g. <video>)
https://bugs.webkit.org/show_bug.cgi?id=173121
Summary
Web Inspector: Web inspector does not show non-shadow children of an element ...
Joseph Pecoraro
Reported
2017-06-08 16:01:20 PDT
Summary: Web inspector does not show non-shadow children of an element with a shadow root (e.g. <video>) Test: <video controls> <source src="video.mp4" type="video/mp4"> </video> Steps to Reproduce: 1. Inspect the <video> 2. Expand <video> to show children => Expected to see <source> only saw Shadow Root
Attachments
[PATCH] Proposed Fix
(8.47 KB, patch)
2017-06-08 19:22 PDT
,
Joseph Pecoraro
joepeck
: review-
Details
Formatted Diff
Diff
[PATCH] Proposed Fix
(6.86 KB, patch)
2017-06-09 13:48 PDT
,
Joseph Pecoraro
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Joseph Pecoraro
Comment 1
2017-06-08 16:03:09 PDT
<
rdar://problem/30948943
>
Joseph Pecoraro
Comment 2
2017-06-08 19:22:36 PDT
Created
attachment 312373
[details]
[PATCH] Proposed Fix
Joseph Pecoraro
Comment 3
2017-06-08 19:27:01 PDT
Comment on
attachment 312373
[details]
[PATCH] Proposed Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=312373&action=review
> Source/WebCore/inspector/InspectorDOMAgent.cpp:1370 > + // Always send children if there are ShadowRoots since shadow and non-shadow children are bundled.
An alternative solution is to treat actual child nodes and shadow roots more discretely in the frontend. Currently they are all shared in _children and the existence of _children affects things. Switching to treating things more carefully the children can continue to be requested lazily. But this likely means a lot of places in the frontend will need to change based on how _children is used. I will look into this alternate solution and see how it compares to this current solution. The approach in this patch could be problematic if the entire tree (or a very large portion) had nodes with shadow roots, but I don't think that is realistic.
Joseph Pecoraro
Comment 4
2017-06-09 13:07:54 PDT
Comment on
attachment 312373
[details]
[PATCH] Proposed Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=312373&action=review
>> Source/WebCore/inspector/InspectorDOMAgent.cpp:1370 >> + // Always send children if there are ShadowRoots since shadow and non-shadow children are bundled. > > An alternative solution is to treat actual child nodes and shadow roots more discretely in the frontend. Currently they are all shared in _children and the existence of _children affects things. Switching to treating things more carefully the children can continue to be requested lazily. But this likely means a lot of places in the frontend will need to change based on how _children is used. I will look into this alternate solution and see how it compares to this current solution. > > The approach in this patch could be problematic if the entire tree (or a very large portion) had nodes with shadow roots, but I don't think that is realistic.
I think the alternative approach will be simpler and better. I'm going to r- this.
Joseph Pecoraro
Comment 5
2017-06-09 13:48:34 PDT
Created
attachment 312486
[details]
[PATCH] Proposed Fix
Matt Baker
Comment 6
2017-06-09 14:00:04 PDT
Comment on
attachment 312486
[details]
[PATCH] Proposed Fix r=me. Nice work avoiding a change to the backend.
WebKit Commit Bot
Comment 7
2017-06-09 14:59:06 PDT
Comment on
attachment 312486
[details]
[PATCH] Proposed Fix Clearing flags on attachment: 312486 Committed
r218020
: <
http://trac.webkit.org/changeset/218020
>
WebKit Commit Bot
Comment 8
2017-06-09 14:59:08 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug