mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1222226 - Don't return eRestyleResult_StopWithStyleChange if the old style context is shared. r=dbaron
This commit is contained in:
parent
3e64762ef3
commit
86613926e3
@ -3956,6 +3956,15 @@ ElementRestyler::RestyleSelf(nsIFrame* aSelf,
|
||||
// for the other frames sharing the style context.
|
||||
LOG_RESTYLE_CONTINUE("the old style context is shared");
|
||||
result = eRestyleResult_Continue;
|
||||
|
||||
// It's not safe to return eRestyleResult_StopWithStyleChange,
|
||||
// as even though we might not have cached structs for inherited
|
||||
// properties on oldContext (and thus our samePointerStructs
|
||||
// check later will look OK), oldContext and newContext might
|
||||
// represent different inherited style data, and some of the
|
||||
// elements currently sharing oldContext might need to keep it
|
||||
// rather than get restyled to use newContext.
|
||||
canStopWithStyleChange = false;
|
||||
}
|
||||
|
||||
// Look at some details of the new style context to see if it would
|
||||
|
10
layout/reftests/bugs/1222226-1-ref.html
Normal file
10
layout/reftests/bugs/1222226-1-ref.html
Normal file
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<style>
|
||||
.red { color: red; }
|
||||
</style>
|
||||
<div>
|
||||
<span id="s1">test</span><br />
|
||||
<span id="s2" class=red>test</span><br />
|
||||
<span id="s3" class=red>test</span><br />
|
||||
<span id="s4">test</span><br />
|
||||
</div>
|
20
layout/reftests/bugs/1222226-1.html
Normal file
20
layout/reftests/bugs/1222226-1.html
Normal file
@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<style>
|
||||
.red { color: red; }
|
||||
</style>
|
||||
<script>
|
||||
document.onreadystatechange = function() {
|
||||
if (document.readyState == "complete") {
|
||||
var arr = ["s2","s3"];
|
||||
arr.forEach(function(n) {
|
||||
document.getElementById(n).className = "red";
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<div>
|
||||
<span id="s1">test</span><br />
|
||||
<span id="s2">test</span><br />
|
||||
<span id="s3">test</span><br />
|
||||
<span id="s4">test</span><br />
|
||||
</div>
|
@ -1941,3 +1941,4 @@ fuzzy(1,74) fuzzy-if(gtkWidget,6,79) == 1174332-1.html 1174332-1-ref.html
|
||||
== 1209994-2.html 1209994-2-ref.html
|
||||
== 1209994-3.html 1209994-3-ref.html
|
||||
== 1209994-4.html 1209994-4-ref.html
|
||||
== 1222226-1.html 1222226-1-ref.html
|
||||
|
Loading…
Reference in New Issue
Block a user