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

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

Issue 2495123002: Make all scrollable layers visible to hit testing. (Closed)
Patch Set: 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
« cc/trees/layer_tree_impl.cc ('K') | « cc/trees/scroll_node.h ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "base/trace_event/trace_event_argument.h" 5 #include "base/trace_event/trace_event_argument.h"
6 #include "cc/animation/element_id.h" 6 #include "cc/animation/element_id.h"
7 #include "cc/base/math_util.h" 7 #include "cc/base/math_util.h"
8 #include "cc/input/main_thread_scrolling_reason.h" 8 #include "cc/input/main_thread_scrolling_reason.h"
9 #include "cc/proto/gfx_conversions.h" 9 #include "cc/proto/gfx_conversions.h"
10 #include "cc/proto/property_tree.pb.h" 10 #include "cc/proto/property_tree.pb.h"
11 #include "cc/trees/scroll_node.h" 11 #include "cc/trees/scroll_node.h"
12 12
13 namespace cc { 13 namespace cc {
14 14
15 ScrollNode::ScrollNode() 15 ScrollNode::ScrollNode()
16 : id(-1), 16 : id(-1),
17 parent_id(-1), 17 parent_id(-1),
18 owner_id(-1), 18 owner_id(-1),
19 scrollable(false), 19 scrollable(false),
20 main_thread_scrolling_reasons( 20 main_thread_scrolling_reasons(
21 MainThreadScrollingReason::kNotScrollingOnMain), 21 MainThreadScrollingReason::kNotScrollingOnMain),
22 contains_non_fast_scrollable_region(false), 22 contains_non_fast_scrollable_region(false),
23 max_scroll_offset_affected_by_page_scale(false), 23 max_scroll_offset_affected_by_page_scale(false),
24 is_inner_viewport_scroll_layer(false), 24 is_inner_viewport_scroll_layer(false),
25 is_outer_viewport_scroll_layer(false), 25 is_outer_viewport_scroll_layer(false),
26 should_flatten(false), 26 should_flatten(false),
27 user_scrollable_horizontal(false), 27 user_scrollable_horizontal(false),
28 user_scrollable_vertical(false), 28 user_scrollable_vertical(false),
29 transform_id(0), 29 transform_id(0) {}
30 num_drawn_descendants(0) {}
31 30
32 ScrollNode::ScrollNode(const ScrollNode& other) = default; 31 ScrollNode::ScrollNode(const ScrollNode& other) = default;
33 32
34 bool ScrollNode::operator==(const ScrollNode& other) const { 33 bool ScrollNode::operator==(const ScrollNode& other) const {
35 return id == other.id && parent_id == other.parent_id && 34 return id == other.id && parent_id == other.parent_id &&
36 owner_id == other.owner_id && scrollable == other.scrollable && 35 owner_id == other.owner_id && scrollable == other.scrollable &&
37 main_thread_scrolling_reasons == other.main_thread_scrolling_reasons && 36 main_thread_scrolling_reasons == other.main_thread_scrolling_reasons &&
38 contains_non_fast_scrollable_region == 37 contains_non_fast_scrollable_region ==
39 other.contains_non_fast_scrollable_region && 38 other.contains_non_fast_scrollable_region &&
40 scroll_clip_layer_bounds == other.scroll_clip_layer_bounds && 39 scroll_clip_layer_bounds == other.scroll_clip_layer_bounds &&
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 offset_to_transform_parent, value); 117 offset_to_transform_parent, value);
119 value->SetBoolean("should_flatten", should_flatten); 118 value->SetBoolean("should_flatten", should_flatten);
120 value->SetBoolean("user_scrollable_horizontal", user_scrollable_horizontal); 119 value->SetBoolean("user_scrollable_horizontal", user_scrollable_horizontal);
121 value->SetBoolean("user_scrollable_vertical", user_scrollable_vertical); 120 value->SetBoolean("user_scrollable_vertical", user_scrollable_vertical);
122 121
123 element_id.AddToTracedValue(value); 122 element_id.AddToTracedValue(value);
124 value->SetInteger("transform_id", transform_id); 123 value->SetInteger("transform_id", transform_id);
125 } 124 }
126 125
127 } // namespace cc 126 } // namespace cc
OLDNEW
« cc/trees/layer_tree_impl.cc ('K') | « cc/trees/scroll_node.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698