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

Unified Diff: webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.cc

Issue 23983047: Pinch/Zoom Infrastructure & Plumbing CL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to r248052. Created 6 years, 11 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
« no previous file with comments | « webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.cc
diff --git a/webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.cc b/webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.cc
index 265a97db41c55f70b9c424757b1f56624eba010c..8d8fd44697f0f19c40c7248ddfb7abb6d84ff522 100644
--- a/webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.cc
+++ b/webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.cc
@@ -4,6 +4,7 @@
#include "webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.h"
+#include "cc/layers/layer.h"
#include "cc/layers/painted_scrollbar_layer.h"
#include "cc/layers/scrollbar_layer_interface.h"
#include "cc/layers/solid_color_scrollbar_layer.h"
@@ -51,8 +52,15 @@ WebScrollbarLayerImpl::~WebScrollbarLayerImpl() {}
blink::WebLayer* WebScrollbarLayerImpl::layer() { return layer_.get(); }
void WebScrollbarLayerImpl::setScrollLayer(blink::WebLayer* layer) {
- int id = layer ? static_cast<WebLayerImpl*>(layer)->layer()->id() : 0;
- static_cast<PaintedScrollbarLayer*>(layer_->layer())->SetScrollLayerId(id);
+ cc::Layer* scroll_layer =
+ layer ? static_cast<WebLayerImpl*>(layer)->layer() : 0;
+ layer_->layer()->ToScrollbarLayer()->SetScrollLayer(scroll_layer->id());
+}
+
+void WebScrollbarLayerImpl::setClipLayer(blink::WebLayer* layer) {
+ cc::Layer* clip_layer =
+ layer ? static_cast<WebLayerImpl*>(layer)->layer() : 0;
+ layer_->layer()->ToScrollbarLayer()->SetClipLayer(clip_layer->id());
}
} // namespace webkit
« no previous file with comments | « webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698