Bug 1501342 - In ProcessDisplayItems(), handle the case where scrollMetadataASR and mContainerScrollMetadataASR are in different branches of the ASR tree. r=mstange
authorBotond Ballo <botond@mozilla.com>
Fri, 30 Nov 2018 02:02:48 +0000
changeset 505332 a96e2090fc20e98393d6b365b30f0283f8481849
parent 505331 2f0e92d76c4e96fe66f0aab96075c22b3692f116
child 505333 68db1bda769f81d14f2f8dbf3112dab8df9772a5
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1501342
milestone65.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 1501342 - In ProcessDisplayItems(), handle the case where scrollMetadataASR and mContainerScrollMetadataASR are in different branches of the ASR tree. r=mstange Differential Revision: https://phabricator.services.mozilla.com/D13346
layout/painting/FrameLayerBuilder.cpp
--- a/layout/painting/FrameLayerBuilder.cpp
+++ b/layout/painting/FrameLayerBuilder.cpp
@@ -5140,18 +5140,20 @@ ContainerState::ProcessDisplayItems(nsDi
         // something more sophisticated here.
         mPaintedLayerDataTree.AddingOwnLayer(
           itemAGR, &itemVisibleRect, uniformColorPtr);
       }
 
       ContainerLayerParameters params = mParameters;
       params.mBackgroundColor = uniformColor;
       params.mLayerCreationHint = GetLayerCreationHint(itemAGR);
-      params.mScrollMetadataASR = ActiveScrolledRoot::PickDescendant(
-        mContainerScrollMetadataASR, scrollMetadataASR);
+      params.mScrollMetadataASR =
+        ActiveScrolledRoot::IsAncestor(scrollMetadataASR, mContainerScrollMetadataASR)
+          ? mContainerScrollMetadataASR
+          : scrollMetadataASR;
       params.mCompositorASR =
         params.mScrollMetadataASR != mContainerScrollMetadataASR
           ? params.mScrollMetadataASR
           : mContainerCompositorASR;
       if (itemType == DisplayItemType::TYPE_FIXED_POSITION) {
         params.mCompositorASR = itemASR;
       }