Bug 421239: Remove broken/brittle optimization of guessing (incorrectly) whether a line might be empty, when we're determining whether we need to mark next line's margin as dirty. r+sr=roc, a=blocking1.9+
git-svn-id: svn://10.0.0.236/trunk@247801 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
d5088707bf
commit
17fcef59bf
@ -1918,7 +1918,7 @@ nsBlockFrame::ReflowDirtyLines(nsBlockReflowState& aState)
|
||||
// to the result of nextLine->ShouldApplyTopMargin.
|
||||
if (line.next() != end_lines()) {
|
||||
PRBool maybeWasEmpty = oldY == line.next()->mBounds.y;
|
||||
PRBool isEmpty = line->mBounds.width == 0 && line->CachedIsEmpty();
|
||||
PRBool isEmpty = line->CachedIsEmpty();
|
||||
if (maybeReflowingForFirstTime /*1*/ ||
|
||||
(isEmpty || maybeWasEmpty) /*2/3/4*/) {
|
||||
line.next()->MarkPreviousMarginDirty();
|
||||
|
||||
12
mozilla/layout/reftests/bugs/421239-1-ref.html
Normal file
12
mozilla/layout/reftests/bugs/421239-1-ref.html
Normal file
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
div#a { margin: 100px 0px 100px 0px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="a"></div>
|
||||
<div>b</div>
|
||||
</body>
|
||||
</html>
|
||||
20
mozilla/layout/reftests/bugs/421239-1.html
Normal file
20
mozilla/layout/reftests/bugs/421239-1.html
Normal file
@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<style>
|
||||
div#a { margin: 100px 0px 100px 0px; }
|
||||
</style>
|
||||
<script>
|
||||
function boom()
|
||||
{
|
||||
var a = document.getElementById("a");
|
||||
a.removeChild(a.firstChild);
|
||||
document.documentElement.className = "";
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="boom();">
|
||||
<div id="a">a</div>
|
||||
<div>b</div>
|
||||
</body>
|
||||
</html>
|
||||
12
mozilla/layout/reftests/bugs/421239-2-ref.html
Normal file
12
mozilla/layout/reftests/bugs/421239-2-ref.html
Normal file
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
div#a { margin: 0px 0px 100px 0px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="a"></div>
|
||||
<div>b</div>
|
||||
</body>
|
||||
</html>
|
||||
20
mozilla/layout/reftests/bugs/421239-2.html
Normal file
20
mozilla/layout/reftests/bugs/421239-2.html
Normal file
@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<style>
|
||||
div#a { margin: 0px 0px 100px 0px; }
|
||||
</style>
|
||||
<script>
|
||||
function boom()
|
||||
{
|
||||
var a = document.getElementById("a");
|
||||
a.removeChild(a.firstChild);
|
||||
document.documentElement.className = "";
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="boom();">
|
||||
<div id="a">a</div>
|
||||
<div>b</div>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
x
Reference in New Issue
Block a user