Bug 832341 - Use the correct border area (rather than the canvas area) when computing the bounds of an nsDisplayCanvasBackgroundImage. r=roc, a=lsblakk
authorMatt Woodrow <mwoodrow@mozilla.com>
Wed, 30 Jan 2013 18:07:29 +1300
changeset 127479 f3b09048d33d1dbbba031301e3dd144f7d66e1ed
parent 127478 8755cbf3acc5c4de9119370a46051f01eb0c402c
child 127480 b7d82407581667c8b22387118ea14aff7aa132b6
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, lsblakk
bugs832341
milestone20.0a2
Bug 832341 - Use the correct border area (rather than the canvas area) when computing the bounds of an nsDisplayCanvasBackgroundImage. r=roc, a=lsblakk
layout/base/nsDisplayList.cpp
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -2173,20 +2173,16 @@ nsDisplayBackgroundImage::GetBoundsInter
     return r + ToReferenceFrame();
   }
 
   if (!mBackgroundStyle) {
     return nsRect();
   }
 
   nsRect borderBox = nsRect(ToReferenceFrame(), mFrame->GetSize());
-  if (mFrame->GetType() == nsGkAtoms::canvasFrame) {
-    nsCanvasFrame* frame = static_cast<nsCanvasFrame*>(mFrame);
-    borderBox = frame->CanvasArea() + ToReferenceFrame();
-  }
   const nsStyleBackground::Layer& layer = mBackgroundStyle->mLayers[mLayer];
   return nsCSSRendering::GetBackgroundLayerRect(presContext, mFrame,
                                                 borderBox, *mBackgroundStyle, layer);
 }
 
 uint32_t
 nsDisplayBackgroundImage::GetPerFrameKey()
 {