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:
dholbert%cs.stanford.edu 2008-03-14 07:21:20 +00:00
parent d5088707bf
commit 17fcef59bf
5 changed files with 65 additions and 1 deletions

View File

@ -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();

View 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>

View 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>

View 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>

View 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>