Bug 199128

Summary: Web Inspector: Elements: show shadow DOM by default
Product: WebKit Reporter: Matt Baker <mattbaker>
Component: Web InspectorAssignee: Matt Baker <mattbaker>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, drousso, inspector-bugzilla-changes, rniwa, timothy, webkit-bug-importer
Priority: P4 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

Description Matt Baker 2019-06-22 13:24:38 PDT
The toggle for this setting has a prominent spot in the Elements tab, but if overlooked, empty Shadow DOM host nodes in the tree could give the impression that something is wrong or missing.

Shadow DOM host nodes will initially be collapsed in the DOM tree, so there shouldn't be a downside to enabling this by default.
Comment 1 Radar WebKit Bug Importer 2019-06-22 13:25:21 PDT
<rdar://problem/52022337>
Comment 2 Matt Baker 2019-06-22 13:26:27 PDT
Created attachment 372686 [details]
Patch
Comment 3 Devin Rousso 2019-06-25 16:27:57 PDT
I'm fine with this, as I always have Shadow DOM enabled.

@rniwa (Ryosuke) or @joepeck (Joe) or @xenon (Tim) is there a reason we wouldn't want to do this?
Comment 4 WebKit Commit Bot 2019-06-25 16:45:44 PDT
Comment on attachment 372686 [details]
Patch

Clearing flags on attachment: 372686

Committed r246821: <https://trac.webkit.org/changeset/246821>
Comment 5 WebKit Commit Bot 2019-06-25 16:45:46 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Matt Baker 2019-06-25 17:06:19 PDT
(In reply to Devin Rousso from comment #3)
> I'm fine with this, as I always have Shadow DOM enabled.
> 
> @rniwa (Ryosuke) or @joepeck (Joe) or @xenon (Tim) is there a reason we
> wouldn't want to do this?

I copied Ryosuke on the bug, since he is the domain expert. I think we should consider whether this warrants a toggle at all, and if it does, whether it needs to have such a prominent location (Elements tab navigation bar).

I appreciate that shadow DOM is inherently an encapsulation mechanism, and as such it makes sense to hide the implementation details. That said, maybe it makes more sense to put this toggle in the Settings tab.