Created attachment 81239 [details]
Simple test case, courtesy of Boris Zbarsky
Dynamically setting the lang attribute doesn't trigger a style update for selectors that (now / no longer) match.
I think that this has need fixed already. Bug 76364 tracks adding tests.
Yes, this was fixed in the patch that added lang to -webkit-locale mapping, which also added a style recalc for when lang is set (http://trac.webkit.org/changeset/103608). In the current code, the style recalc occurs because lang is one of the attributes in HTMLElement::isPresentationAttribute.
Some tests for dynamic changes have landed as part of bug 76364, but technically they only test the mapping to -webkit-locale, and not the CSS :lang selector.
I think it'd be good to add a new test specifically for the :lang selector. I'll upload a patch.
Closing bug as the test in bug 94092 landed.