Bug 1251527 - Don't override visible regions for background-attachment:fixed. r=mstange
authorMatt Woodrow <mwoodrow@mozilla.com>
Wed, 09 Mar 2016 17:35:48 +1300
changeset 287444 735e3eec00ad6386ece71b32c4297e11f6a84ad9
parent 287443 4158b3cae082c3c47fab540ca421a14669c57400
child 287445 ce12c108f9c4294c51ccb9df1a1b6b124e1ce003
push id30068
push usercbook@mozilla.com
push dateWed, 09 Mar 2016 10:46:58 +0000
treeherdermozilla-central@af7c0cb0798f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1251527
milestone48.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 1251527 - Don't override visible regions for background-attachment:fixed. r=mstange
layout/base/nsDisplayList.cpp
layout/base/nsDisplayList.h
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -3081,23 +3081,16 @@ nsDisplayBackgroundImage::GetBoundsInter
 
 uint32_t
 nsDisplayBackgroundImage::GetPerFrameKey()
 {
   return (mLayer << nsDisplayItem::TYPE_BITS) |
     nsDisplayItem::GetPerFrameKey();
 }
 
-void
-nsDisplayBackgroundImage::MarkBoundsAsVisible(nsDisplayListBuilder* aBuilder)
-{
-  bool snap;
-  mVisibleRect = GetBounds(aBuilder, &snap);
-}
-
 nsDisplayThemedBackground::nsDisplayThemedBackground(nsDisplayListBuilder* aBuilder,
                                                      nsIFrame* aFrame)
   : nsDisplayItem(aBuilder, aFrame)
 {
   MOZ_COUNT_CTOR(nsDisplayThemedBackground);
 
   const nsStyleDisplay* disp = mFrame->StyleDisplay();
   mAppearance = disp->mAppearance;
@@ -4766,17 +4759,16 @@ nsDisplayFixedPosition::CreateForFixedBa
                                                  nsIFrame* aFrame,
                                                  nsDisplayBackgroundImage* aImage,
                                                  uint32_t aIndex)
 {
   // Clear clipping on the child item, since we will apply it to the
   // fixed position item as well.
   aImage->SetClip(aBuilder, DisplayItemClip());
   aImage->SetScrollClip(nullptr);
-  aImage->MarkBoundsAsVisible(aBuilder);
 
   nsDisplayList temp;
   temp.AppendToTop(aImage);
 
   return new (aBuilder) nsDisplayFixedPosition(aBuilder, aFrame, &temp, aIndex + 1);
 }
 
 
--- a/layout/base/nsDisplayList.h
+++ b/layout/base/nsDisplayList.h
@@ -2725,18 +2725,16 @@ public:
   virtual void ConfigureLayer(ImageLayer* aLayer,
                               const ContainerLayerParameters& aParameters) override;
 
   static nsRegion GetInsideClipRegion(nsDisplayItem* aItem, uint8_t aClip,
                                       const nsRect& aRect);
 
   virtual bool ShouldFixToViewport(nsDisplayListBuilder* aBuilder) override;
 
-  void MarkBoundsAsVisible(nsDisplayListBuilder* aBuilder);
-
 protected:
   typedef class mozilla::layers::ImageContainer ImageContainer;
   typedef class mozilla::layers::ImageLayer ImageLayer;
 
   bool TryOptimizeToImageLayer(LayerManager* aManager, nsDisplayListBuilder* aBuilder);
   bool IsSingleFixedPositionImage(nsDisplayListBuilder* aBuilder,
                                   const nsRect& aClipRect,
                                   gfxRect* aDestRect);