mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1136010 - Don't coalesce style contexts added to RestyleManager::mContextsToClear. r=dbaron
This commit is contained in:
parent
b55eb105f7
commit
0a792d4a9c
@ -2881,20 +2881,9 @@ ElementRestyler::Restyle(nsRestyleHint aRestyleHint)
|
||||
// to the style context (as is done by nsTransformedTextRun objects, which
|
||||
// can be referenced by a text frame's mTextRun longer than the frame's
|
||||
// mStyleContext).
|
||||
//
|
||||
// We coalesce entries in mContextsToClear when we detect that the last
|
||||
// style context appended has oldContext as its parent, as
|
||||
// ClearCachedInheritedStyleDataOnDescendants handles a whole subtree
|
||||
// of style contexts.
|
||||
if (!mContextsToClear.IsEmpty() &&
|
||||
mContextsToClear.LastElement().mStyleContext->GetParent() == oldContext &&
|
||||
mContextsToClear.LastElement().mStructs == swappedStructs) {
|
||||
mContextsToClear.LastElement().mStyleContext = Move(oldContext);
|
||||
} else {
|
||||
ContextToClear* toClear = mContextsToClear.AppendElement();
|
||||
toClear->mStyleContext = Move(oldContext);
|
||||
toClear->mStructs = swappedStructs;
|
||||
}
|
||||
ContextToClear* toClear = mContextsToClear.AppendElement();
|
||||
toClear->mStyleContext = Move(oldContext);
|
||||
toClear->mStructs = swappedStructs;
|
||||
}
|
||||
|
||||
mRestyleTracker.AddRestyleRootsIfAwaitingRestyle(descendants);
|
||||
|
@ -572,7 +572,7 @@ load 1054010-1.html
|
||||
load 1058954-1.html
|
||||
load 1134531.html
|
||||
load 1134667.html
|
||||
asserts(3) load 1137723-1.html # bug 1019192
|
||||
asserts(3-4) load 1137723-1.html # bug 1019192
|
||||
asserts(3-6) load 1137723-2.html # bug 1019192, bug 1138133
|
||||
# The tests for bug 1137723 above causes delayed assertions too,
|
||||
# the next 3 lines can be removed once that is fixed.
|
||||
|
16
layout/style/crashtests/1136010-1.html
Normal file
16
layout/style/crashtests/1136010-1.html
Normal file
@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<style>
|
||||
body { text-transform: uppercase; width: 200px; height: 200px; background-color: white; }
|
||||
#a, #b { font-size: 24px; }
|
||||
</style>
|
||||
<div id=a><div id=b><span>x</span><span>y</span></div></div>
|
||||
<script>
|
||||
document.body.offsetTop;
|
||||
var a = document.getElementById("a");
|
||||
var b = document.getElementById("b");
|
||||
a.style.fontSize = "24px";
|
||||
b.style.fontSize = "24px";
|
||||
document.body.offsetTop;
|
||||
b.style.fontSize = "36px";
|
||||
document.body.offsetTop;
|
||||
</script>
|
@ -111,5 +111,6 @@ load 1028514-1.html
|
||||
load 1066089-1.html
|
||||
load 1074651-1.html
|
||||
pref(dom.webcomponents.enabled,true) load 1089463-1.html
|
||||
load 1136010-1.html
|
||||
load large_border_image_width.html
|
||||
load border-image-visited-link.html
|
||||
|
Loading…
Reference in New Issue
Block a user