[CSS Parser] Support the shadow DOM
Created attachment 293467 [details] Patch
Landed in r208180.
This change caused fast/shadow-dom/slotted-pseudo-element-css-text.html to crash on macOS and iOS on every test run: https://build.webkit.org/results/Apple%20Yosemite%20Release%20WK2%20(Tests)/r208180%20(19203)/results.html
Is there a reason this was landed before EWS had a chance to complete?
Reverted r208180 for reason: This change caused fast/shadow-dom/slotted-pseudo-element-css-text.html to crash on macOS and iOS on every test run. Committed r208198: <http://trac.webkit.org/changeset/208198>
Created attachment 293625 [details] Patch
Landed in r208267.
I'm not certain if it makes sense for us to be treating ::slotted(~) as an "implicit shadow combinator" because unlike ::-webkit-~ and other pseudo element that goes into a shadow tree, ::slotted goes out of the shadow tree to access a slot. That is, ::~webbkit- wants to match against the nodes inside a shadow tree from outside the shadow tree and ::slotted wants to match the nodes outside a shadow tree from inside the shadow tree. We might want to differentiate the two by having CSSSelector::ShadowDescendant and, let's say, CSSSelector::SlottedDescendant.