mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1069716 - Fix deficient CalcDifference of nsStyleList. r=heycam
This commit is contained in:
parent
ac25756b56
commit
3f468b77d0
11
layout/reftests/bugs/1069716-1-ref.html
Normal file
11
layout/reftests/bugs/1069716-1-ref.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf8">
|
||||
<style type="text/css">
|
||||
@counter-style triangle { symbols: b; }
|
||||
@counter-style disc { system: extends triangle; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<ul><li><---That should be a 'b' character.
|
20
layout/reftests/bugs/1069716-1.html
Normal file
20
layout/reftests/bugs/1069716-1.html
Normal file
@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf8">
|
||||
<script>
|
||||
function go() {
|
||||
var styleNode = document.createElement("style");
|
||||
styleNode.textContent =
|
||||
"@counter-style triangle { symbols: b; } \n" +
|
||||
"@counter-style disc { system: extends triangle; } \n";
|
||||
|
||||
// NOTE: The bug goes away if you remove this trivial rule:
|
||||
styleNode.textContent += "ul {}";
|
||||
|
||||
document.getElementsByTagName("head")[0].appendChild(styleNode);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="go()">
|
||||
<ul><li><---That should be a 'b' character.
|
@ -1834,3 +1834,4 @@ test-pref(layout.css.grid.enabled,true) == 1053035-1-grid.html 1053035-1-ref.htm
|
||||
== 1059498-2.html 1059498-1-ref.html
|
||||
== 1059498-3.html 1059498-1-ref.html
|
||||
test-pref(dom.webcomponents.enabled,true) == 1066554-1.html 1066554-1-ref.html
|
||||
== 1069716-1.html 1069716-1-ref.html
|
||||
|
@ -704,9 +704,12 @@ nsChangeHint nsStyleList::CalcDifference(const nsStyleList& aOther) const
|
||||
if (mListStylePosition != aOther.mListStylePosition)
|
||||
return NS_STYLE_HINT_FRAMECHANGE;
|
||||
if (EqualImages(mListStyleImage, aOther.mListStyleImage) &&
|
||||
mListStyleType == aOther.mListStyleType) {
|
||||
if (mImageRegion.IsEqualInterior(aOther.mImageRegion))
|
||||
mCounterStyle == aOther.mCounterStyle) {
|
||||
if (mImageRegion.IsEqualInterior(aOther.mImageRegion)) {
|
||||
if (mListStyleType != aOther.mListStyleType)
|
||||
return nsChangeHint_NeutralChange;
|
||||
return NS_STYLE_HINT_NONE;
|
||||
}
|
||||
if (mImageRegion.width == aOther.mImageRegion.width &&
|
||||
mImageRegion.height == aOther.mImageRegion.height)
|
||||
return NS_STYLE_HINT_VISUAL;
|
||||
|
@ -1154,7 +1154,8 @@ struct nsStyleList {
|
||||
|
||||
nsChangeHint CalcDifference(const nsStyleList& aOther) const;
|
||||
static nsChangeHint MaxDifference() {
|
||||
return NS_STYLE_HINT_FRAMECHANGE;
|
||||
return NS_CombineHint(NS_STYLE_HINT_FRAMECHANGE,
|
||||
nsChangeHint_NeutralChange);
|
||||
}
|
||||
static nsChangeHint MaxDifferenceNeverInherited() {
|
||||
// CalcDifference never returns nsChangeHint_NeedReflow or
|
||||
|
Loading…
Reference in New Issue
Block a user