Bug 810876. Don't double-count the size of our placeholder when determining the overflow area for an image frame. r=mattwoodrow
authorBoris Zbarsky <bzbarsky@mit.edu>
Wed, 14 Nov 2012 10:05:41 -0800
changeset 113249 f288b8d014e8b7ab26f261f46c12d8172fea33d8
parent 113248 5f0036778492a1d31e1c8331e4d48ab0e44f38e7
child 113250 6fd28026e07282311d547d05e8c648c40c8dc5e9
push id18031
push userbzbarsky@mozilla.com
push dateWed, 14 Nov 2012 18:05:56 +0000
treeherdermozilla-inbound@7c24b8d92e1c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs810876
milestone19.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 810876. Don't double-count the size of our placeholder when determining the overflow area for an image frame. r=mattwoodrow
layout/generic/nsImageFrame.cpp
--- a/layout/generic/nsImageFrame.cpp
+++ b/layout/generic/nsImageFrame.cpp
@@ -897,18 +897,18 @@ nsImageFrame::Reflow(nsPresContext*     
   // Determine if the size is available
   bool haveSize = false;
   if (loadStatus & imgIRequest::STATUS_SIZE_AVAILABLE) {
     haveSize = true;
   }
 
   if (!imageOK || !haveSize) {
     nsRect altFeedbackSize(0, 0,
-                           2*(nsPresContext::CSSPixelsToAppUnits(ICON_SIZE+ICON_PADDING+ALT_BORDER_WIDTH)),
-                           2*(nsPresContext::CSSPixelsToAppUnits(ICON_SIZE+ICON_PADDING+ALT_BORDER_WIDTH)));
+                           nsPresContext::CSSPixelsToAppUnits(ICON_SIZE+2*(ICON_PADDING+ALT_BORDER_WIDTH)),
+                           nsPresContext::CSSPixelsToAppUnits(ICON_SIZE+2*(ICON_PADDING+ALT_BORDER_WIDTH)));
     aMetrics.mOverflowAreas.UnionAllWith(altFeedbackSize);
   }
   FinishAndStoreOverflow(&aMetrics);
 
   NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS,
                   ("exit nsImageFrame::Reflow: size=%d,%d",
                   aMetrics.width, aMetrics.height));
   NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aMetrics);