Bug 831780. Only count the broken-image placeholder in the visual overflow, not the scrollable overflow. r=mattwoodrow

This commit is contained in:
Boris Zbarsky
2013-01-17 23:17:41 -05:00
parent 4bb94ab657
commit dda01249c9
3 changed files with 39 additions and 1 deletions

View File

@@ -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);