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

Side by Side Diff: cc/trees/layer_tree_host_common_unittest.cc

Issue 2194833002: Overscroll and Elasticity for views::ScrollView Base URL: https://chromium.googlesource.com/chromium/src.git@20160728-MacViews-RouteThroughInputHandler
Patch Set: Restore functionality and fix bugs \o/ Created 4 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 unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host_common.cc ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_host_common.h" 5 #include "cc/trees/layer_tree_host_common.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 10384 matching lines...) Expand 10 before | Expand all | Expand 10 after
10395 scroll_parent5.id = 8; 10395 scroll_parent5.id = 8;
10396 scroll_parent5.owner_id = parent5->id(); 10396 scroll_parent5.owner_id = parent5->id();
10397 scroll_parent5.contains_non_fast_scrollable_region = true; 10397 scroll_parent5.contains_non_fast_scrollable_region = true;
10398 scroll_parent5.bounds = gfx::Size(10, 10); 10398 scroll_parent5.bounds = gfx::Size(10, 10);
10399 scroll_parent5.should_flatten = true; 10399 scroll_parent5.should_flatten = true;
10400 scroll_parent5.user_scrollable_horizontal = true; 10400 scroll_parent5.user_scrollable_horizontal = true;
10401 scroll_parent5.user_scrollable_vertical = true; 10401 scroll_parent5.user_scrollable_vertical = true;
10402 scroll_parent5.transform_id = parent5->transform_tree_index(); 10402 scroll_parent5.transform_id = parent5->transform_tree_index();
10403 expected_scroll_tree.Insert(scroll_parent5, 1); 10403 expected_scroll_tree.Insert(scroll_parent5, 1);
10404 10404
10405 expected_scroll_tree.SetScrollOffset(parent2->id(), gfx::ScrollOffset(0, 0)); 10405 gfx::ScrollOffset offset;
10406 expected_scroll_tree.SetScrollOffset(child7->id(), gfx::ScrollOffset(0, 0)); 10406 gfx::ScrollOffset overscroll;
10407 expected_scroll_tree.SetScrollOffset(grand_child11->id(), 10407 expected_scroll_tree.SetScrollOffset(parent2->id(), offset, overscroll);
10408 gfx::ScrollOffset(0, 0)); 10408 expected_scroll_tree.SetScrollOffset(child7->id(), offset, overscroll);
10409 expected_scroll_tree.SetScrollOffset(grand_child11->id(), offset, overscroll);
10409 expected_scroll_tree.set_needs_update(false); 10410 expected_scroll_tree.set_needs_update(false);
10410 10411
10411 EXPECT_EQ(expected_scroll_tree, scroll_tree); 10412 EXPECT_EQ(expected_scroll_tree, scroll_tree);
10412 10413
10413 // Check other layers' scroll_tree_index 10414 // Check other layers' scroll_tree_index
10414 EXPECT_EQ(scroll_root1.id, page_scale_layer->scroll_tree_index()); 10415 EXPECT_EQ(scroll_root1.id, page_scale_layer->scroll_tree_index());
10415 EXPECT_EQ(scroll_child6.id, grand_child10->scroll_tree_index()); 10416 EXPECT_EQ(scroll_child6.id, grand_child10->scroll_tree_index());
10416 EXPECT_EQ(scroll_root1.id, parent3->scroll_tree_index()); 10417 EXPECT_EQ(scroll_root1.id, parent3->scroll_tree_index());
10417 EXPECT_EQ(scroll_child7.id, child8->scroll_tree_index()); 10418 EXPECT_EQ(scroll_child7.id, child8->scroll_tree_index());
10418 EXPECT_EQ(scroll_root1.id, parent4->scroll_tree_index()); 10419 EXPECT_EQ(scroll_root1.id, parent4->scroll_tree_index());
10419 EXPECT_EQ(scroll_root1.id, child9->scroll_tree_index()); 10420 EXPECT_EQ(scroll_root1.id, child9->scroll_tree_index());
10420 EXPECT_EQ(scroll_root1.id, grand_child12->scroll_tree_index()); 10421 EXPECT_EQ(scroll_root1.id, grand_child12->scroll_tree_index());
10421 } 10422 }
10422 10423
10423 } // namespace 10424 } // namespace
10424 } // namespace cc 10425 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common.cc ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698