Bug 1478304 - Ensure Layer::GetFixedPositionScrollContainerId() returns NULL_SCROLL_ID for layers that are not fixed. r=kats
authorBotond Ballo <botond@mozilla.com>
Sat, 20 Oct 2018 01:02:50 +0000
changeset 490565 ebf726d7d48ddc01f847a43baf3a606ce6ad2429
parent 490564 e1daa7729f92b1b5597f7d41d76c823296f2939d
child 490566 4a875561b1ae1ceb0c3e0dcbea14ee46abb9725d
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewerskats
bugs1478304
milestone64.0a1
Bug 1478304 - Ensure Layer::GetFixedPositionScrollContainerId() returns NULL_SCROLL_ID for layers that are not fixed. r=kats Differential Revision: https://phabricator.services.mozilla.com/D9327
gfx/layers/LayerAttributes.h
--- a/gfx/layers/LayerAttributes.h
+++ b/gfx/layers/LayerAttributes.h
@@ -342,17 +342,17 @@ public:
     return mTransformIsPerspective;
   }
 
   const Maybe<LayerClip>& GetScrolledClip() const {
     return mScrolledClip;
   }
 
   FrameMetrics::ViewID GetFixedPositionScrollContainerId() const {
-    return mFixedPositionData
+    return (mIsFixedPosition && mFixedPositionData)
            ? mFixedPositionData->mScrollId
            : FrameMetrics::NULL_SCROLL_ID;
   }
 
   LayerPoint GetFixedPositionAnchor() const {
     return mFixedPositionData ? mFixedPositionData->mAnchor : LayerPoint();
   }