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 { |