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

Unified Diff: cc/layers/layer_impl.cc

Issue 23533051: [android_webview] Use a fraction to calculate scroll offset. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert changes from previous patch set as they break AwSettings tests Created 7 years, 3 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 | « cc/input/layer_scroll_offset_delegate.h ('k') | 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 b0c5399d32e3a3fd06c1963eb585e671e52a6ca4..8a0d01898f57ac87c27bbd468b42bc2448cb5c1b 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -1001,8 +1001,10 @@ void LayerImpl::SetScrollOffsetDelegate(
}
gfx::Vector2dF total_offset = TotalScrollOffset();
scroll_offset_delegate_ = scroll_offset_delegate;
- if (scroll_offset_delegate_)
+ if (scroll_offset_delegate_) {
+ scroll_offset_delegate_->SetMaxScrollOffset(max_scroll_offset_);
scroll_offset_delegate_->SetTotalScrollOffset(total_offset);
+ }
}
void LayerImpl::SetScrollOffset(gfx::Vector2d scroll_offset) {
@@ -1088,6 +1090,9 @@ void LayerImpl::SetMaxScrollOffset(gfx::Vector2d max_scroll_offset) {
return;
max_scroll_offset_ = max_scroll_offset;
+ if (scroll_offset_delegate_)
+ scroll_offset_delegate_->SetMaxScrollOffset(max_scroll_offset_);
+
layer_tree_impl()->set_needs_update_draw_properties();
UpdateScrollbarPositions();
}
« no previous file with comments | « cc/input/layer_scroll_offset_delegate.h ('k') | cc/layers/layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698