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 +