Bug 46595

Summary: Make pseudo-style resolution less hard-coded when used to select a shadow node
Product: WebKit Reporter: Dimitri Glazkov (Google) <dglazkov>
Component: CSSAssignee: Dimitri Glazkov (Google) <dglazkov>
Status: RESOLVED FIXED    
Severity: Enhancement CC: arv, bdakin, eric, hyatt, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 50790, 52917    
Bug Blocks: 44907, 46590, 48980    
Attachments:
Description Flags
WIP: Almost ready
none
WIP: Serialization almost works.
none
Ready for review
none
Corrected the issue with multiple specifiers.
none
Patch hyatt: review+

Description Dimitri Glazkov (Google) 2010-09-26 16:55:45 PDT
in effect, implement plumbing for pseudo attribute from: http://dev.w3.org/2006/xbl2/Overview.html#the-pseudo-attribute
Comment 1 Dimitri Glazkov (Google) 2010-12-17 08:49:06 PST
See https://bugs.webkit.org/show_bug.cgi?id=50790#c3 for specific steps on how to do this.
Comment 2 Dimitri Glazkov (Google) 2011-01-05 16:54:07 PST
Created attachment 78063 [details]
WIP: Almost ready
Comment 3 Dimitri Glazkov (Google) 2011-01-05 16:55:50 PST
(In reply to comment #2)
> Created an attachment (id=78063) [details]
> WIP: Almost ready

I am not sure I need both CSSSelector::PseudoShadowElement and CSSSelector::ShadowHost, but it does make the logic easier to understand. WDYT?
Comment 4 Dimitri Glazkov (Google) 2011-01-06 08:57:20 PST
Still to do:

1) We're supposed to throw SYNTAX_ERR on unknown pseudo elements. How are we going to handle this now?

2) Unscrew-up pseudo element selector serialization.
Comment 5 Dimitri Glazkov (Google) 2011-01-06 09:38:27 PST
Created attachment 78126 [details]
WIP: Serialization almost works.
Comment 6 Dimitri Glazkov (Google) 2011-01-07 13:18:44 PST
Created attachment 78262 [details]
Ready for review
Comment 7 Dimitri Glazkov (Google) 2011-01-07 14:50:56 PST
Created attachment 78274 [details]
Corrected the issue with multiple specifiers.
Comment 8 Dimitri Glazkov (Google) 2011-01-08 11:04:05 PST
Comment on attachment 78274 [details]
Corrected the issue with multiple specifiers.

I wrote a comprehensive test for selectors to double-check that I didn't screw anything up, and it turns out I did! :)

New patch coming up.
Comment 9 Dimitri Glazkov (Google) 2011-01-08 20:05:03 PST
Created attachment 78338 [details]
Patch
Comment 10 Dimitri Glazkov (Google) 2011-01-08 20:06:11 PST
(In reply to comment #9)
> Created an attachment (id=78338) [details]
> Patch

Now with tests! I can't believe we didn't good have coverage for namespaces/elements/specifier_lists combinations.
Comment 11 Dave Hyatt 2011-01-11 12:53:29 PST
Comment on attachment 78338 [details]
Patch

r=me.  Looks good.
Comment 12 Dimitri Glazkov (Google) 2011-01-11 13:05:44 PST
Committed r75543: <http://trac.webkit.org/changeset/75543>