Bug 79077 - Add :scope pseudo-class
Summary: Add :scope pseudo-class
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Roland Steiner
URL:
Keywords:
Depends on:
Blocks: 49142
  Show dependency treegraph
 
Reported: 2012-02-20 21:34 PST by Roland Steiner
Modified: 2012-03-13 19:06 PDT (History)
8 users (show)

See Also:


Attachments
Patch (7.69 KB, patch)
2012-03-02 02:54 PST, Roland Steiner
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.