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

--HG--
extra : rebase_source : 25bc732e4216dbb1971bec57421e20698126f8f2
This commit is contained in:
Botond Ballo 2018-04-19 15:58:44 -04:00
Родитель ca319705c4
Коммит 26b8507766
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -758,7 +758,8 @@ MoveScrollbarForLayerMargin(Layer* aRoot, FrameMetrics::ViewID aRootScrollId,
// 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);
});