WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
156235
Shadow DOM: :host() From The First Shadow Context Should Not Style All Shadow Context
https://bugs.webkit.org/show_bug.cgi?id=156235
Summary
Shadow DOM: :host() From The First Shadow Context Should Not Style All Shadow...
Antti Koivisto
Reported
2016-04-05 08:55:14 PDT
* SUMMARY The first “:host()” context in a template seems to dictate the the “host” styles for all shadow context in the document. Quoting draft from here
https://drafts.csswg.org/css-scoping/#host-selector
(if it is up-to-date),: “The :host pseudo-class, when evaluated in the context of a shadow tree, matches the shadow tree’s host element. In any other context, it matches nothing.” * STEPS TO REPRODUCE 1. Open included test-case * RESULTS Expected: Host 2 from test case shold have a black border instead of pink. Actual: Both hosts have pink borders.
Attachments
test
(1.21 KB, text/html)
2016-04-05 08:55 PDT
,
Antti Koivisto
no flags
Details
patch
(5.88 KB, patch)
2016-04-05 09:11 PDT
,
Antti Koivisto
kling
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Antti Koivisto
Comment 1
2016-04-05 08:55:56 PDT
Created
attachment 275668
[details]
test
Antti Koivisto
Comment 2
2016-04-05 08:56:25 PDT
<
rdar://problem/24668206
>
Antti Koivisto
Comment 3
2016-04-05 09:11:31 PDT
Created
attachment 275669
[details]
patch
Andreas Kling
Comment 4
2016-04-05 09:14:03 PDT
Comment on
attachment 275669
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=275669&action=review
r=me
> Source/WebCore/style/StyleSharingResolver.cpp:100 > + if (element.shadowRoot() && !element.shadowRoot()->styleResolver().ruleSets().authorStyle()->hostPseudoClassRules().isEmpty())
This would look so nice if we made authorStyle() return a reference, too.
> Source/WebCore/style/StyleSharingResolver.cpp:287 > + if (element.shadowRoot() && !element.shadowRoot()->styleResolver().ruleSets().authorStyle()->hostPseudoClassRules().isEmpty())
Mhm.
Antti Koivisto
Comment 5
2016-04-05 09:46:30 PDT
https://trac.webkit.org/r199060
Alex Christensen
Comment 6
2016-04-13 23:28:24 PDT
Comment on
attachment 275669
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=275669&action=review
> Source/WebCore/style/StyleSharingResolver.cpp:288 > + return nullptr;
nullptr -> false :(
Antti Koivisto
Comment 7
2016-04-15 01:16:34 PDT
> nullptr -> false > :(
http://trac.webkit.org/changeset/199584
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