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

Side by Side Diff: cc/layers/layer_impl.cc

Issue 2495123002: Make all scrollable layers visible to hit testing. (Closed)
Patch Set: rebase 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/layers/layer_impl.h ('k') | cc/trees/layer_tree_host_common.cc » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/layers/layer_impl.h" 5 #include "cc/layers/layer_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 draw_blend_mode_(SkXfermode::kSrcOver_Mode), 73 draw_blend_mode_(SkXfermode::kSrcOver_Mode),
74 transform_tree_index_(TransformTree::kInvalidNodeId), 74 transform_tree_index_(TransformTree::kInvalidNodeId),
75 effect_tree_index_(EffectTree::kInvalidNodeId), 75 effect_tree_index_(EffectTree::kInvalidNodeId),
76 clip_tree_index_(ClipTree::kInvalidNodeId), 76 clip_tree_index_(ClipTree::kInvalidNodeId),
77 scroll_tree_index_(ScrollTree::kInvalidNodeId), 77 scroll_tree_index_(ScrollTree::kInvalidNodeId),
78 sorting_context_id_(0), 78 sorting_context_id_(0),
79 current_draw_mode_(DRAW_MODE_NONE), 79 current_draw_mode_(DRAW_MODE_NONE),
80 mutable_properties_(MutableProperty::kNone), 80 mutable_properties_(MutableProperty::kNone),
81 debug_info_(nullptr), 81 debug_info_(nullptr),
82 has_preferred_raster_bounds_(false), 82 has_preferred_raster_bounds_(false),
83 scrolls_drawn_descendant_(false),
84 has_will_change_transform_hint_(false), 83 has_will_change_transform_hint_(false),
85 needs_push_properties_(false), 84 needs_push_properties_(false),
86 scrollbars_hidden_(false) { 85 scrollbars_hidden_(false) {
87 DCHECK_GT(layer_id_, 0); 86 DCHECK_GT(layer_id_, 0);
88 87
89 DCHECK(layer_tree_impl_); 88 DCHECK(layer_tree_impl_);
90 layer_tree_impl_->RegisterLayer(this); 89 layer_tree_impl_->RegisterLayer(this);
91 layer_tree_impl_->AddToElementMap(this); 90 layer_tree_impl_->AddToElementMap(this);
92 91
93 SetNeedsPushProperties(); 92 SetNeedsPushProperties();
(...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 .layer_transforms_should_scale_layer_contents) { 1099 .layer_transforms_should_scale_layer_contents) {
1101 return default_scale; 1100 return default_scale;
1102 } 1101 }
1103 1102
1104 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( 1103 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents(
1105 ScreenSpaceTransform(), default_scale); 1104 ScreenSpaceTransform(), default_scale);
1106 return std::max(transform_scales.x(), transform_scales.y()); 1105 return std::max(transform_scales.x(), transform_scales.y());
1107 } 1106 }
1108 1107
1109 } // namespace cc 1108 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/trees/layer_tree_host_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698