Bug 202218 - Web Inspector: "Toggle Visibility" does not work for element inside Shadow DOM
Summary: Web Inspector: "Toggle Visibility" does not work for element inside Shadow DOM
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: Other
Hardware: Macintosh macOS 10.13
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-09-25 11:55 PDT by Tim Guan-tin Chien [:timdream]
Modified: 2019-11-04 16:18 PST (History)
5 users (show)

See Also:


Attachments
Patch (2.26 KB, patch)
2019-11-04 10:58 PST, Devin Rousso
bburg: review+
bburg: commit-queue-
Details | Formatted Diff | Diff
Patch (2.28 KB, patch)
2019-11-04 15:20 PST, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Guan-tin Chien [:timdream] 2019-09-25 11:55:37 PDT
STR:

1. Load this URL which insert an open shadow root under <body>

data:text/html,<script>window.onload%20=%20()%20=>%20{%20sr%20=%20document.body.attachShadow({mode:%20"open"});%20sr.innerHTML%20=%20"<div>Hello</div>";%20}</script>

2. Inspect the element containing the word "Hello"
3. Right click and select "Toggle Visibility

Expected:

1. The element is hidden

Actual:

1. The element is not hidden.

Note:

Happens to me on Safari 13 (Version 13.0.1 (14608.2.11.1.11))
You will not be able to repro this bug on STP 92 because of bug 202217.
Comment 1 Radar WebKit Bug Importer 2019-09-25 11:55:57 PDT
<rdar://problem/55713078>
Comment 2 Devin Rousso 2019-11-04 10:58:38 PST
Created attachment 382750 [details]
Patch
Comment 3 Brian Burg 2019-11-04 15:15:13 PST
Comment on attachment 382750 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=382750&action=review

r=me

> Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js:354
> +                else

Please add '// Inside Shadow DOM.'  to the else branch.
Comment 4 Devin Rousso 2019-11-04 15:20:40 PST
Created attachment 382779 [details]
Patch
Comment 5 WebKit Commit Bot 2019-11-04 16:18:25 PST
Comment on attachment 382779 [details]
Patch

Clearing flags on attachment: 382779

Committed r252026: <https://trac.webkit.org/changeset/252026>
Comment 6 WebKit Commit Bot 2019-11-04 16:18:27 PST
All reviewed patches have been landed.  Closing bug.