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

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

Issue 18405003: Update scroll layer positions in WebLayerImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | « no previous file | 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_layer_impl.cc
diff --git a/webkit/renderer/compositor_bindings/web_layer_impl.cc b/webkit/renderer/compositor_bindings/web_layer_impl.cc
index 4f3a3b8a93e5666641c4f458aff90459f31f37a8..c8ea7c35a469c2317f3779b66b5d5ce76f27ab91 100644
--- a/webkit/renderer/compositor_bindings/web_layer_impl.cc
+++ b/webkit/renderer/compositor_bindings/web_layer_impl.cc
@@ -227,6 +227,11 @@ void WebLayerImpl::setForceRenderSurface(bool force_render_surface) {
void WebLayerImpl::setScrollPosition(WebKit::WebPoint position) {
layer_->SetScrollOffset(gfx::Point(position).OffsetFromOrigin());
+ // TODO(enne): Blink currently always updates scroll offset and layer position
+ // in tandem for frames in RenderLayerCompositor::frameViewDidScroll.
+ // So that this can be removed in Blink, temporarily do that work here.
+ // See: http://crbug.com/256381
+ layer_->SetPosition(gfx::PointAtOffsetFromOrigin(-layer_->scroll_offset()));
}
WebKit::WebPoint WebLayerImpl::scrollPosition() const {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698