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

Unified Diff: cc/layers/layer_impl.cc

Issue 698003006: Fix double subtraction of sent_delta on sync tree activation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added comment Created 6 years, 1 month 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 | cc/layers/layer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_impl.cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index 2b1193370eee237e307ce28f4074ce6a3134ce8c..db581d24ae717de58e906e82b4f5051f3eb9786d 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -550,10 +550,14 @@ void LayerImpl::PushPropertiesTo(LayerImpl* layer) {
: Layer::INVALID_ID);
layer->set_user_scrollable_horizontal(user_scrollable_horizontal_);
layer->set_user_scrollable_vertical(user_scrollable_vertical_);
- layer->SetScrollOffsetAndDelta(
- scroll_offset_,
- layer->ScrollDelta() - layer->sent_scroll_delta());
+
+ // Save the difference but clear the sent delta so that we don't subtract
+ // it again in SetScrollOffsetAndDelta's pending twin mirroring logic.
+ gfx::Vector2dF remaining_delta =
+ layer->ScrollDelta() - layer->sent_scroll_delta();
layer->SetSentScrollDelta(gfx::Vector2dF());
+ layer->SetScrollOffsetAndDelta(scroll_offset_, remaining_delta);
+
layer->Set3dSortingContextId(sorting_context_id_);
layer->SetNumDescendantsThatDrawContent(num_descendants_that_draw_content_);
« no previous file with comments | « no previous file | cc/layers/layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698