[webkit-reviews] review granted: [Bug 170762] Updating class name of a shadow host does not update the style applied by descendants of :host() : [Attachment 309710] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 11 14:17:19 PDT 2017


Ryosuke Niwa <rniwa at webkit.org> has granted Antti Koivisto <koivisto at iki.fi>'s
request for review:
Bug 170762: Updating class name of a shadow host does not update the style
applied by descendants of :host()
https://bugs.webkit.org/show_bug.cgi?id=170762

Attachment 309710: patch

https://bugs.webkit.org/attachment.cgi?id=309710&action=review




--- Comment #6 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 309710
  --> https://bugs.webkit.org/attachment.cgi?id=309710
patch

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

> Source/WebCore/css/RuleSet.cpp:208
> +    return leftmostSelector->match() == CSSSelector::PseudoClass &&
leftmostSelector->pseudoClassType() ==CSSSelector::PseudoClassHost;

Nit: Need a space after the second ==.

> Source/WebCore/css/RuleSet.h:218
> +    bool m_hasHostPseudoClassRulesMatchingInShadowTree { false };

You might wanna put this next to another boolean for better packing not that it
matters much.

>
LayoutTests/fast/shadow-dom/css-scoping-host-class-and-attribute-mutation.html:
108
> +test("#host4", "#shadow4", (host) => {
> +   host.setAttribute('id','green');
> +});

Could you also add a variant for modifying ID/class/attribute of a node inside
the shadow tree?


More information about the webkit-reviews mailing list