[Webkit-unassigned] [Bug 49142] Implement HTML5 style scoped attribute

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 23 13:46:21 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=49142





--- Comment #7 from Dimitri Glazkov (Google) <dglazkov at chromium.org>  2011-05-23 13:46:21 PST ---
Just to recap the latest thinking:

The easy-peasy way to implement this is to treat selectors in scoped styles as if they were prefixed with some unique id that matches only the parent node of the scoped style element.

So this makes the work as follows:
* define a new type of unique identifier, build a way to maintain a map of them at Document
* add plumbing to add/remove ids on the parent of scoped style element
* make CSS match this unique id on an element
* modify CSS selector parser to prefix each scoped style selector with a sub-selector that matches this unique id
* make sure changing scoped attribute causes all stylesheets to be reparsed.
* write nice tests

I don't think TreeScope really comes into play until we start dealing with shadow DOM. Once there, we should abstract out the notion of id/className cache in CSSStyleSelector and instead of using document(), use treeScope().

Does this make any sense?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list