Bug 393655: Fix undetected cases of lines going empty --> nonempty, due to margins. r+sr=roc, a=blocking1.9+
git-svn-id: svn://10.0.0.236/trunk@239470 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
a590f22934
commit
93565a18cc
@ -1901,7 +1901,7 @@ nsBlockFrame::ReflowDirtyLines(nsBlockReflowState& aState)
|
||||
// it wasn't empty before, any adjacency and clearance changes are irrelevant
|
||||
// to the result of nextLine->ShouldApplyTopMargin.
|
||||
if (line.next() != end_lines()) {
|
||||
PRBool maybeWasEmpty = oldY == oldYMost;
|
||||
PRBool maybeWasEmpty = oldY == line.next()->mBounds.y;
|
||||
PRBool isEmpty = line->mBounds.height == 0 && line->CachedIsEmpty();
|
||||
if (maybeReflowingForFirstTime /*1*/ ||
|
||||
(isEmpty || maybeWasEmpty) /*2/3/4*/) {
|
||||
|
||||
9
mozilla/layout/reftests/bugs/393655-3-ref.html
Normal file
9
mozilla/layout/reftests/bugs/393655-3-ref.html
Normal file
@ -0,0 +1,9 @@
|
||||
<html>
|
||||
<body>
|
||||
Foo
|
||||
<div id="editMe" style="margin-bottom: 50px;">
|
||||
a
|
||||
</div>
|
||||
<div>Bar</div>
|
||||
</body>
|
||||
</html>
|
||||
17
mozilla/layout/reftests/bugs/393655-3.html
Normal file
17
mozilla/layout/reftests/bugs/393655-3.html
Normal file
@ -0,0 +1,17 @@
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<script>
|
||||
function tweak() {
|
||||
var editMe = document.getElementById('editMe');
|
||||
editMe.innerHTML="a";
|
||||
document.documentElement.className = "";
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="tweak()">
|
||||
Foo
|
||||
<div id="editMe" style="margin-bottom: 50px;">
|
||||
</div>
|
||||
<div>Bar</div>
|
||||
</body>
|
||||
</html>
|
||||
9
mozilla/layout/reftests/bugs/393655-4-ref.html
Normal file
9
mozilla/layout/reftests/bugs/393655-4-ref.html
Normal file
@ -0,0 +1,9 @@
|
||||
<html>
|
||||
<body>
|
||||
Foo
|
||||
<div id="editMe" style="margin-top: 50px;">
|
||||
a
|
||||
</div>
|
||||
<div>Bar</div>
|
||||
</body>
|
||||
</html>
|
||||
17
mozilla/layout/reftests/bugs/393655-4.html
Normal file
17
mozilla/layout/reftests/bugs/393655-4.html
Normal file
@ -0,0 +1,17 @@
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<script>
|
||||
function tweak() {
|
||||
var editMe = document.getElementById('editMe');
|
||||
editMe.innerHTML="a";
|
||||
document.documentElement.className = "";
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="tweak()">
|
||||
Foo
|
||||
<div id="editMe" style="margin-top: 50px;">
|
||||
</div>
|
||||
<div>Bar</div>
|
||||
</body>
|
||||
</html>
|
||||
9
mozilla/layout/reftests/bugs/393655-5-ref.html
Normal file
9
mozilla/layout/reftests/bugs/393655-5-ref.html
Normal file
@ -0,0 +1,9 @@
|
||||
<html>
|
||||
<body>
|
||||
Foo
|
||||
<div id="editMe" style="margin-bottom: 50px; margin-top: 50px;">
|
||||
a
|
||||
</div>
|
||||
<div>Bar</div>
|
||||
</body>
|
||||
</html>
|
||||
17
mozilla/layout/reftests/bugs/393655-5.html
Normal file
17
mozilla/layout/reftests/bugs/393655-5.html
Normal file
@ -0,0 +1,17 @@
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<script>
|
||||
function tweak() {
|
||||
var editMe = document.getElementById('editMe');
|
||||
editMe.innerHTML="a";
|
||||
document.documentElement.className = "";
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="tweak()">
|
||||
Foo
|
||||
<div id="editMe" style="margin-bottom: 50px; margin-top: 50px;">
|
||||
</div>
|
||||
<div>Bar</div>
|
||||
</body>
|
||||
</html>
|
||||
@ -418,8 +418,11 @@ fails == 386310-1d.html 386310-1-ref.html
|
||||
== 393330-1.html 393330-1-ref.html
|
||||
== 393517-1.xhtml about:blank # crash test
|
||||
== 393649-1.html 393649-1-ref.html
|
||||
fails == 393655-1.html 393655-1-ref.html # Remove 'fails' when 393655 lands
|
||||
fails == 393655-2.html 393655-2-ref.html # Remove 'fails' when 393655 lands
|
||||
== 393655-1.html 393655-1-ref.html
|
||||
== 393655-2.html 393655-2-ref.html
|
||||
== 393655-3.html 393655-3-ref.html
|
||||
== 393655-4.html 393655-4-ref.html
|
||||
== 393655-5.html 393655-5-ref.html
|
||||
== 393671-1.html 393671-1-ref.html
|
||||
== 393671-2.html 393671-2-ref.html
|
||||
== 393671-3.html 393671-3-ref.html
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user