mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 631352. Changes to @lang need to restyle all descendants. r=dbaron, a=blocker
This commit is contained in:
parent
ac8850b133
commit
0e2f2b9189
6
layout/reftests/bugs/631352-1-ref.html
Normal file
6
layout/reftests/bugs/631352-1-ref.html
Normal file
@ -0,0 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<div>This text should be visible</div>
|
||||
</body>
|
||||
</html>
|
11
layout/reftests/bugs/631352-1.html
Normal file
11
layout/reftests/bugs/631352-1.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
div:not(:lang(foo)) { display: none; }
|
||||
</style>
|
||||
</head>
|
||||
<body onload="document.body.offsetWidth; document.body.lang = 'foo'">
|
||||
<div>This text should be visible</div>
|
||||
</body>
|
||||
</html>
|
@ -1609,3 +1609,4 @@ random-if(winWidget) == 621918-1.svg 621918-1-ref.svg # 1-pixel diacritic positi
|
||||
random-if(winWidget) HTTP(..) == 621918-2.svg 621918-2-ref.svg # same 1px issue as above, and HTTP(..) for filters.svg, used to mask antialiasing issues where glyphs touch
|
||||
== 625409-1.html 625409-1-ref.html
|
||||
== 627393-1.html about:blank
|
||||
== 631352-1.html 631352-1-ref.html
|
||||
|
@ -2573,6 +2573,14 @@ nsCSSRuleProcessor::HasAttributeDependentStyle(AttributeRuleProcessorData* aData
|
||||
{
|
||||
data.change = nsRestyleHint(data.change | eRestyle_Subtree);
|
||||
}
|
||||
|
||||
// We don't know the namespace of the attribute, and xml:lang applies to
|
||||
// all elements. If the lang attribute changes, we need to restyle our
|
||||
// whole subtree, since the :lang selector on our descendants can examine
|
||||
// our lang attribute.
|
||||
if (aData->mAttribute == nsGkAtoms::lang) {
|
||||
data.change = nsRestyleHint(data.change | eRestyle_Subtree);
|
||||
}
|
||||
}
|
||||
|
||||
RuleCascadeData* cascade = GetRuleCascade(aData->mPresContext);
|
||||
|
Loading…
Reference in New Issue
Block a user