Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(415)

Unified Diff: third_party/WebKit/Source/core/frame/VisualViewport.cpp

Issue 2743653003: Revert of Remove indirection: setup scrollbar scroll layers in the scrollbar constructor (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/frame/VisualViewport.cpp
diff --git a/third_party/WebKit/Source/core/frame/VisualViewport.cpp b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
index c14a23d716f2697cb07e40e05586b09a857e2854..577f983bd17f77e613d0310fbb297e86793411fe 100644
--- a/third_party/WebKit/Source/core/frame/VisualViewport.cpp
+++ b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
@@ -453,10 +453,8 @@
ASSERT(coordinator);
ScrollbarOrientation webcoreOrientation =
isHorizontal ? HorizontalScrollbar : VerticalScrollbar;
- WebLayer* scrollLayer = layerForScrolling()->platformLayer();
webScrollbarLayer = coordinator->createSolidColorScrollbarLayer(
- webcoreOrientation, thumbThickness, scrollbarMargin, false,
- scrollLayer);
+ webcoreOrientation, thumbThickness, scrollbarMargin, false);
// The compositor will control the scrollbar's visibility. Set to invisible
// by default so scrollbars don't show up in layout tests.
@@ -485,6 +483,14 @@
scrollbarGraphicsLayer->setPosition(IntPoint(xPosition, yPosition));
scrollbarGraphicsLayer->setSize(FloatSize(width, height));
scrollbarGraphicsLayer->setContentsRect(IntRect(0, 0, width, height));
+}
+
+void VisualViewport::setScrollLayerOnScrollbars(WebLayer* scrollLayer) const {
+ // TODO(bokan): This is currently done while registering viewport layers
+ // with the compositor but could it actually be done earlier, like in
+ // setupScrollbars? Then we wouldn't need this method.
+ m_webOverlayScrollbarHorizontal->setScrollLayer(scrollLayer);
+ m_webOverlayScrollbarVertical->setScrollLayer(scrollLayer);
}
bool VisualViewport::visualViewportSuppliesScrollbars() const {

Powered by Google App Engine
This is Rietveld 408576698