diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index 8abd928ce55..c6166d8d9d5 100644 --- a/layout/generic/nsBlockFrame.cpp +++ b/layout/generic/nsBlockFrame.cpp @@ -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(); diff --git a/layout/reftests/bugs/418766-1-ref.html b/layout/reftests/bugs/418766-1-ref.html new file mode 100644 index 00000000000..a205c5a4950 --- /dev/null +++ b/layout/reftests/bugs/418766-1-ref.html @@ -0,0 +1,5 @@ + + + b + + diff --git a/layout/reftests/bugs/418766-1a.html b/layout/reftests/bugs/418766-1a.html new file mode 100644 index 00000000000..4187b8b10ac --- /dev/null +++ b/layout/reftests/bugs/418766-1a.html @@ -0,0 +1,16 @@ + + + + + + a +
b
+ + diff --git a/layout/reftests/bugs/418766-1b.html b/layout/reftests/bugs/418766-1b.html new file mode 100644 index 00000000000..ded8ea9eded --- /dev/null +++ b/layout/reftests/bugs/418766-1b.html @@ -0,0 +1,6 @@ + + + +
b
+ + diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list index 50a9a837492..8bd9cae87ed 100644 --- a/layout/reftests/bugs/reftest.list +++ b/layout/reftests/bugs/reftest.list @@ -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