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 @@ + + + +Testcase, overflow on empty spans + + + +
+
text
+
+ + diff --git a/mozilla/layout/reftests/bugs/424236-10.html b/mozilla/layout/reftests/bugs/424236-10.html new file mode 100644 index 00000000000..b4f56c7d099 --- /dev/null +++ b/mozilla/layout/reftests/bugs/424236-10.html @@ -0,0 +1,21 @@ + + + +Testcase, overflow on empty spans + + + +
+ + + text +
+ + diff --git a/mozilla/layout/reftests/bugs/reftest.list b/mozilla/layout/reftests/bugs/reftest.list index 24e67e5f724..ecdefa43eee 100644 --- a/mozilla/layout/reftests/bugs/reftest.list +++ b/mozilla/layout/reftests/bugs/reftest.list @@ -783,4 +783,5 @@ fails == 413027-3.html 413027-3-ref.html == 424074-1.xul 424074-1-ref.xul != 424074-1.xul 424074-1-ref2.xul fails-if(MOZ_WIDGET_TOOLKIT=="gtk2") == 424074-1-ref2.xul 424074-1-ref3.xul +== 424236-10.html 424236-10-ref.html == 424631-1.html 424631-1-ref.html