Chromium Code Reviews| Index: cc/layers/layer.h |
| diff --git a/cc/layers/layer.h b/cc/layers/layer.h |
| index 46b32335b635791e314fd6895055f6a887414ec1..cf66d05390881b9adfc35f53d6ff49fc7bf34e34 100644 |
| --- a/cc/layers/layer.h |
| +++ b/cc/layers/layer.h |
| @@ -269,11 +269,10 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>, |
| gfx::Vector2d scroll_offset() const { return scroll_offset_; } |
| void SetScrollOffsetFromImplSide(gfx::Vector2d scroll_offset); |
| - void SetMaxScrollOffset(gfx::Vector2d max_scroll_offset); |
| - gfx::Vector2d max_scroll_offset() const { return max_scroll_offset_; } |
| + gfx::Vector2d MaxScrollOffset() const; |
| - void SetScrollable(bool scrollable); |
| - bool scrollable() const { return scrollable_; } |
| + void SetScrollClipLayer(Layer* clip_layer); |
| + 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
|
| void SetUserScrollable(bool horizontal, bool vertical); |
| bool user_scrollable_horizontal() const { |
| @@ -569,7 +568,9 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>, |
| gfx::Size bounds_; |
| gfx::Vector2d scroll_offset_; |
| - gfx::Vector2d max_scroll_offset_; |
| + // This variable indicates which ancestor layer (if any) defines the maximum |
| + // scroll offset for this layer. |
| + 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
|
| bool scrollable_ : 1; |
| bool should_scroll_on_main_thread_ : 1; |
| bool have_wheel_event_handlers_ : 1; |