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

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

Issue 23983047: Pinch/Zoom Infrastructure & Plumbing CL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments. Created 7 years 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: webkit/renderer/compositor_bindings/web_layer_impl.cc
diff --git a/webkit/renderer/compositor_bindings/web_layer_impl.cc b/webkit/renderer/compositor_bindings/web_layer_impl.cc
index 22a5485a3cf3cac935a02b2d67055175e568711f..678c1c2593fddb0003f44fbac319c8b92915fd4d 100644
--- a/webkit/renderer/compositor_bindings/web_layer_impl.cc
+++ b/webkit/renderer/compositor_bindings/web_layer_impl.cc
@@ -12,6 +12,7 @@
#include "cc/base/region.h"
#include "cc/layers/layer.h"
#include "cc/layers/layer_position_constraint.h"
+#include "cc/trees/layer_tree_host.h"
#include "third_party/WebKit/public/platform/WebCompositingReasons.h"
#include "third_party/WebKit/public/platform/WebFloatPoint.h"
#include "third_party/WebKit/public/platform/WebFloatRect.h"
@@ -244,19 +245,17 @@ void WebLayerImpl::setScrollPosition(blink::WebPoint position) {
}
blink::WebPoint WebLayerImpl::scrollPosition() const {
- return gfx::PointAtOffsetFromOrigin(layer_->scroll_offset());
-}
-
-void WebLayerImpl::setMaxScrollPosition(WebSize max_scroll_position) {
- layer_->SetMaxScrollOffset(max_scroll_position);
+ return gfx::PointAtOffsetFromOrigin(layer_->BlinkScrollOffset());
}
WebSize WebLayerImpl::maxScrollPosition() const {
- return layer_->max_scroll_offset();
+ return layer_->MaxScrollOffset();
}
-void WebLayerImpl::setScrollable(bool scrollable) {
- layer_->SetScrollable(scrollable);
+void WebLayerImpl::setScrollClipLayer(WebLayer* clip_layer) {
+ cc::Layer* cc_clip_layer =
+ clip_layer ? static_cast<WebLayerImpl*>(clip_layer)->layer() : 0;
+ layer_->SetScrollClipLayer(cc_clip_layer);
}
bool WebLayerImpl::scrollable() const { return layer_->scrollable(); }

Powered by Google App Engine
This is Rietveld 408576698