| Index: third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
|
| diff --git a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
|
| index 55967dcecf10982defa3dcdc4920bf1a23ca3aa1..970e26a12dd3a76062c2a489a7c45ecbf0bbde5c 100644
|
| --- a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
|
| +++ b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
|
| @@ -339,8 +339,7 @@
|
|
|
| static std::unique_ptr<WebScrollbarLayer> createScrollbarLayer(
|
| Scrollbar& scrollbar,
|
| - float deviceScaleFactor,
|
| - WebLayer* scrollLayer) {
|
| + float deviceScaleFactor) {
|
| ScrollbarTheme& theme = scrollbar.theme();
|
| WebScrollbarThemePainter painter(theme, scrollbar, deviceScaleFactor);
|
| std::unique_ptr<WebScrollbarThemeGeometry> geometry(
|
| @@ -350,13 +349,11 @@
|
| if (theme.usesOverlayScrollbars() && theme.usesNinePatchThumbResource()) {
|
| scrollbarLayer =
|
| Platform::current()->compositorSupport()->createOverlayScrollbarLayer(
|
| - WebScrollbarImpl::create(&scrollbar), painter, std::move(geometry),
|
| - scrollLayer);
|
| + WebScrollbarImpl::create(&scrollbar), painter, std::move(geometry));
|
| } else {
|
| scrollbarLayer =
|
| Platform::current()->compositorSupport()->createScrollbarLayer(
|
| - WebScrollbarImpl::create(&scrollbar), painter, std::move(geometry),
|
| - scrollLayer);
|
| + WebScrollbarImpl::create(&scrollbar), painter, std::move(geometry));
|
| }
|
| GraphicsLayer::registerContentsLayer(scrollbarLayer->layer());
|
| return scrollbarLayer;
|
| @@ -367,15 +364,14 @@
|
| ScrollbarOrientation orientation,
|
| int thumbThickness,
|
| int trackStart,
|
| - bool isLeftSideVerticalScrollbar,
|
| - WebLayer* scrollLayer) {
|
| + bool isLeftSideVerticalScrollbar) {
|
| WebScrollbar::Orientation webOrientation =
|
| (orientation == HorizontalScrollbar) ? WebScrollbar::Horizontal
|
| : WebScrollbar::Vertical;
|
| std::unique_ptr<WebScrollbarLayer> scrollbarLayer =
|
| Platform::current()->compositorSupport()->createSolidColorScrollbarLayer(
|
| webOrientation, thumbThickness, trackStart,
|
| - isLeftSideVerticalScrollbar, scrollLayer);
|
| + isLeftSideVerticalScrollbar);
|
| GraphicsLayer::registerContentsLayer(scrollbarLayer->layer());
|
| return scrollbarLayer;
|
| }
|
| @@ -397,6 +393,7 @@
|
| detachScrollbarLayer(scrollbarGraphicsLayer);
|
| return;
|
| }
|
| + scrollbarLayer->setScrollLayer(scrollLayer);
|
| scrollbarGraphicsLayer->setContentsToPlatformLayer(scrollbarLayer->layer());
|
| scrollbarGraphicsLayer->setDrawsContent(false);
|
| }
|
| @@ -448,13 +445,6 @@
|
| // scrollbar becomes a non-custom one.
|
| scrollbarGraphicsLayer->platformLayer()->clearMainThreadScrollingReasons(
|
| MainThreadScrollingReason::kCustomScrollbarScrolling);
|
| -
|
| - WebLayer* scrollLayer = toWebLayer(scrollableArea->layerForScrolling());
|
| - if (!scrollLayer) {
|
| - detachScrollbarLayer(scrollbarGraphicsLayer);
|
| - return;
|
| - }
|
| -
|
| WebScrollbarLayer* scrollbarLayer =
|
| getWebScrollbarLayer(scrollableArea, orientation);
|
| if (!scrollbarLayer) {
|
| @@ -466,15 +456,16 @@
|
| webScrollbarLayer = createSolidColorScrollbarLayer(
|
| orientation, scrollbar.theme().thumbThickness(scrollbar),
|
| scrollbar.theme().trackPosition(scrollbar),
|
| - scrollableArea->shouldPlaceVerticalScrollbarOnLeft(), scrollLayer);
|
| + scrollableArea->shouldPlaceVerticalScrollbarOnLeft());
|
| } else {
|
| webScrollbarLayer = createScrollbarLayer(
|
| - scrollbar, m_page->deviceScaleFactorDeprecated(), scrollLayer);
|
| + scrollbar, m_page->deviceScaleFactorDeprecated());
|
| }
|
| scrollbarLayer = addWebScrollbarLayer(scrollableArea, orientation,
|
| std::move(webScrollbarLayer));
|
| }
|
|
|
| + WebLayer* scrollLayer = toWebLayer(scrollableArea->layerForScrolling());
|
| setupScrollbarLayer(scrollbarGraphicsLayer, scrollbarLayer, scrollLayer);
|
|
|
| // Root layer non-overlay scrollbars should be marked opaque to disable
|
|
|