Summary: | Dynamic changes to the lang attribute not seen by e.g. div:lang() selector | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | jag (Peter Annema) <jag-webkit> | ||||
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | ap, esprehn, falken | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Bug Depends on: | 94092 | ||||||
Bug Blocks: | 76364 | ||||||
Attachments: |
|
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. |
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.