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

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

Issue 30793002: cc: Do not allow gesture-scrolling 'overflow[-{x|y}]:hidden' layers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test Created 7 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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.h" 5 #include "cc/layers/layer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 23 matching lines...) Expand all
34 : needs_push_properties_(false), 34 : needs_push_properties_(false),
35 num_dependents_need_push_properties_(false), 35 num_dependents_need_push_properties_(false),
36 stacking_order_changed_(false), 36 stacking_order_changed_(false),
37 layer_id_(s_next_layer_id++), 37 layer_id_(s_next_layer_id++),
38 ignore_set_needs_commit_(false), 38 ignore_set_needs_commit_(false),
39 parent_(NULL), 39 parent_(NULL),
40 layer_tree_host_(NULL), 40 layer_tree_host_(NULL),
41 scrollable_(false), 41 scrollable_(false),
42 should_scroll_on_main_thread_(false), 42 should_scroll_on_main_thread_(false),
43 have_wheel_event_handlers_(false), 43 have_wheel_event_handlers_(false),
44 user_scrollable_horizontal_(true),
45 user_scrollable_vertical_(true),
44 anchor_point_(0.5f, 0.5f), 46 anchor_point_(0.5f, 0.5f),
45 background_color_(0), 47 background_color_(0),
46 compositing_reasons_(kCompositingReasonUnknown), 48 compositing_reasons_(kCompositingReasonUnknown),
47 opacity_(1.f), 49 opacity_(1.f),
48 anchor_point_z_(0.f), 50 anchor_point_z_(0.f),
49 is_container_for_fixed_position_layers_(false), 51 is_container_for_fixed_position_layers_(false),
50 is_drawable_(false), 52 is_drawable_(false),
51 hide_layer_and_subtree_(false), 53 hide_layer_and_subtree_(false),
52 masks_to_bounds_(false), 54 masks_to_bounds_(false),
53 contents_opaque_(false), 55 contents_opaque_(false),
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 layer->SetFixedContainerSizeDelta(gfx::Vector2dF()); 828 layer->SetFixedContainerSizeDelta(gfx::Vector2dF());
827 layer->SetPositionConstraint(position_constraint_); 829 layer->SetPositionConstraint(position_constraint_);
828 layer->SetPreserves3d(preserves_3d()); 830 layer->SetPreserves3d(preserves_3d());
829 layer->SetUseParentBackfaceVisibility(use_parent_backface_visibility_); 831 layer->SetUseParentBackfaceVisibility(use_parent_backface_visibility_);
830 layer->SetSublayerTransform(sublayer_transform_); 832 layer->SetSublayerTransform(sublayer_transform_);
831 if (!layer->TransformIsAnimatingOnImplOnly() && !TransformIsAnimating()) 833 if (!layer->TransformIsAnimatingOnImplOnly() && !TransformIsAnimating())
832 layer->SetTransform(transform_); 834 layer->SetTransform(transform_);
833 DCHECK(!(TransformIsAnimating() && layer->TransformIsAnimatingOnImplOnly())); 835 DCHECK(!(TransformIsAnimating() && layer->TransformIsAnimatingOnImplOnly()));
834 836
835 layer->SetScrollable(scrollable_); 837 layer->SetScrollable(scrollable_);
838 layer->SetUserScrollable(user_scrollable_horizontal_,
839 user_scrollable_vertical_);
836 layer->SetMaxScrollOffset(max_scroll_offset_); 840 layer->SetMaxScrollOffset(max_scroll_offset_);
837 841
838 LayerImpl* scroll_parent = NULL; 842 LayerImpl* scroll_parent = NULL;
839 if (scroll_parent_) 843 if (scroll_parent_)
840 scroll_parent = layer->layer_tree_impl()->LayerById(scroll_parent_->id()); 844 scroll_parent = layer->layer_tree_impl()->LayerById(scroll_parent_->id());
841 845
842 layer->SetScrollParent(scroll_parent); 846 layer->SetScrollParent(scroll_parent);
843 if (scroll_children_) { 847 if (scroll_children_) {
844 std::set<LayerImpl*>* scroll_children = new std::set<LayerImpl*>; 848 std::set<LayerImpl*>* scroll_children = new std::set<LayerImpl*>;
845 for (std::set<Layer*>::iterator it = scroll_children_->begin(); 849 for (std::set<Layer*>::iterator it = scroll_children_->begin();
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1084 clip_parent_->RemoveClipChild(this); 1088 clip_parent_->RemoveClipChild(this);
1085 1089
1086 clip_parent_ = NULL; 1090 clip_parent_ = NULL;
1087 } 1091 }
1088 1092
1089 void Layer::RunMicroBenchmark(MicroBenchmark* benchmark) { 1093 void Layer::RunMicroBenchmark(MicroBenchmark* benchmark) {
1090 benchmark->RunOnLayer(this); 1094 benchmark->RunOnLayer(this);
1091 } 1095 }
1092 1096
1093 } // namespace cc 1097 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698