Bug 811173. Part 1: Allow nsDisplayBackgroundColor::GetBounds to enable snapping. r=roc
authorBas Schouten <bas@basschouten.com>
Tue, 13 Nov 2012 11:57:59 -0800
changeset 113198 f539adf0d8a9937c75c344e1faf76b8cdf4630c1
parent 113197 99b4b950c2ce79370d2c55434616fb3af89f52dc
child 113199 2b66b88a0b0f77ea7c5b2c5b0d580ce515dca65c
push idunknown
push userunknown
push dateunknown
reviewersroc
bugs811173
milestone19.0a1
Bug 811173. Part 1: Allow nsDisplayBackgroundColor::GetBounds to enable snapping. r=roc
browser/components/privatebrowsing/test/browser/global/browser_privatebrowsing_geoprompt.js
browser/components/privatebrowsing/test/browser/global/browser_privatebrowsing_geoprompt_page.html
browser/components/privatebrowsing/test/browser/global/browser_privatebrowsing_openlocation.js
browser/components/privatebrowsing/test/browser/global/browser_privatebrowsing_zoomrestore.js
layout/base/nsDisplayList.h
toolkit/system/windowsproxy/Makefile.in
toolkit/system/windowsproxy/nsWindowsSystemProxySettings.cpp
--- a/layout/base/nsDisplayList.h
+++ b/layout/base/nsDisplayList.h
@@ -1881,16 +1881,22 @@ public:
   virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx) MOZ_OVERRIDE;
   
   virtual nsRegion GetOpaqueRegion(nsDisplayListBuilder* aBuilder,
                                    bool* aSnap) MOZ_OVERRIDE;
   virtual bool IsUniform(nsDisplayListBuilder* aBuilder, nscolor* aColor) MOZ_OVERRIDE;
   virtual void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
                        HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames) MOZ_OVERRIDE;
 
+  virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap) MOZ_OVERRIDE
+  {
+    *aSnap = true;
+    return nsRect(ToReferenceFrame(), GetUnderlyingFrame()->GetSize());
+  }
+
   NS_DISPLAY_DECL_NAME("BackgroundColor", TYPE_BACKGROUND_COLOR)
 
   nscolor mColor;
 };
 
 /**
  * The standard display item to paint the outer CSS box-shadows of a frame.
  */