Bug 418766: Use width, not height, as a quick proxy for whether a line is empty. r+sr=roc, a=beltzner

This commit is contained in:
dholbert@cs.stanford.edu 2008-02-29 13:45:43 -08:00
Родитель 1586452eca
Коммит 828e13b8da
5 изменённых файлов: 30 добавлений и 1 удалений

Просмотреть файл

@ -1923,7 +1923,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.height == 0 && line->CachedIsEmpty();
PRBool isEmpty = line->mBounds.width == 0 && line->CachedIsEmpty();
if (maybeReflowingForFirstTime /*1*/ ||
(isEmpty || maybeWasEmpty) /*2/3/4*/) {
line.next()->MarkPreviousMarginDirty();

Просмотреть файл

@ -0,0 +1,5 @@
<html>
<body>
b
</body>
</html>

Просмотреть файл

@ -0,0 +1,16 @@
<html class="reftest-wait">
<head>
<script>
function boom()
{
var n = document.getElementById("editMe");
n.removeChild(n.firstChild);
document.documentElement.className = "";
}
</script>
</head>
<body onload="boom();">
<span id="editMe" style="margin-bottom: 1px;">a</span>
<div>b</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,6 @@
<html>
<body>
<span id="editMe" style="margin-bottom: 1px;"></span>
<div>b</div>
</body>
</html>

Просмотреть файл

@ -738,6 +738,8 @@ random == 403134-1.html 403134-1-ref.html # bug 405377
== 416106-1.xhtml 416106-1-ref.xhtml
== 416752-1.html 416752-1-ref.html
== 417676.html 417676-ref.html
== 418766-1a.html 418766-1-ref.html
== 418766-1b.html 418766-1-ref.html
== 419060.html 419060-ref.html
== 419531-1.html 419531-1-ref.html
== 420069-1.html 420069-1-ref.html