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

Unified Diff: cc/trees/layer_tree_host_unittest.cc

Issue 584503005: Make scroll offset type of float in cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: link crbug to TODO Created 6 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/trees/layer_tree_host_perftest.cc ('k') | cc/trees/layer_tree_host_unittest_animation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest.cc
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index 22bb9fdb5d45fa861b62b3be61bad88741fa6d03..a181704b1142e889547c5131fd749a2bc45cde1c 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -852,7 +852,7 @@ class LayerTreeHostTestStartPageScaleAnimation : public LayerTreeHostTest {
scroll_layer_->SetIsContainerForFixedPositionLayers(true);
scroll_layer_->SetBounds(gfx::Size(2 * root_layer->bounds().width(),
2 * root_layer->bounds().height()));
- scroll_layer_->SetScrollOffset(gfx::Vector2d());
+ scroll_layer_->SetScrollOffset(gfx::ScrollOffset());
layer_tree_host()->root_layer()->AddChild(scroll_layer_);
// This test requires the page_scale and inner viewport layers to be
// identified.
@@ -866,8 +866,9 @@ class LayerTreeHostTestStartPageScaleAnimation : public LayerTreeHostTest {
virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
float scale,
float) OVERRIDE {
- gfx::Vector2d offset = scroll_layer_->scroll_offset();
- scroll_layer_->SetScrollOffset(offset + scroll_delta);
+ gfx::ScrollOffset offset = scroll_layer_->scroll_offset();
+ scroll_layer_->SetScrollOffset(ScrollOffsetWithDelta(offset,
+ scroll_delta));
layer_tree_host()->SetPageScaleFactorAndLimits(scale, 0.5f, 2.f);
}
« no previous file with comments | « cc/trees/layer_tree_host_perftest.cc ('k') | cc/trees/layer_tree_host_unittest_animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698