OLD | NEW |
---|---|
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 #ifndef CC_LAYERS_LAYER_H_ | 5 #ifndef CC_LAYERS_LAYER_H_ |
6 #define CC_LAYERS_LAYER_H_ | 6 #define CC_LAYERS_LAYER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
262 return draw_properties_.render_surface.get(); | 262 return draw_properties_.render_surface.get(); |
263 } | 263 } |
264 int num_unclipped_descendants() const { | 264 int num_unclipped_descendants() const { |
265 return draw_properties_.num_unclipped_descendants; | 265 return draw_properties_.num_unclipped_descendants; |
266 } | 266 } |
267 | 267 |
268 void SetScrollOffset(gfx::Vector2d scroll_offset); | 268 void SetScrollOffset(gfx::Vector2d scroll_offset); |
269 gfx::Vector2d scroll_offset() const { return scroll_offset_; } | 269 gfx::Vector2d scroll_offset() const { return scroll_offset_; } |
270 void SetScrollOffsetFromImplSide(gfx::Vector2d scroll_offset); | 270 void SetScrollOffsetFromImplSide(gfx::Vector2d scroll_offset); |
271 | 271 |
272 void SetMaxScrollOffset(gfx::Vector2d max_scroll_offset); | 272 gfx::Vector2d MaxScrollOffset() const; |
273 gfx::Vector2d max_scroll_offset() const { return max_scroll_offset_; } | |
274 | 273 |
275 void SetScrollable(bool scrollable); | 274 void SetScrollClipLayer(Layer* clip_layer); |
276 bool scrollable() const { return scrollable_; } | 275 bool scrollable() const { return scroll_clip_layer_; } |
aelias_OOO_until_Jul13
2014/01/16 03:44:04
Could you leave this one checking scrollable_? It
wjmaclean
2014/01/16 15:07:32
I would suggest that in the case of overflow:hidde
aelias_OOO_until_Jul13
2014/01/16 19:49:26
But overflow: hidden layers can still have a nonze
wjmaclean
2014/01/16 20:13:36
I don't think so ... why is this behaviour needed?
aelias_OOO_until_Jul13
2014/01/16 20:21:38
It's a web standard. There are layout tests for i
wjmaclean
2014/01/16 20:39:41
Ok. That being said, much of the existing code nev
| |
277 | 276 |
278 void SetUserScrollable(bool horizontal, bool vertical); | 277 void SetUserScrollable(bool horizontal, bool vertical); |
279 bool user_scrollable_horizontal() const { | 278 bool user_scrollable_horizontal() const { |
280 return user_scrollable_horizontal_; | 279 return user_scrollable_horizontal_; |
281 } | 280 } |
282 bool user_scrollable_vertical() const { return user_scrollable_vertical_; } | 281 bool user_scrollable_vertical() const { return user_scrollable_vertical_; } |
283 | 282 |
284 void SetShouldScrollOnMainThread(bool should_scroll_on_main_thread); | 283 void SetShouldScrollOnMainThread(bool should_scroll_on_main_thread); |
285 bool should_scroll_on_main_thread() const { | 284 bool should_scroll_on_main_thread() const { |
286 return should_scroll_on_main_thread_; | 285 return should_scroll_on_main_thread_; |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
562 // This pointer value is nil when a Layer is not in a tree and is | 561 // This pointer value is nil when a Layer is not in a tree and is |
563 // updated via SetLayerTreeHost() if a layer moves between trees. | 562 // updated via SetLayerTreeHost() if a layer moves between trees. |
564 LayerTreeHost* layer_tree_host_; | 563 LayerTreeHost* layer_tree_host_; |
565 | 564 |
566 scoped_refptr<LayerAnimationController> layer_animation_controller_; | 565 scoped_refptr<LayerAnimationController> layer_animation_controller_; |
567 | 566 |
568 // Layer properties. | 567 // Layer properties. |
569 gfx::Size bounds_; | 568 gfx::Size bounds_; |
570 | 569 |
571 gfx::Vector2d scroll_offset_; | 570 gfx::Vector2d scroll_offset_; |
572 gfx::Vector2d max_scroll_offset_; | 571 // This variable indicates which ancestor layer (if any) defines the maximum |
572 // scroll offset for this layer. | |
573 Layer* scroll_clip_layer_; | |
aelias_OOO_until_Jul13
2014/01/16 03:44:04
Instead of having this pointer, I think we should
wjmaclean
2014/01/16 15:07:32
What if we need to have a scroll layer container t
aelias_OOO_until_Jul13
2014/01/16 19:49:26
I propose marking both the inner and outer viewpor
wjmaclean
2014/01/16 20:13:36
I still don't understand ... what if we want a fix
aelias_OOO_until_Jul13
2014/01/16 20:21:38
Web fixed-pos elements are supposed to attach to t
wjmaclean
2014/01/16 20:39:41
Ok, though I still think it's better to keep scrol
| |
573 bool scrollable_ : 1; | 574 bool scrollable_ : 1; |
574 bool should_scroll_on_main_thread_ : 1; | 575 bool should_scroll_on_main_thread_ : 1; |
575 bool have_wheel_event_handlers_ : 1; | 576 bool have_wheel_event_handlers_ : 1; |
576 bool user_scrollable_horizontal_ : 1; | 577 bool user_scrollable_horizontal_ : 1; |
577 bool user_scrollable_vertical_ : 1; | 578 bool user_scrollable_vertical_ : 1; |
578 bool is_root_for_isolated_group_ : 1; | 579 bool is_root_for_isolated_group_ : 1; |
579 bool is_container_for_fixed_position_layers_ : 1; | 580 bool is_container_for_fixed_position_layers_ : 1; |
580 bool is_drawable_ : 1; | 581 bool is_drawable_ : 1; |
581 bool hide_layer_and_subtree_ : 1; | 582 bool hide_layer_and_subtree_ : 1; |
582 bool masks_to_bounds_ : 1; | 583 bool masks_to_bounds_ : 1; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
621 DrawProperties<Layer> draw_properties_; | 622 DrawProperties<Layer> draw_properties_; |
622 | 623 |
623 PaintProperties paint_properties_; | 624 PaintProperties paint_properties_; |
624 | 625 |
625 DISALLOW_COPY_AND_ASSIGN(Layer); | 626 DISALLOW_COPY_AND_ASSIGN(Layer); |
626 }; | 627 }; |
627 | 628 |
628 } // namespace cc | 629 } // namespace cc |
629 | 630 |
630 #endif // CC_LAYERS_LAYER_H_ | 631 #endif // CC_LAYERS_LAYER_H_ |
OLD | NEW |