If there is no scope, the :scope pseudo-class should behave as if :root (see http://dev.w3.org/csswg/selectors4/#scope-pseudo) - I missed that detail in my original implementation.
Created attachment 130307 [details] Patch
Comment on attachment 130307 [details] Patch Clearing flags on attachment: 130307 Committed r109884: <http://trac.webkit.org/changeset/109884>
All reviewed patches have been landed. Closing bug.