Bug 966510 - Scroll frame display items are never opaque. r=roc, a=sledru
authorTimothy Nikkel <tnikkel@gmail.com>
Mon, 10 Feb 2014 04:56:30 -0600
changeset 176281 4b2f78c2d884d5fdea7b5e1ef7acc9ddeedda08d
parent 176280 972f9b5f662442b57f9e27725c2acaabd83e74e2
child 176282 ce8d8b1b97a8213334d77e66b56bb98968e670ba
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, sledru
bugs966510, 951467
milestone28.0
Bug 966510 - Scroll frame display items are never opaque. r=roc, a=sledru The content they contain may be moved, so any region that is opaquely covered at paint time may not be later. This problem was made worse by bug 951467 because it made the bounds of the scroll layer item be the bounds of the scrollport is all cases (making it return wrong results even at paint time), instead of the bounds of the contained content (meaning the results would only be wrong after async scroll).
layout/base/nsDisplayList.h
--- a/layout/base/nsDisplayList.h
+++ b/layout/base/nsDisplayList.h
@@ -2724,16 +2724,22 @@ public:
   virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap) MOZ_OVERRIDE;
 
   virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
                                              LayerManager* aManager,
                                              const ContainerLayerParameters& aContainerParameters) MOZ_OVERRIDE;
 
   virtual bool ShouldBuildLayerEvenIfInvisible(nsDisplayListBuilder* aBuilder) MOZ_OVERRIDE;
 
+  virtual nsRegion GetOpaqueRegion(nsDisplayListBuilder* aBuilder,
+                                   bool* aSnap) MOZ_OVERRIDE {
+    *aSnap = false;
+    return nsRegion();
+  }
+
   virtual bool ComputeVisibility(nsDisplayListBuilder* aBuilder,
                                    nsRegion* aVisibleRegion,
                                    const nsRect& aAllowVisibleRegionExpansion) MOZ_OVERRIDE;
 
   virtual LayerState GetLayerState(nsDisplayListBuilder* aBuilder,
                                    LayerManager* aManager,
                                    const ContainerLayerParameters& aParameters) MOZ_OVERRIDE;