Bug 1455285 - In MoveScrollbarForLayerMargin(), move the actual scrollbar thumb layer, not the scrollbar container layer. r=kats
This was regressed by
bug 1420512, which changed things so that
ScrollbarData::mDirection is set for both kinds of scrollbar layers.
MozReview-Commit-ID: 3UHFSOgDtWj
--- a/gfx/layers/composite/AsyncCompositionManager.cpp
+++ b/gfx/layers/composite/AsyncCompositionManager.cpp
@@ -753,17 +753,18 @@ MoveScrollbarForLayerMargin(Layer* aRoot
const ScreenMargin& aFixedLayerMargins)
{
// See bug 1223928 comment 9 - once we can detect the RCD with just the
// isRootContent flag on the metrics, we can probably move this code into
// ApplyAsyncTransformToScrollbar rather than having it as a separate
// adjustment on the layer tree.
Layer* scrollbar = BreadthFirstSearch<ReverseIterator>(aRoot,
[aRootScrollId](Layer* aNode) {
- return (aNode->GetScrollbarData().mDirection.isSome() &&
+ return (aNode->GetScrollbarData().IsThumb() &&
+ aNode->GetScrollbarData().mDirection.isSome() &&
*aNode->GetScrollbarData().mDirection == ScrollDirection::eHorizontal &&
aNode->GetScrollbarData().mTargetViewId == aRootScrollId);
});
if (scrollbar) {
// Shift the horizontal scrollbar down into the new space exposed by the
// dynamic toolbar hiding. Technically we should also scale the vertical
// scrollbar a bit to expand into the new space but it's not as noticeable
// and it would add a lot more complexity, so we're going with the "it's not