diff --git a/mozilla/layout/generic/nsFrame.cpp b/mozilla/layout/generic/nsFrame.cpp index b208fe92bf7..d2e50fc8f1b 100644 --- a/mozilla/layout/generic/nsFrame.cpp +++ b/mozilla/layout/generic/nsFrame.cpp @@ -5296,6 +5296,14 @@ nsIFrame::GetOverflowAreaProperty(PRBool aCreateIfNecessary) return nsnull; } +inline PRBool +IsInlineFrame(nsIFrame *aFrame) +{ + nsIAtom *type = aFrame->GetType(); + return type == nsGkAtoms::inlineFrame || + type == nsGkAtoms::positionedInlineFrame; +} + void nsIFrame::FinishAndStoreOverflow(nsRect* aOverflowArea, nsSize aNewSize) { @@ -5321,8 +5329,11 @@ nsIFrame::FinishAndStoreOverflow(nsRect* aOverflowArea, nsSize aNewSize) // Overflow area must always include the frame's top-left and bottom-right, // even if the frame rect is empty. - aOverflowArea->UnionRectIncludeEmpty(*aOverflowArea, - nsRect(nsPoint(0, 0), aNewSize)); + // Pending a real fix for bug 426879, don't do this for inline frames + // with zero width. + if (aNewSize.width != 0 || !IsInlineFrame(this)) + aOverflowArea->UnionRectIncludeEmpty(*aOverflowArea, + nsRect(nsPoint(0, 0), aNewSize)); PRBool geometricOverflow = aOverflowArea->x < 0 || aOverflowArea->y < 0 || diff --git a/mozilla/layout/reftests/bugs/424236-10-ref.html b/mozilla/layout/reftests/bugs/424236-10-ref.html new file mode 100644 index 00000000000..8fe303e9ea8 --- /dev/null +++ b/mozilla/layout/reftests/bugs/424236-10-ref.html @@ -0,0 +1,18 @@ + + +
+