Bug 164240 - [CSS Parser] Support the shadow DOM
Summary: [CSS Parser] Support the shadow DOM
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dave Hyatt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-31 14:51 PDT by Dave Hyatt
Modified: 2016-11-02 01:08 PDT (History)
3 users (show)

See Also:


Attachments
Patch (14.40 KB, patch)
2016-10-31 14:55 PDT, Dave Hyatt
no flags Details | Formatted Diff | Diff
Patch (15.40 KB, patch)
2016-11-01 17:28 PDT, Dave Hyatt
dino: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Hyatt 2016-10-31 14:51:16 PDT
[CSS Parser] Support the shadow DOM
Comment 1 Dave Hyatt 2016-10-31 14:55:50 PDT
Created attachment 293467 [details]
Patch
Comment 2 Dave Hyatt 2016-10-31 15:11:20 PDT
Landed in r208180.
Comment 3 Ryan Haddad 2016-10-31 17:04:34 PDT
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
Comment 4 Ryan Haddad 2016-10-31 17:04:55 PDT
Is there a reason this was landed before EWS had a chance to complete?
Comment 5 Ryan Haddad 2016-10-31 17:13:22 PDT
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>
Comment 6 Dave Hyatt 2016-11-01 17:28:02 PDT
Created attachment 293625 [details]
Patch
Comment 7 Dave Hyatt 2016-11-01 18:02:58 PDT
Landed in r208267.
Comment 8 Ryosuke Niwa 2016-11-02 01:08:48 PDT
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.