Bug 1455285 - In MoveScrollbarForLayerMargin(), move the actual scrollbar thumb layer, not the scrollbar container layer. r=kats
authorBotond Ballo <botond@mozilla.com>
Thu, 19 Apr 2018 15:58:44 -0400
changeset 468209 6817a2e394941fa5b46426dc2abde06232062e01
parent 468208 9bb64b4e34ce2ec456f4e6084a7b358e5ca500e0
child 468210 0e471630583f6d4f8f6dd24c826b92095b1041fc
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1455285, 1420512
milestone61.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 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
gfx/layers/composite/AsyncCompositionManager.cpp
--- 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