On Wed, May 1, 2013 at 1:49 AM, Robert O'Callahan <[email protected]>wrote:
> On Wed, May 1, 2013 at 8:01 PM, Elliott Sprehn <[email protected]>wrote: > >> fwiw WebKit (and Blink) implement this through CSS inheritance since you >> need to know the lang for all kinds of things and walking up the DOM >> repeatedly would be expensive. >> >> -webkit-locale is inherited by default and contains the enclosing @lang >> value. You can query it through getComputedStyle(node).webkitLocale. That >> doesn't help your custom parser though. >> > > Interesting. What does "body:lang(en) { -webkit-locale:fr; }" do? :-) > > Nothing sensible. :) We still walk up the tree when doing selector matching, but you'll confuse some render tree operations. Looking through the code again we don't use -webkit-locale as much as I thought, though perhaps we should and prevent user CSS from tampering with it. - E
