Bug 149230 - Implement scoped styling for shadow DOM
Summary: Implement scoped styling for shadow DOM
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
: 149328 (view as bug list)
Depends on: 149187 149353 149446
Blocks: 148695
  Show dependency treegraph
 
Reported: 2015-09-16 14:13 PDT by Ryosuke Niwa
Modified: 2015-09-28 00:50 PDT (History)
3 users (show)

See Also:


Attachments
patch (18.64 KB, patch)
2015-09-25 01:08 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff
patch (18.67 KB, patch)
2015-09-25 14:28 PDT, Antti Koivisto
rniwa: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.