Closed Bug 631352 Opened 15 years ago Closed 15 years ago

Dynamic changes to :lang() not reflected

Categories

(Core :: CSS Parsing and Computation, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla2.0b12
Tracking Status
blocking2.0 --- final+

People

(Reporter: jag+mozilla, Assigned: bzbarsky)

Details

(Keywords: regression, Whiteboard: [softblocker])

Attachments

(2 files)

Given something like: <html lang="en"> … a { display: none; } a.nl:lang(nl), a.en:lang(en) { display: inline; } … function toggle() { html.lang = html.lang != "en" ? "en" : "nl"; } … <a lang="en" …>Gebruik Nederlands</a><a lang="nl" …>Use English</a> In 3.6 this successfully toggles between the two languages, in 4.0 nothing appears to happen, or the link disappears, sometimes after mousing over it. See the testcase.
Regressed in http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=979b65e6b73e&tochange=befec51e10ab (found by going immediately to those nightlies, not by bisection), presumably because of bug 479655 + bug 494117.
blocking2.0: --- → ?
Yeah, indeed, since changing @lang affects whether :lang matches for descendants due to GetLang walking up the tree. Looks like this is the only pseudo-class with this property. Fix coming up, with simple testcase. jag, webkit seems to have a bug with this too. Do you know whether there's a bug on them for this?
Assignee: nobody → bzbarsky
Priority: -- → P1
Whiteboard: [need review]
Comment on attachment 509779 [details] [diff] [review] Changes to @lang need to restyle all descendants. r=dbaron
Attachment #509779 - Flags: review?(dbaron)
Attachment #509779 - Flags: review+
Attachment #509779 - Flags: approval2.0+
Whiteboard: [need review] → [need landing]
Whiteboard: [need landing] → [need landing][softblocker]
Status: NEW → RESOLVED
Closed: 15 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [need landing][softblocker] → [softblocker]
Target Milestone: --- → mozilla2.0b12
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: