Add @global rules to allow scoped style rules to "react" to the surrounding context (see HTML5 spec)
Created attachment 130606 [details] work-in-progress work-in-progress patch. compiles, but no tests yet. checking EWS, mostly (but any comments welcome!)
Comment on attachment 130606 [details] work-in-progress Attachment 130606 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/11851043
Comment on attachment 130606 [details] work-in-progress Attachment 130606 [details] did not pass qt-ews (qt): Output: http://queues.webkit.org/results/11850084
Created attachment 131005 [details] Patch Patch - it's big, but the largest part is straightforward plumbing.
Comment on attachment 131005 [details] Patch I feel the scoped stylesheet feature is getting too complex and bloaty for anyone to use effectively. If I understand correctly @global wouldn't be needed in the first place if the spec wasn't limiting the selector matching to the scope by default. It seems to me that just using explicit :scope ancestor for scoped rules would achieve the same result with much less spec and implementation bloat. Since the required code changes are invasive, I don't think we should implement any more of this feature until it is cleaned up.
(In reply to comment #5) > (From update of attachment 131005 [details]) > I feel the scoped stylesheet feature is getting too complex and bloaty for anyone to use effectively. If I understand correctly @global wouldn't be needed in the first place if the spec wasn't limiting the selector matching to the scope by default. It seems to me that just using explicit :scope ancestor for scoped rules would achieve the same result with much less spec and implementation bloat. This was discussed on mailing lists. The general feeling is that the behavior you seem to prefer (matching the behavior of querySelector) is basically broken; it is very rarely what authors actually want to happen, and it causes a lot of confusion and annoyance when authors run into it (with elements being matched that they didn't expect). The current behavior appears to be *nearly always* what authors expect and want, but there are still occasional instances where you really do want to match outside of the scoped subtree. This is why the new find() and findAll() methods are instead defaulting to the current <style scoped> behavior, where the entire selector must match within the scope. There's no equivalent @global construct for find/All(), but that's because JS can hack around this issue when necessary.
<style scoped> was removed from tree in r156683, as well as from spec.