Bug 149230

Summary: Implement scoped styling for shadow DOM
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: koivisto, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 149187, 149353, 149446    
Bug Blocks: 148695    
Attachments:
Description Flags
patch
none
patch rniwa: review+

Description Ryosuke Niwa 2015-09-16 14:13:57 PDT
Style rules defined or imported inside a shadow tree should only allow to nodes in that shadow tree.
Comment 1 Radar WebKit Bug Importer 2015-09-16 14:14:33 PDT
<rdar://problem/22727059>
Comment 2 Ryosuke Niwa 2015-09-21 18:12:27 PDT
*** Bug 149328 has been marked as a duplicate of this bug. ***
Comment 3 Antti Koivisto 2015-09-25 01:08:46 PDT
Created attachment 261918 [details]
patch
Comment 4 Antti Koivisto 2015-09-25 14:28:07 PDT
Created attachment 261939 [details]
patch
Comment 5 Ryosuke Niwa 2015-09-25 14:32:40 PDT
Comment on attachment 261939 [details]
patch

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

> Source/WebCore/dom/ShadowRoot.cpp:84
> +        // We could share style resolver with shadow roots that have identical style.

Should this be a FIXME?
Comment 6 Antti Koivisto 2015-09-25 15:06:43 PDT
https://trac.webkit.org/r190256
Comment 7 Alexey Proskuryakov 2015-09-25 23:16:31 PDT
There is a number of tests in platform/mac/TestExpectations that are marked as being tracked by a duplicate of this bug. Please unmark them if they are expected to pass now:

webkit.org/b/149328 fast/shadow-dom/css-scoping-shadow-host-rule.html [ ImageOnlyFailure ]
webkit.org/b/149328 fast/shadow-dom/css-scoping-shadow-host-functional-rule.html [ ImageOnlyFailure ]
webkit.org/b/149328 fast/shadow-dom/css-scoping-shadow-slotted-rule.html [ ImageOnlyFailure ]
webkit.org/b/149328 fast/shadow-dom/css-scoping-shadow-slot-display-override.html [ ImageOnlyFailure ]
webkit.org/b/149328 fast/shadow-dom/shadow-layout-after-slot-changes.html [ ImageOnlyFailure ]
Comment 8 Ryosuke Niwa 2015-09-25 23:41:58 PDT
(In reply to comment #7)
> There is a number of tests in platform/mac/TestExpectations that are marked
> as being tracked by a duplicate of this bug. Please unmark them if they are
> expected to pass now:
> 
> webkit.org/b/149328 fast/shadow-dom/css-scoping-shadow-host-rule.html [
> ImageOnlyFailure ]
> webkit.org/b/149328
> fast/shadow-dom/css-scoping-shadow-host-functional-rule.html [
> ImageOnlyFailure ]
> webkit.org/b/149328 fast/shadow-dom/css-scoping-shadow-slotted-rule.html [
> ImageOnlyFailure ]
> webkit.org/b/149328
> fast/shadow-dom/css-scoping-shadow-slot-display-override.html [
> ImageOnlyFailure ]
> webkit.org/b/149328 fast/shadow-dom/shadow-layout-after-slot-changes.html [
> ImageOnlyFailure ]

Oh oops, these are tracked by different bugs. Will update soon.

Thanks for noticing that.
Comment 9 Ryosuke Niwa 2015-09-28 00:50:54 PDT
Done that in https://trac.webkit.org/changeset/190275.