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

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

Issue 1766053002: Clean LayerImpl's scroll offset callers in unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 9 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 unified diff | Download patch
« cc/trees/property_tree.h ('K') | « cc/trees/property_tree.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/property_tree_builder.h" 5 #include "cc/trees/property_tree_builder.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 main_thread_scrolling_reasons != 665 main_thread_scrolling_reasons !=
666 data_from_ancestor.main_thread_scrolling_reasons; 666 data_from_ancestor.main_thread_scrolling_reasons;
667 bool requires_node = 667 bool requires_node =
668 scroll_node_uninheritable_criteria || 668 scroll_node_uninheritable_criteria ||
669 (main_thread_scrolling_reasons != 669 (main_thread_scrolling_reasons !=
670 MainThreadScrollingReason::kNotScrollingOnMain && 670 MainThreadScrollingReason::kNotScrollingOnMain &&
671 (has_different_main_thread_scrolling_reasons || 671 (has_different_main_thread_scrolling_reasons ||
672 data_from_ancestor 672 data_from_ancestor
673 .scroll_tree_parent_created_by_uninheritable_criteria)); 673 .scroll_tree_parent_created_by_uninheritable_criteria));
674 674
675 // Remove the entry from scroll_offset_map
676 if (!scrollable)
677 data_for_children->scroll_tree->scroll_offset_map().erase(layer->id());
ajuma 2016/03/07 19:10:19 Is this only needed for tests? If so, please add a
sunxd 2016/03/09 01:51:21 Done.
678
675 if (!requires_node) { 679 if (!requires_node) {
676 data_for_children->scroll_tree_parent = parent_id; 680 data_for_children->scroll_tree_parent = parent_id;
677 } else { 681 } else {
678 ScrollNode node; 682 ScrollNode node;
679 node.owner_id = layer->id(); 683 node.owner_id = layer->id();
680 node.data.scrollable = scrollable; 684 node.data.scrollable = scrollable;
681 node.data.main_thread_scrolling_reasons = main_thread_scrolling_reasons; 685 node.data.main_thread_scrolling_reasons = main_thread_scrolling_reasons;
682 node.data.contains_non_fast_scrollable_region = 686 node.data.contains_non_fast_scrollable_region =
683 contains_non_fast_scrollable_region; 687 contains_non_fast_scrollable_region;
684 gfx::Size clip_bounds; 688 gfx::Size clip_bounds;
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 if (SkColorGetA(color) != 255) 998 if (SkColorGetA(color) != 255)
995 color = SkColorSetA(color, 255); 999 color = SkColorSetA(color, 255);
996 BuildPropertyTreesTopLevelInternal( 1000 BuildPropertyTreesTopLevelInternal(
997 root_layer, page_scale_layer, inner_viewport_scroll_layer, 1001 root_layer, page_scale_layer, inner_viewport_scroll_layer,
998 outer_viewport_scroll_layer, overscroll_elasticity_layer, 1002 outer_viewport_scroll_layer, overscroll_elasticity_layer,
999 elastic_overscroll, page_scale_factor, device_scale_factor, viewport, 1003 elastic_overscroll, page_scale_factor, device_scale_factor, viewport,
1000 device_transform, property_trees, color); 1004 device_transform, property_trees, color);
1001 } 1005 }
1002 1006
1003 } // namespace cc 1007 } // namespace cc
OLDNEW
« cc/trees/property_tree.h ('K') | « cc/trees/property_tree.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698