[Webkit-unassigned] [Bug 149441] Implement ::slotted pseudo element
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Feb 26 00:36:31 PST 2016
https://bugs.webkit.org/show_bug.cgi?id=149441
--- Comment #8 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 272310
--> https://bugs.webkit.org/attachment.cgi?id=272310
patch
View in context: https://bugs.webkit.org/attachment.cgi?id=272310&action=review
The test change looks correct. Someone who's more familiar with selector code should review it.
> Source/WebCore/css/ElementRuleCollector.cpp:256
> + auto* hostShadowRoot = m_element.parentNode()->shadowRoot();
> + ASSERT(hostShadowRoot);
> + auto* slot = hostShadowRoot->findAssignedSlot(m_element);
> + if (!slot)
> + return;
I think this isn't quite right for the distributed node case.
e.g. when an element X is assigned to a slot A, and the slot A is assigned to another slot B,
then the rule in B's shadow DOM that says ::slotted(X) is supposed to match X.
What's not clear from the Github issue is
whether we also need to match the rule in A's shadow DOM or not.
> Source/WebCore/css/ElementRuleCollector.h:104
> + bool m_isMatchindSlottedPseudoElement { false };
Typo: Matchind -> Matching.
> LayoutTests/fast/shadow-dom/slotted-pseudo-element-css-text.html:65
> + for (var i = 0; i < expectedCSSTexts.length; ++i)
> + assert_equals(cssRules.item(i).cssText, expectedCSSTexts[i]);
> + assert_equals(cssRules.length, expectedCSSTexts.length);
Can we call test for each selector so that we can see result per selector?
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160226/2d30a594/attachment.html>
More information about the webkit-unassigned
mailing list