From 66ab7a96601f9459110751b473cfe630ec6bb09e Mon Sep 17 00:00:00 2001 From: Brindusan Cristian Date: Sat, 4 Apr 2020 00:47:08 +0300 Subject: [PATCH] Backed out 8 changesets (bug 1610731) for reftest failures at dynamic-toolbar-fixed-bottom-1.html. CLOSED TREE Backed out changeset a26b63d0248e (bug 1610731) Backed out changeset c33e6fe22774 (bug 1610731) Backed out changeset 840550c070e8 (bug 1610731) Backed out changeset 7bffd6eb9ac7 (bug 1610731) Backed out changeset a383a7100973 (bug 1610731) Backed out changeset 8f2bae2ca274 (bug 1610731) Backed out changeset 8d43fbe05f38 (bug 1610731) Backed out changeset 035432f43d16 (bug 1610731) --HG-- rename : layout/reftests/async-scrolling/dynamic-toolbar-sticky-top-1.html => layout/reftests/async-scrolling/dynamic-toolbar-fixed-bottom-1.html --- gfx/ipc/GfxMessageUtils.h | 25 ---- gfx/layers/LayerMetricsWrapper.h | 46 ++---- gfx/layers/apz/src/APZCTreeManager.cpp | 123 +++++++-------- gfx/layers/apz/src/APZCTreeManager.h | 32 +--- gfx/layers/apz/src/HitTestingTreeNode.cpp | 8 +- gfx/layers/apz/src/HitTestingTreeNode.h | 7 +- gfx/layers/wr/WebRenderScrollData.cpp | 1 - gfx/layers/wr/WebRenderScrollData.h | 40 ----- gfx/layers/wr/WebRenderScrollDataWrapper.h | 55 ++----- layout/painting/nsDisplayList.cpp | 140 +++++------------- layout/painting/nsDisplayList.h | 18 +-- ...ml => dynamic-toolbar-fixed-bottom-1.html} | 10 +- .../dynamic-toolbar-fixed-top-1-ref.html | 25 ---- .../dynamic-toolbar-sticky-bottom-1-ref.html | 29 ---- .../dynamic-toolbar-sticky-bottom-1.html | 41 ----- .../dynamic-toolbar-sticky-top-1-ref.html | 29 ---- .../dynamic-toolbar-sticky-top-1.html | 40 ----- layout/reftests/async-scrolling/reftest.list | 5 +- 18 files changed, 131 insertions(+), 543 deletions(-) rename layout/reftests/async-scrolling/{dynamic-toolbar-fixed-top-1.html => dynamic-toolbar-fixed-bottom-1.html} (67%) delete mode 100644 layout/reftests/async-scrolling/dynamic-toolbar-fixed-top-1-ref.html delete mode 100644 layout/reftests/async-scrolling/dynamic-toolbar-sticky-bottom-1-ref.html delete mode 100644 layout/reftests/async-scrolling/dynamic-toolbar-sticky-bottom-1.html delete mode 100644 layout/reftests/async-scrolling/dynamic-toolbar-sticky-top-1-ref.html delete mode 100644 layout/reftests/async-scrolling/dynamic-toolbar-sticky-top-1.html diff --git a/gfx/ipc/GfxMessageUtils.h b/gfx/ipc/GfxMessageUtils.h index ca59a3e86f04..3790d9460247 100644 --- a/gfx/ipc/GfxMessageUtils.h +++ b/gfx/ipc/GfxMessageUtils.h @@ -569,31 +569,6 @@ struct ParamTraits> { } }; -template -struct ParamTraits> { - typedef mozilla::gfx::RectAbsoluteTyped paramType; - - static void Write(Message* msg, const paramType& param) { - WriteParam(msg, param.Left()); - WriteParam(msg, param.Right()); - WriteParam(msg, param.Top()); - WriteParam(msg, param.Bottom()); - } - - static bool Read(const Message* msg, PickleIterator* iter, - paramType* result) { - auto l = result->Left(); - auto r = result->Right(); - auto t = result->Top(); - auto b = result->Bottom(); - - bool retVal = (ReadParam(msg, iter, &l) && ReadParam(msg, iter, &r) && - ReadParam(msg, iter, &t) && ReadParam(msg, iter, &b)); - result->SetBox(l, r, t, b); - return retVal; - } -}; - template struct ParamTraits> { typedef mozilla::gfx::IntRectTyped paramType; diff --git a/gfx/layers/LayerMetricsWrapper.h b/gfx/layers/LayerMetricsWrapper.h index 9bf45a6a55a0..59e71dbb59ec 100644 --- a/gfx/layers/LayerMetricsWrapper.h +++ b/gfx/layers/LayerMetricsWrapper.h @@ -409,58 +409,38 @@ class MOZ_STACK_CLASS LayerMetricsWrapper final { ScrollableLayerGuid::ViewID GetFixedPositionScrollContainerId() const { MOZ_ASSERT(IsValid()); - if (AtBottomLayer()) { - return mLayer->GetFixedPositionScrollContainerId(); - } - return ScrollableLayerGuid::NULL_SCROLL_ID; + // TODO: Restrict this only for AtBottomLayer. + return mLayer->GetFixedPositionScrollContainerId(); } SideBits GetFixedPositionSides() const { MOZ_ASSERT(IsValid()); - if (AtBottomLayer()) { - return mLayer->GetFixedPositionSides(); - } - return SideBits::eNone; + return mLayer->GetFixedPositionSides(); + } + + bool GetIsStickyPosition() const { + MOZ_ASSERT(IsValid()); + + return mLayer->GetIsStickyPosition(); } ScrollableLayerGuid::ViewID GetStickyScrollContainerId() const { MOZ_ASSERT(IsValid()); - if (AtBottomLayer() && mLayer->GetIsStickyPosition()) { - return mLayer->GetStickyScrollContainerId(); - } - return ScrollableLayerGuid::NULL_SCROLL_ID; + // TODO: Restrict this only for AtBottomLayer. + return mLayer->GetStickyScrollContainerId(); } const LayerRectAbsolute& GetStickyScrollRangeOuter() const { MOZ_ASSERT(IsValid()); - if (AtBottomLayer() && mLayer->GetIsStickyPosition()) { - return mLayer->GetStickyScrollRangeOuter(); - } - - static const LayerRectAbsolute empty; - return empty; + return mLayer->GetStickyScrollRangeOuter(); } - const LayerRectAbsolute& GetStickyScrollRangeInner() const { MOZ_ASSERT(IsValid()); - if (AtBottomLayer() && mLayer->GetIsStickyPosition()) { - return mLayer->GetStickyScrollRangeInner(); - } - - static const LayerRectAbsolute empty; - return empty; - } - - Maybe GetStickyPositionAnimationId() const { - MOZ_ASSERT(IsValid()); - // This function is only really needed for template-compatibility with - // WebRenderScrollDataWrapper. Although it will be called, the return - // value is not used. - return Nothing(); + return mLayer->GetStickyScrollRangeInner(); } Maybe GetZoomAnimationId() const { diff --git a/gfx/layers/apz/src/APZCTreeManager.cpp b/gfx/layers/apz/src/APZCTreeManager.cpp index c8daf66f722b..68ff1019f241 100644 --- a/gfx/layers/apz/src/APZCTreeManager.cpp +++ b/gfx/layers/apz/src/APZCTreeManager.cpp @@ -147,12 +147,16 @@ struct APZCTreeManager::TreeBuildingState { // codepath. Maybe mZoomAnimationId; - // See corresponding members of APZCTreeManager. These are the same thing, but - // on the tree-walking state. They are populated while walking the tree in - // a layers update, and then moved into APZCTreeManager. - std::vector mFixedPositionInfo; - std::vector mRootScrollbarInfo; - std::vector mStickyPositionInfo; + // This is populated with all the HitTestingTreeNodes that have a fixed + // position animation id (which indicates that they need to be sampled for + // WebRender on the sampler thread). + std::vector mFixedPositionNodesWithAnimationId; + + // This is populated with all the HitTestingTreeNodes that are scrollbar + // containers for the root viewport and have a scrollthumb animation id + // (which indicates that they need to be sampled for WebRender on the sampler + // thread). + std::vector mRootScrollbars; }; class APZCTreeManager::CheckerboardFlushObserver : public nsIObserver { @@ -473,23 +477,13 @@ APZCTreeManager::UpdateHitTestingTreeImpl(const ScrollNode& aRoot, state.mScrollThumbs.push_back(node); } else if (node->IsScrollbarContainerNode()) { // Only scrollbar containers for the root have an animation id. - state.mRootScrollbarInfo.emplace_back( - *(node->GetScrollbarAnimationId()), - node->GetScrollbarDirection()); + state.mRootScrollbars.push_back(node); } } // GetFixedPositionAnimationId is only set when webrender is enabled. if (node->GetFixedPositionAnimationId().isSome()) { - state.mFixedPositionInfo.emplace_back( - *(node->GetFixedPositionAnimationId()), - node->GetFixedPosSides()); - } - // GetStickyPositionAnimationId is only set when webrender is enabled. - if (node->GetStickyPositionAnimationId().isSome()) { - state.mStickyPositionInfo.emplace_back( - *(node->GetStickyPositionAnimationId()), - node->GetFixedPosSides()); + state.mFixedPositionNodesWithAnimationId.push_back(node); } if (apzc && node->IsPrimaryHolder()) { state.mScrollTargets[apzc->GetGuid()] = node; @@ -636,9 +630,26 @@ APZCTreeManager::UpdateHitTestingTreeImpl(const ScrollNode& aRoot, target->IsAncestorOf(thumb)); } - mRootScrollbarInfo = std::move(state.mRootScrollbarInfo); - mFixedPositionInfo = std::move(state.mFixedPositionInfo); - mStickyPositionInfo = std::move(state.mStickyPositionInfo); + mRootScrollbarInfo.clear(); + // For non-webrender, and platforms without a dynamic toolbar, + // state.mRootScrollbarsWithAnimationId will be empty so this will be a + // no-op. + for (const HitTestingTreeNode* scrollbar : state.mRootScrollbars) { + MOZ_ASSERT(scrollbar->IsScrollbarContainerNode()); + mRootScrollbarInfo.emplace_back(*(scrollbar->GetScrollbarAnimationId()), + scrollbar->GetScrollbarDirection()); + } + + mFixedPositionInfo.clear(); + // For non-webrender, state.mFixedPositionNodesWithAnimationId will be empty + // so this will be a no-op. + for (HitTestingTreeNode* fixedPos : + state.mFixedPositionNodesWithAnimationId) { + MOZ_ASSERT(fixedPos->GetFixedPositionAnimationId().isSome()); + mFixedPositionInfo.emplace_back( + fixedPos->GetFixedPositionAnimationId().value(), + fixedPos->GetFixedPosSides()); + } } for (size_t i = 0; i < state.mNodesToDestroy.Length(); i++) { @@ -817,8 +828,7 @@ void APZCTreeManager::SampleForWebRender( if (info.mScrollDirection == ScrollDirection::eHorizontal) { ScreenPoint translation = AsyncCompositionManager::ComputeFixedMarginsOffset( - GetCompositorFixedLayerMargins(), SideBits::eBottom, - ScreenMargin()); + mCompositorFixedLayerMargins, SideBits::eBottom, ScreenMargin()); LayerToParentLayerMatrix4x4 transform = LayerToParentLayerMatrix4x4::Translation(ViewAs( @@ -832,7 +842,7 @@ void APZCTreeManager::SampleForWebRender( for (const FixedPositionInfo& info : mFixedPositionInfo) { ScreenPoint translation = AsyncCompositionManager::ComputeFixedMarginsOffset( - GetCompositorFixedLayerMargins(), info.mFixedPosSides, + mCompositorFixedLayerMargins, info.mFixedPosSides, mGeckoFixedLayerMargins); LayerToParentLayerMatrix4x4 transform = @@ -843,23 +853,6 @@ void APZCTreeManager::SampleForWebRender( wr::ToWrTransformProperty(info.mFixedPositionAnimationId, transform)); } - for (const StickyPositionInfo& info : mStickyPositionInfo) { - ScreenPoint translation = - AsyncCompositionManager::ComputeFixedMarginsOffset( - GetCompositorFixedLayerMargins(), info.mFixedPosSides, - // For sticky layers, we don't need to factor - // mGeckoFixedLayerMargins because Gecko doesn't shift the - // position of sticky elements for dynamic toolbar movements. - ScreenMargin()); - - LayerToParentLayerMatrix4x4 transform = - LayerToParentLayerMatrix4x4::Translation(ViewAs( - translation, PixelCastJustification::ScreenIsParentLayerForRoot)); - - transforms.AppendElement( - wr::ToWrTransformProperty(info.mStickyPositionAnimationId, transform)); - } - aTxn.AppendTransformProperties(transforms); // Advance animations. It's important that this happens after @@ -1200,10 +1193,14 @@ HitTestingTreeNode* APZCTreeManager::PrepareNodeForLayer( node->SetFixedPosData(aLayer.GetFixedPositionScrollContainerId(), aLayer.GetFixedPositionSides(), aLayer.GetFixedPositionAnimationId()); - node->SetStickyPosData(aLayer.GetStickyScrollContainerId(), - aLayer.GetStickyScrollRangeOuter(), - aLayer.GetStickyScrollRangeInner(), - aLayer.GetStickyPositionAnimationId()); + if (aLayer.GetIsStickyPosition()) { + node->SetStickyPosData(aLayer.GetStickyScrollContainerId(), + aLayer.GetStickyScrollRangeOuter(), + aLayer.GetStickyScrollRangeInner()); + } else { + node->SetStickyPosData(ScrollableLayerGuid::NULL_SCROLL_ID, + LayerRectAbsolute(), LayerRectAbsolute()); + } return node; } @@ -1430,10 +1427,14 @@ HitTestingTreeNode* APZCTreeManager::PrepareNodeForLayer( node->SetFixedPosData(aLayer.GetFixedPositionScrollContainerId(), aLayer.GetFixedPositionSides(), aLayer.GetFixedPositionAnimationId()); - node->SetStickyPosData(aLayer.GetStickyScrollContainerId(), - aLayer.GetStickyScrollRangeOuter(), - aLayer.GetStickyScrollRangeInner(), - aLayer.GetStickyPositionAnimationId()); + if (aLayer.GetIsStickyPosition()) { + node->SetStickyPosData(aLayer.GetStickyScrollContainerId(), + aLayer.GetStickyScrollRangeOuter(), + aLayer.GetStickyScrollRangeInner()); + } else { + node->SetStickyPosData(ScrollableLayerGuid::NULL_SCROLL_ID, + LayerRectAbsolute(), LayerRectAbsolute()); + } return node; } @@ -2103,7 +2104,7 @@ APZEventResult APZCTreeManager::ProcessTouchInput(MultiTouchInput& aInput) { MutexAutoLock lock(mMapLock); touchData.mScreenPoint -= RoundedToInt(AsyncCompositionManager::ComputeFixedMarginsOffset( - GetCompositorFixedLayerMargins(), mFixedPosSidesForInputBlock, + mCompositorFixedLayerMargins, mFixedPosSidesForInputBlock, mGeckoFixedLayerMargins)); } } @@ -3391,7 +3392,7 @@ Maybe APZCTreeManager::ConvertToGecko( MutexAutoLock mapLock(mMapLock); *geckoPoint -= RoundedToInt(AsyncCompositionManager::ComputeFixedMarginsOffset( - GetCompositorFixedLayerMargins(), mFixedPosSidesForInputBlock, + mCompositorFixedLayerMargins, mFixedPosSidesForInputBlock, mGeckoFixedLayerMargins)); } } @@ -3465,8 +3466,8 @@ bool APZCTreeManager::IsStuckToRootContentAtBottom( return false; } - // We support the dynamic toolbar at top and bottom. - if ((aNode->GetFixedPosSides() & SideBits::eTopBottom) == SideBits::eNone) { + // Currently we only support the dyanmic toolbar at bottom. + if ((aNode->GetFixedPosSides() & SideBits::eBottom) == SideBits::eNone) { return false; } @@ -3561,7 +3562,7 @@ LayerToParentLayerMatrix4x4 APZCTreeManager::ComputeTransformForNode( MutexAutoLock mapLock(mMapLock); translation = ViewAs( AsyncCompositionManager::ComputeFixedMarginsOffset( - GetCompositorFixedLayerMargins(), aNode->GetFixedPosSides(), + mCompositorFixedLayerMargins, aNode->GetFixedPosSides(), mGeckoFixedLayerMargins), PixelCastJustification::ScreenIsParentLayerForRoot); } @@ -3574,8 +3575,8 @@ LayerToParentLayerMatrix4x4 APZCTreeManager::ComputeTransformForNode( MutexAutoLock mapLock(mMapLock); translation = ViewAs( AsyncCompositionManager::ComputeFixedMarginsOffset( - GetCompositorFixedLayerMargins(), - aNode->GetFixedPosSides() & SideBits::eTopBottom, + mCompositorFixedLayerMargins, + aNode->GetFixedPosSides() & SideBits::eBottom, // For sticky layers, we don't need to factor // mGeckoFixedLayerMargins because Gecko doesn't shift the // position of sticky elements for dynamic toolbar movements. @@ -3624,16 +3625,6 @@ already_AddRefed APZCTreeManager::GetContentController( return controller.forget(); } -ScreenMargin APZCTreeManager::GetCompositorFixedLayerMargins() const { - RecursiveMutexAutoLock lock(mTreeLock); - ScreenMargin result = mCompositorFixedLayerMargins; - if (StaticPrefs::apz_fixed_margin_override_enabled()) { - result.top = StaticPrefs::apz_fixed_margin_override_top(); - result.bottom = StaticPrefs::apz_fixed_margin_override_bottom(); - } - return result; -} - bool APZCTreeManager::GetAPZTestData(LayersId aLayersId, APZTestData* aOutData) { AssertOnUpdaterThread(); diff --git a/gfx/layers/apz/src/APZCTreeManager.h b/gfx/layers/apz/src/APZCTreeManager.h index ad20a5b7a78e..e0ff8e20f9d9 100644 --- a/gfx/layers/apz/src/APZCTreeManager.h +++ b/gfx/layers/apz/src/APZCTreeManager.h @@ -766,8 +766,6 @@ class APZCTreeManager : public IAPZCTreeManager, public APZInputBridge { const MutexAutoLock& aProofOfMapLock, ClippedCompositionBoundsMap& aDestMap, ScrollableLayerGuid aGuid); - ScreenMargin GetCompositorFixedLayerMargins() const; - protected: /* The input queue where input events are held until we know enough to * figure out where they're going. Protected so gtests can access it. @@ -818,8 +816,8 @@ class APZCTreeManager : public IAPZCTreeManager, public APZInputBridge { */ bool mUsingAsyncZoomContainer; - /** A lock that protects mApzcMap, mScrollThumbInfo, mRootScrollbarInfo, - * mFixedPositionInfo, and mStickyPositionInfo. + /** A lock that protects mApzcMap, mScrollThumbInfo, mRootScrollbarInfo, and + * mFixedPositionInfo. */ mutable mozilla::Mutex mMapLock; @@ -935,32 +933,6 @@ class APZCTreeManager : public IAPZCTreeManager, public APZInputBridge { */ std::vector mFixedPositionInfo; - /** - * A helper structure to store all the information needed to compute the - * async transform for a sticky position element on the sampler thread. - */ - struct StickyPositionInfo { - uint64_t mStickyPositionAnimationId; - SideBits mFixedPosSides; - - StickyPositionInfo(const uint64_t& aStickyPositionAnimationId, - const SideBits aFixedPosSides) - : mStickyPositionAnimationId(aStickyPositionAnimationId), - mFixedPosSides(aFixedPosSides) {} - }; - /** - * If this APZCTreeManager is being used with WebRender, this vector gets - * populated during a layers update. It holds a package of information needed - * to compute and set the async transforms on sticky position content. This - * information is extracted from the HitTestingTreeNodes for the WebRender - * case because accessing the HitTestingTreeNodes requires holding the tree - * lock which we cannot do on the WR sampler thread. mStickyPositionInfo, - * however, can be accessed while just holding the mMapLock which is safe to - * do on the sampler thread. mMapLock must be acquired while accessing or - * modifying mStickyPositionInfo. - */ - std::vector mStickyPositionInfo; - /* Holds the zoom constraints for scrollable layers, as determined by the * the main-thread gecko code. This can only be accessed on the updater * thread. */ diff --git a/gfx/layers/apz/src/HitTestingTreeNode.cpp b/gfx/layers/apz/src/HitTestingTreeNode.cpp index ce657221d7b6..49dba56ca0d3 100644 --- a/gfx/layers/apz/src/HitTestingTreeNode.cpp +++ b/gfx/layers/apz/src/HitTestingTreeNode.cpp @@ -177,12 +177,10 @@ void HitTestingTreeNode::SetPrevSibling(HitTestingTreeNode* aSibling) { void HitTestingTreeNode::SetStickyPosData( ScrollableLayerGuid::ViewID aStickyPosTarget, const LayerRectAbsolute& aScrollRangeOuter, - const LayerRectAbsolute& aScrollRangeInner, - const Maybe& aStickyPositionAnimationId) { + const LayerRectAbsolute& aScrollRangeInner) { mStickyPosTarget = aStickyPosTarget; mStickyScrollRangeOuter = aScrollRangeOuter; mStickyScrollRangeInner = aScrollRangeInner; - mStickyPositionAnimationId = aStickyPositionAnimationId; } ScrollableLayerGuid::ViewID HitTestingTreeNode::GetStickyPosTarget() const { @@ -197,10 +195,6 @@ const LayerRectAbsolute& HitTestingTreeNode::GetStickyScrollRangeInner() const { return mStickyScrollRangeInner; } -Maybe HitTestingTreeNode::GetStickyPositionAnimationId() const { - return mStickyPositionAnimationId; -} - void HitTestingTreeNode::MakeRoot() { mParent = nullptr; diff --git a/gfx/layers/apz/src/HitTestingTreeNode.h b/gfx/layers/apz/src/HitTestingTreeNode.h index 17233ff75516..0e9b2fac7185 100644 --- a/gfx/layers/apz/src/HitTestingTreeNode.h +++ b/gfx/layers/apz/src/HitTestingTreeNode.h @@ -136,12 +136,10 @@ class HitTestingTreeNode { /* Sticky pos info */ void SetStickyPosData(ScrollableLayerGuid::ViewID aStickyPosTarget, const LayerRectAbsolute& aScrollRangeOuter, - const LayerRectAbsolute& aScrollRangeInner, - const Maybe& aStickyPositionAnimationId); + const LayerRectAbsolute& aScrollRangeInner); ScrollableLayerGuid::ViewID GetStickyPosTarget() const; const LayerRectAbsolute& GetStickyScrollRangeOuter() const; const LayerRectAbsolute& GetStickyScrollRangeInner() const; - Maybe GetStickyPositionAnimationId() const; /* Convert |aPoint| into the LayerPixel space for the layer corresponding to * this node. |aTransform| is the complete (content + async) transform for @@ -207,9 +205,6 @@ class HitTestingTreeNode { ScrollableLayerGuid::ViewID mStickyPosTarget; LayerRectAbsolute mStickyScrollRangeOuter; LayerRectAbsolute mStickyScrollRangeInner; - // This is only set if WebRender is enabled. It holds the animation id that - // we use to adjust sticky position content for the toolbar. - Maybe mStickyPositionAnimationId; /* Let {L,M} be the {layer, scrollable metrics} pair that this node * corresponds to in the layer tree. mEventRegions contains the event regions diff --git a/gfx/layers/wr/WebRenderScrollData.cpp b/gfx/layers/wr/WebRenderScrollData.cpp index 35d4db557322..6b97881e5e01 100644 --- a/gfx/layers/wr/WebRenderScrollData.cpp +++ b/gfx/layers/wr/WebRenderScrollData.cpp @@ -23,7 +23,6 @@ WebRenderLayerScrollData::WebRenderLayerScrollData() mEventRegionsOverride(EventRegionsOverride::NoOverride), mFixedPositionSides(mozilla::SideBits::eNone), mFixedPosScrollContainerId(ScrollableLayerGuid::NULL_SCROLL_ID), - mStickyPosScrollContainerId(ScrollableLayerGuid::NULL_SCROLL_ID), mRenderRoot(wr::RenderRoot::Default) {} WebRenderLayerScrollData::~WebRenderLayerScrollData() = default; diff --git a/gfx/layers/wr/WebRenderScrollData.h b/gfx/layers/wr/WebRenderScrollData.h index 309ceb89aad1..e4e6c14ca845 100644 --- a/gfx/layers/wr/WebRenderScrollData.h +++ b/gfx/layers/wr/WebRenderScrollData.h @@ -124,34 +124,6 @@ class WebRenderLayerScrollData final { return mFixedPosScrollContainerId; } - void SetStickyPositionScrollContainerId(ScrollableLayerGuid::ViewID aId) { - mStickyPosScrollContainerId = aId; - } - ScrollableLayerGuid::ViewID GetStickyPositionScrollContainerId() const { - return mStickyPosScrollContainerId; - } - - void SetStickyScrollRangeOuter(const LayerRectAbsolute& scrollRange) { - mStickyScrollRangeOuter = scrollRange; - } - const LayerRectAbsolute& GetStickyScrollRangeOuter() const { - return mStickyScrollRangeOuter; - } - - void SetStickyScrollRangeInner(const LayerRectAbsolute& scrollRange) { - mStickyScrollRangeInner = scrollRange; - } - const LayerRectAbsolute& GetStickyScrollRangeInner() const { - return mStickyScrollRangeInner; - } - - void SetStickyPositionAnimationId(const uint64_t& aId) { - mStickyPositionAnimationId = Some(aId); - } - Maybe GetStickyPositionAnimationId() const { - return mStickyPositionAnimationId; - } - wr::RenderRoot GetRenderRoot() { return mRenderRoot; } void SetZoomAnimationId(const uint64_t& aId) { mZoomAnimationId = Some(aId); } @@ -199,10 +171,6 @@ class WebRenderLayerScrollData final { Maybe mFixedPositionAnimationId; SideBits mFixedPositionSides; ScrollableLayerGuid::ViewID mFixedPosScrollContainerId; - ScrollableLayerGuid::ViewID mStickyPosScrollContainerId; - LayerRectAbsolute mStickyScrollRangeOuter; - LayerRectAbsolute mStickyScrollRangeInner; - Maybe mStickyPositionAnimationId; wr::RenderRoot mRenderRoot; Maybe mZoomAnimationId; Maybe mAsyncZoomContainerId; @@ -306,10 +274,6 @@ struct ParamTraits { WriteParam(aMsg, aParam.mFixedPositionAnimationId); WriteParam(aMsg, aParam.mFixedPositionSides); WriteParam(aMsg, aParam.mFixedPosScrollContainerId); - WriteParam(aMsg, aParam.mStickyPosScrollContainerId); - WriteParam(aMsg, aParam.mStickyScrollRangeOuter); - WriteParam(aMsg, aParam.mStickyScrollRangeInner); - WriteParam(aMsg, aParam.mStickyPositionAnimationId); WriteParam(aMsg, aParam.mRenderRoot); WriteParam(aMsg, aParam.mZoomAnimationId); WriteParam(aMsg, aParam.mAsyncZoomContainerId); @@ -331,10 +295,6 @@ struct ParamTraits { ReadParam(aMsg, aIter, &aResult->mFixedPositionAnimationId) && ReadParam(aMsg, aIter, &aResult->mFixedPositionSides) && ReadParam(aMsg, aIter, &aResult->mFixedPosScrollContainerId) && - ReadParam(aMsg, aIter, &aResult->mStickyPosScrollContainerId) && - ReadParam(aMsg, aIter, &aResult->mStickyScrollRangeOuter) && - ReadParam(aMsg, aIter, &aResult->mStickyScrollRangeInner) && - ReadParam(aMsg, aIter, &aResult->mStickyPositionAnimationId) && ReadParam(aMsg, aIter, &aResult->mRenderRoot) && ReadParam(aMsg, aIter, &aResult->mZoomAnimationId) && ReadParam(aMsg, aIter, &aResult->mAsyncZoomContainerId); diff --git a/gfx/layers/wr/WebRenderScrollDataWrapper.h b/gfx/layers/wr/WebRenderScrollDataWrapper.h index 1f681a7cff0f..18d46858a1f2 100644 --- a/gfx/layers/wr/WebRenderScrollDataWrapper.h +++ b/gfx/layers/wr/WebRenderScrollDataWrapper.h @@ -304,69 +304,46 @@ class MOZ_STACK_CLASS WebRenderScrollDataWrapper final { Maybe GetFixedPositionAnimationId() const { MOZ_ASSERT(IsValid()); - - if (AtBottomLayer()) { - return mLayer->GetFixedPositionAnimationId(); - } - return Nothing(); + return mLayer->GetFixedPositionAnimationId(); } ScrollableLayerGuid::ViewID GetFixedPositionScrollContainerId() const { MOZ_ASSERT(IsValid()); - - if (AtBottomLayer()) { - return mLayer->GetFixedPositionScrollContainerId(); - } - return ScrollableLayerGuid::NULL_SCROLL_ID; + return mLayer->GetFixedPositionScrollContainerId(); } SideBits GetFixedPositionSides() const { MOZ_ASSERT(IsValid()); + return mLayer->GetFixedPositionSides(); + } - if (AtBottomLayer()) { - return mLayer->GetFixedPositionSides(); - } - return SideBits::eNone; + bool GetIsStickyPosition() const { + MOZ_ASSERT(IsValid()); + + // TODO: Bug 1610731 Implement this for WebRender. + return false; } ScrollableLayerGuid::ViewID GetStickyScrollContainerId() const { MOZ_ASSERT(IsValid()); - if (AtBottomLayer()) { - return mLayer->GetStickyPositionScrollContainerId(); - } + // TODO: Bug 1610731 Implement this for WebRender. return ScrollableLayerGuid::NULL_SCROLL_ID; } const LayerRectAbsolute& GetStickyScrollRangeOuter() const { MOZ_ASSERT(IsValid()); + static const LayerRectAbsolute dummy; - if (AtBottomLayer()) { - return mLayer->GetStickyScrollRangeOuter(); - } - - static const LayerRectAbsolute empty; - return empty; + // TODO: Bug 1610731 Implement this for WebRender. + return dummy; } - const LayerRectAbsolute& GetStickyScrollRangeInner() const { MOZ_ASSERT(IsValid()); + static const LayerRectAbsolute dummy; - if (AtBottomLayer()) { - return mLayer->GetStickyScrollRangeInner(); - } - - static const LayerRectAbsolute empty; - return empty; - } - - Maybe GetStickyPositionAnimationId() const { - MOZ_ASSERT(IsValid()); - - if (AtBottomLayer()) { - return mLayer->GetStickyPositionAnimationId(); - } - return Nothing(); + // TODO: Bug 1610731 Implement this for WebRender. + return dummy; } Maybe GetZoomAnimationId() const { diff --git a/layout/painting/nsDisplayList.cpp b/layout/painting/nsDisplayList.cpp index 43a9c20d1666..3baafc4da4ab 100644 --- a/layout/painting/nsDisplayList.cpp +++ b/layout/painting/nsDisplayList.cpp @@ -6873,12 +6873,13 @@ bool nsDisplayOwnLayer::IsScrollbarContainer() const { layers::ScrollbarLayerType::Container; } -bool nsDisplayOwnLayer::IsRootScrollbarContainer() const { +bool nsDisplayOwnLayer::IsRootScrollbarContainerWithDynamicToolbar() const { if (!IsScrollbarContainer()) { return false; } return mFrame->PresContext()->IsRootContentDocumentCrossProcess() && + mFrame->PresContext()->HasDynamicToolbar() && mScrollbarData.mTargetViewId == nsLayoutUtils::ScrollIdForRootScrollFrame(mFrame->PresContext()); } @@ -6891,20 +6892,6 @@ bool nsDisplayOwnLayer::IsFixedPositionLayer() const { return GetType() == DisplayItemType::TYPE_FIXED_POSITION; } -bool nsDisplayOwnLayer::IsStickyPositionLayer() const { - return GetType() == DisplayItemType::TYPE_STICKY_POSITION; -} - -bool nsDisplayOwnLayer::HasDynamicToolbar() const { - if (!mFrame->PresContext()->IsRootContentDocumentCrossProcess()) { - return false; - } - return mFrame->PresContext()->HasDynamicToolbar() || - // For tests on Android, this pref is set to simulate the dynamic - // toolbar - StaticPrefs::apz_fixed_margin_override_enabled(); -} - // nsDisplayOpacity uses layers for rendering already_AddRefed nsDisplayOwnLayer::BuildLayer( nsDisplayListBuilder* aBuilder, LayerManager* aManager, @@ -6930,11 +6917,10 @@ bool nsDisplayOwnLayer::CreateWebRenderCommands( const StackingContextHelper& aSc, RenderRootStateManager* aManager, nsDisplayListBuilder* aDisplayListBuilder) { Maybe prop; - bool needsProp = aManager->LayerManager()->AsyncPanZoomEnabled() && - (IsScrollThumbLayer() || IsZoomingLayer() || - (IsFixedPositionLayer() && HasDynamicToolbar()) || - (IsStickyPositionLayer() && HasDynamicToolbar()) || - (IsRootScrollbarContainer() && HasDynamicToolbar())); + bool needsProp = + aManager->LayerManager()->AsyncPanZoomEnabled() && + (IsScrollThumbLayer() || IsZoomingLayer() || IsFixedPositionLayer() || + IsRootScrollbarContainerWithDynamicToolbar()); if (needsProp) { // APZ is enabled and this is a scroll thumb or zooming layer, so we need @@ -6972,11 +6958,8 @@ bool nsDisplayOwnLayer::CreateWebRenderCommands( bool nsDisplayOwnLayer::UpdateScrollData( mozilla::layers::WebRenderScrollData* aData, mozilla::layers::WebRenderLayerScrollData* aLayerData) { - bool isRelevantToApz = - (IsScrollThumbLayer() || IsScrollbarContainer() || IsZoomingLayer() || - (IsFixedPositionLayer() && HasDynamicToolbar()) || - (IsStickyPositionLayer() && HasDynamicToolbar())); - + bool isRelevantToApz = (IsScrollThumbLayer() || IsScrollbarContainer() || + IsZoomingLayer() || IsFixedPositionLayer()); if (!isRelevantToApz) { return false; } @@ -6990,21 +6973,16 @@ bool nsDisplayOwnLayer::UpdateScrollData( return true; } - if (IsFixedPositionLayer() && HasDynamicToolbar()) { + if (IsFixedPositionLayer()) { aLayerData->SetFixedPositionAnimationId(mWrAnimationId); return true; } - if (IsStickyPositionLayer() && HasDynamicToolbar()) { - aLayerData->SetStickyPositionAnimationId(mWrAnimationId); - return true; - } - MOZ_ASSERT(IsScrollbarContainer() || IsScrollThumbLayer()); aLayerData->SetScrollbarData(mScrollbarData); - if (IsRootScrollbarContainer() && HasDynamicToolbar()) { + if (IsRootScrollbarContainerWithDynamicToolbar()) { aLayerData->SetScrollbarAnimationId(mWrAnimationId); return true; } @@ -7346,8 +7324,7 @@ bool nsDisplayFixedPosition::UpdateScrollData( } aLayerData->SetFixedPositionScrollContainerId(GetScrollTargetId()); } - nsDisplayOwnLayer::UpdateScrollData(aData, aLayerData); - return true; + return nsDisplayOwnLayer::UpdateScrollData(aData, aLayerData) | true; } void nsDisplayFixedPosition::WriteDebugInfo(std::stringstream& aStream) { @@ -7467,11 +7444,23 @@ already_AddRefed nsDisplayStickyPosition::BuildLayer( stickyScrollContainer->ScrollFrame()->GetScrolledFrame()->GetContent()); float factor = presContext->AppUnitsPerDevPixel(); - LayerRectAbsolute stickyOuter; - LayerRectAbsolute stickyInner; - CalculateLayerScrollRanges( - stickyScrollContainer, factor, aContainerParameters.mXScale, - aContainerParameters.mYScale, stickyOuter, stickyInner); + nsRectAbsolute outer; + nsRectAbsolute inner; + stickyScrollContainer->GetScrollRanges(mFrame, &outer, &inner); + LayerRectAbsolute stickyOuter( + NSAppUnitsToFloatPixels(outer.X(), factor) * aContainerParameters.mXScale, + NSAppUnitsToFloatPixels(outer.Y(), factor) * aContainerParameters.mYScale, + NSAppUnitsToFloatPixels(outer.XMost(), factor) * + aContainerParameters.mXScale, + NSAppUnitsToFloatPixels(outer.YMost(), factor) * + aContainerParameters.mYScale); + LayerRectAbsolute stickyInner( + NSAppUnitsToFloatPixels(inner.X(), factor) * aContainerParameters.mXScale, + NSAppUnitsToFloatPixels(inner.Y(), factor) * aContainerParameters.mYScale, + NSAppUnitsToFloatPixels(inner.XMost(), factor) * + aContainerParameters.mXScale, + NSAppUnitsToFloatPixels(inner.YMost(), factor) * + aContainerParameters.mYScale); layer->SetStickyPositionData(scrollId, stickyOuter, stickyInner); return layer.forget(); @@ -7491,7 +7480,11 @@ static nscoord DistanceToRange(nscoord min, nscoord max) { return 0; } -StickyScrollContainer* nsDisplayStickyPosition::GetStickyScrollContainer() { +bool nsDisplayStickyPosition::CreateWebRenderCommands( + mozilla::wr::DisplayListBuilder& aBuilder, + mozilla::wr::IpcResourceUpdateQueue& aResources, + const StackingContextHelper& aSc, RenderRootStateManager* aManager, + nsDisplayListBuilder* aDisplayListBuilder) { StickyScrollContainer* stickyScrollContainer = StickyScrollContainer::GetStickyScrollContainerForFrame(mFrame); if (stickyScrollContainer) { @@ -7511,15 +7504,6 @@ StickyScrollContainer* nsDisplayStickyPosition::GetStickyScrollContainer() { stickyScrollContainer = nullptr; } } - return stickyScrollContainer; -} - -bool nsDisplayStickyPosition::CreateWebRenderCommands( - mozilla::wr::DisplayListBuilder& aBuilder, - mozilla::wr::IpcResourceUpdateQueue& aResources, - const StackingContextHelper& aSc, RenderRootStateManager* aManager, - nsDisplayListBuilder* aDisplayListBuilder) { - StickyScrollContainer* stickyScrollContainer = GetStickyScrollContainer(); Maybe saccHelper; @@ -7655,7 +7639,7 @@ bool nsDisplayStickyPosition::CreateWebRenderCommands( wr::WrStackingContextClip::ClipChain(aBuilder.CurrentClipChainId()); StackingContextHelper sc(aSc, GetActiveScrolledRoot(), mFrame, this, aBuilder, params); - nsDisplayOwnLayer::CreateWebRenderCommands(aBuilder, aResources, sc, + nsDisplayWrapList::CreateWebRenderCommands(aBuilder, aResources, sc, aManager, aDisplayListBuilder); } @@ -7666,62 +7650,6 @@ bool nsDisplayStickyPosition::CreateWebRenderCommands( return true; } -void nsDisplayStickyPosition::CalculateLayerScrollRanges( - StickyScrollContainer* aStickyScrollContainer, float aAppUnitsPerDevPixel, - float aScaleX, float aScaleY, LayerRectAbsolute& aStickyOuter, - LayerRectAbsolute& aStickyInner) { - nsRectAbsolute outer; - nsRectAbsolute inner; - aStickyScrollContainer->GetScrollRanges(mFrame, &outer, &inner); - aStickyOuter.SetBox( - NSAppUnitsToFloatPixels(outer.X(), aAppUnitsPerDevPixel) * aScaleX, - NSAppUnitsToFloatPixels(outer.Y(), aAppUnitsPerDevPixel) * aScaleY, - NSAppUnitsToFloatPixels(outer.XMost(), aAppUnitsPerDevPixel) * aScaleX, - NSAppUnitsToFloatPixels(outer.YMost(), aAppUnitsPerDevPixel) * aScaleY); - aStickyInner.SetBox( - NSAppUnitsToFloatPixels(inner.X(), aAppUnitsPerDevPixel) * aScaleX, - NSAppUnitsToFloatPixels(inner.Y(), aAppUnitsPerDevPixel) * aScaleY, - NSAppUnitsToFloatPixels(inner.XMost(), aAppUnitsPerDevPixel) * aScaleX, - NSAppUnitsToFloatPixels(inner.YMost(), aAppUnitsPerDevPixel) * aScaleY); -} - -bool nsDisplayStickyPosition::UpdateScrollData( - mozilla::layers::WebRenderScrollData* aData, - mozilla::layers::WebRenderLayerScrollData* aLayerData) { - bool hasDynamicToolbar = HasDynamicToolbar(); - if (aLayerData && hasDynamicToolbar) { - StickyScrollContainer* stickyScrollContainer = GetStickyScrollContainer(); - if (stickyScrollContainer) { - float auPerDevPixel = mFrame->PresContext()->AppUnitsPerDevPixel(); - float cumulativeResolution = - mFrame->PresShell()->GetCumulativeResolution(); - LayerRectAbsolute stickyOuter; - LayerRectAbsolute stickyInner; - CalculateLayerScrollRanges(stickyScrollContainer, auPerDevPixel, - cumulativeResolution, cumulativeResolution, - stickyOuter, stickyInner); - aLayerData->SetStickyScrollRangeOuter(stickyOuter); - aLayerData->SetStickyScrollRangeInner(stickyInner); - - SideBits sides = - nsLayoutUtils::GetSideBitsForFixedPositionContent(mFrame); - aLayerData->SetFixedPositionSides(sides); - - ViewID scrollId = - nsLayoutUtils::FindOrCreateIDFor(stickyScrollContainer->ScrollFrame() - ->GetScrolledFrame() - ->GetContent()); - aLayerData->SetStickyPositionScrollContainerId(scrollId); - } - } - // Return true if either there is a dynamic toolbar affecting this sticky - // item or the OwnLayer base implementation returns true for some other - // reason. - bool ret = hasDynamicToolbar; - ret |= nsDisplayOwnLayer::UpdateScrollData(aData, aLayerData); - return ret; -} - nsDisplayScrollInfoLayer::nsDisplayScrollInfoLayer( nsDisplayListBuilder* aBuilder, nsIFrame* aScrolledFrame, nsIFrame* aScrollFrame, const CompositorHitTestInfo& aHitInfo, diff --git a/layout/painting/nsDisplayList.h b/layout/painting/nsDisplayList.h index e2a070e024de..a95d3acd9fce 100644 --- a/layout/painting/nsDisplayList.h +++ b/layout/painting/nsDisplayList.h @@ -49,7 +49,6 @@ #include "nsAutoLayoutPhase.h" #include "nsDisplayItemTypes.h" #include "RetainedDisplayListHelpers.h" -#include "Units.h" #include #include "nsTHashtable.h" @@ -78,7 +77,6 @@ class TransformReferenceBox; namespace mozilla { class FrameLayerBuilder; class PresShell; -class StickyScrollContainer; namespace layers { struct FrameMetrics; class RenderRootStateManager; @@ -6100,11 +6098,9 @@ class nsDisplayOwnLayer : public nsDisplayWrapList { nsDisplayOwnLayerFlags GetFlags() { return mFlags; } bool IsScrollThumbLayer() const; bool IsScrollbarContainer() const; - bool IsRootScrollbarContainer() const; + bool IsRootScrollbarContainerWithDynamicToolbar() const; bool IsZoomingLayer() const; bool IsFixedPositionLayer() const; - bool IsStickyPositionLayer() const; - bool HasDynamicToolbar() const; protected: nsDisplayOwnLayerFlags mFlags; @@ -6239,23 +6235,11 @@ class nsDisplayStickyPosition : public nsDisplayOwnLayer { mozilla::layers::RenderRootStateManager* aManager, nsDisplayListBuilder* aDisplayListBuilder) override; - bool UpdateScrollData( - mozilla::layers::WebRenderScrollData* aData, - mozilla::layers::WebRenderLayerScrollData* aLayerData) override; - const ActiveScrolledRoot* GetContainerASR() const { return mContainerASR; } private: NS_DISPLAY_ALLOW_CLONING() - void CalculateLayerScrollRanges( - mozilla::StickyScrollContainer* aStickyScrollContainer, - float aAppUnitsPerDevPixel, float aScaleX, float aScaleY, - mozilla::LayerRectAbsolute& aStickyOuter, - mozilla::LayerRectAbsolute& aStickyInner); - - mozilla::StickyScrollContainer* GetStickyScrollContainer(); - // This stores the ASR that this sticky container item would have assuming it // has no fixed descendants. This may be the same as the ASR returned by // GetActiveScrolledRoot(), or it may be a descendant of that. diff --git a/layout/reftests/async-scrolling/dynamic-toolbar-fixed-top-1.html b/layout/reftests/async-scrolling/dynamic-toolbar-fixed-bottom-1.html similarity index 67% rename from layout/reftests/async-scrolling/dynamic-toolbar-fixed-top-1.html rename to layout/reftests/async-scrolling/dynamic-toolbar-fixed-bottom-1.html index 6123371f5fa3..c7faa3f72aca 100644 --- a/layout/reftests/async-scrolling/dynamic-toolbar-fixed-top-1.html +++ b/layout/reftests/async-scrolling/dynamic-toolbar-fixed-bottom-1.html @@ -1,15 +1,15 @@ @@ -25,7 +25,7 @@ html { width: 100%; height: 200px; position: fixed; - top: 0; + bottom: 0; background: red; } diff --git a/layout/reftests/async-scrolling/dynamic-toolbar-fixed-top-1-ref.html b/layout/reftests/async-scrolling/dynamic-toolbar-fixed-top-1-ref.html deleted file mode 100644 index 0fe473de2add..000000000000 --- a/layout/reftests/async-scrolling/dynamic-toolbar-fixed-top-1-ref.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - -
-
- - diff --git a/layout/reftests/async-scrolling/dynamic-toolbar-sticky-bottom-1-ref.html b/layout/reftests/async-scrolling/dynamic-toolbar-sticky-bottom-1-ref.html deleted file mode 100644 index 8ff44978127f..000000000000 --- a/layout/reftests/async-scrolling/dynamic-toolbar-sticky-bottom-1-ref.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - -
-
-
- - diff --git a/layout/reftests/async-scrolling/dynamic-toolbar-sticky-bottom-1.html b/layout/reftests/async-scrolling/dynamic-toolbar-sticky-bottom-1.html deleted file mode 100644 index b401ff21dbb2..000000000000 --- a/layout/reftests/async-scrolling/dynamic-toolbar-sticky-bottom-1.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - -
-
-
- - diff --git a/layout/reftests/async-scrolling/dynamic-toolbar-sticky-top-1-ref.html b/layout/reftests/async-scrolling/dynamic-toolbar-sticky-top-1-ref.html deleted file mode 100644 index f9bc7b6ea225..000000000000 --- a/layout/reftests/async-scrolling/dynamic-toolbar-sticky-top-1-ref.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - -
-
-
- - diff --git a/layout/reftests/async-scrolling/dynamic-toolbar-sticky-top-1.html b/layout/reftests/async-scrolling/dynamic-toolbar-sticky-top-1.html deleted file mode 100644 index 1952a9c08658..000000000000 --- a/layout/reftests/async-scrolling/dynamic-toolbar-sticky-top-1.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - -
-
-
- - diff --git a/layout/reftests/async-scrolling/reftest.list b/layout/reftests/async-scrolling/reftest.list index 5b83a0124b30..04f0c101323c 100644 --- a/layout/reftests/async-scrolling/reftest.list +++ b/layout/reftests/async-scrolling/reftest.list @@ -98,7 +98,4 @@ fuzzy-if(!webrender,111-112,600-600) pref(apz.allow_zooming,true) == async-scrol # for this test, apz.allow_zooming is needed to ensure we take the containerless scrolling codepath that creates # an async zoom container (since we are testing a regression in that codepath) -skip-if(!Android) pref(apz.allow_zooming,true) test-pref(apz.fixed-margin-override.enabled,true) test-pref(apz.fixed-margin-override.bottom,50) == dynamic-toolbar-fixed-bottom-1.html dynamic-toolbar-fixed-bottom-1-ref.html -skip-if(!Android) pref(apz.allow_zooming,true) test-pref(apz.fixed-margin-override.enabled,true) test-pref(apz.fixed-margin-override.bottom,50) == dynamic-toolbar-sticky-bottom-1.html dynamic-toolbar-sticky-bottom-1-ref.html -skip-if(!Android) pref(apz.allow_zooming,true) test-pref(apz.fixed-margin-override.enabled,true) test-pref(apz.fixed-margin-override.top,50) == dynamic-toolbar-fixed-top-1.html dynamic-toolbar-fixed-top-1-ref.html -skip-if(!Android) pref(apz.allow_zooming,true) test-pref(apz.fixed-margin-override.enabled,true) test-pref(apz.fixed-margin-override.top,50) fails-if(geckoview&&!webrender) == dynamic-toolbar-sticky-top-1.html dynamic-toolbar-sticky-top-1-ref.html # bug 1627326 for geckoview&&!webrender +skip-if(!Android) pref(apz.allow_zooming,true) test-pref(apz.fixed-margin-override.enabled,true) test-pref(apz.fixed-margin-override.bottom,50) fails-if(geckoview&&webrender) == dynamic-toolbar-fixed-bottom-1.html dynamic-toolbar-fixed-bottom-1-ref.html