diff --git a/layout/generic/nsImageFrame.cpp b/layout/generic/nsImageFrame.cpp index 962f1f2a93a0..7a60b620b640 100644 --- a/layout/generic/nsImageFrame.cpp +++ b/layout/generic/nsImageFrame.cpp @@ -905,7 +905,12 @@ nsImageFrame::Reflow(nsPresContext* aPresContext, nsRect altFeedbackSize(0, 0, nsPresContext::CSSPixelsToAppUnits(ICON_SIZE+2*(ICON_PADDING+ALT_BORDER_WIDTH)), nsPresContext::CSSPixelsToAppUnits(ICON_SIZE+2*(ICON_PADDING+ALT_BORDER_WIDTH))); - aMetrics.mOverflowAreas.UnionAllWith(altFeedbackSize); + // We include the altFeedbackSize in our visual overflow, but not in our + // scrollable overflow, since it doesn't really need to be scrolled to + // outside the image. + MOZ_STATIC_ASSERT(eOverflowType_LENGTH == 2, "Unknown overflow types?"); + nsRect& visualOverflow = aMetrics.VisualOverflow(); + visualOverflow.UnionRect(visualOverflow, altFeedbackSize); } FinishAndStoreOverflow(&aMetrics); diff --git a/layout/generic/test/Makefile.in b/layout/generic/test/Makefile.in index 63e4b493a069..7f1a70ba81d0 100644 --- a/layout/generic/test/Makefile.in +++ b/layout/generic/test/Makefile.in @@ -104,6 +104,7 @@ MOCHITEST_FILES = \ test_bug784410.html \ test_bug785324.html \ test_bug791616.html \ + test_bug831780.html \ $(NULL) MOCHITEST_CHROME_FILES = \ diff --git a/layout/generic/test/test_bug831780.html b/layout/generic/test/test_bug831780.html new file mode 100644 index 000000000000..1173d8e03008 --- /dev/null +++ b/layout/generic/test/test_bug831780.html @@ -0,0 +1,32 @@ + + + + + + Test for Bug 831780 + + + + +Mozilla Bug 831780 +

+ + +

+ +
+
+ + +