Bug 79077

Summary: Add :scope pseudo-class
Product: WebKit Reporter: Roland Steiner <rolandsteiner>
Component: CSSAssignee: Roland Steiner <rolandsteiner>
Status: RESOLVED FIXED    
Severity: Normal CC: bronislav.klucka, dglazkov, dominicc, koivisto, macpherson, menard, morrita, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 49142    
Attachments:
Description Flags
Patch none

Description Roland Steiner 2012-02-20 21:34:52 PST
Add :scope pseudo-class that only matches against the contextual reference element - see http://dev.w3.org/csswg/selectors4/#scope-pseudo.
Comment 1 Roland Steiner 2012-03-02 02:54:18 PST
Created attachment 129862 [details]
Patch
Comment 2 WebKit Review Bot 2012-03-02 06:26:31 PST
Comment on attachment 129862 [details]
Patch

Clearing flags on attachment: 129862

Committed r109573: <http://trac.webkit.org/changeset/109573>
Comment 3 WebKit Review Bot 2012-03-02 06:26:36 PST
All reviewed patches have been landed.  Closing bug.
Comment 4 Bronislav Klucka 2012-03-13 14:53:20 PDT
hello, 

<ul id="templ"><li></li><li></li></ul>

running on yesterday nightly chromium (19.0.1068.0, 2012-03-12) and I'm having such results

document.getElementById('templ').querySelectorAll(':scope');
returns empty set instead of set with one UL

document.getElementById('templ').querySelectorAll(':scope li');
returns set of LI (that is fine)

document.getElementById('templ').querySelectorAll(':scope > li');
returns empty set instead of set of LI
Comment 5 Roland Steiner 2012-03-13 19:06:52 PDT
(In reply to comment #4)

:scope is not yet implemented for querySelectorAll(), but it certainly should be! I opened bug 81069 for this.