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

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

Issue 2194833002: Overscroll and Elasticity for views::ScrollView Base URL: https://chromium.googlesource.com/chromium/src.git@20160728-MacViews-RouteThroughInputHandler
Patch Set: Restore functionality and fix bugs \o/ 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.cc ('k') | cc/layers/layer_impl.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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_IMPL_H_ 5 #ifndef CC_LAYERS_LAYER_IMPL_H_
6 #define CC_LAYERS_LAYER_IMPL_H_ 6 #define CC_LAYERS_LAYER_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 void SetBounds(const gfx::Size& bounds); 291 void SetBounds(const gfx::Size& bounds);
292 gfx::Size bounds() const; 292 gfx::Size bounds() const;
293 // Like bounds() but doesn't snap to int. Lossy on giant pages (e.g. millions 293 // Like bounds() but doesn't snap to int. Lossy on giant pages (e.g. millions
294 // of pixels) due to use of single precision float. 294 // of pixels) due to use of single precision float.
295 gfx::SizeF BoundsForScrolling() const; 295 gfx::SizeF BoundsForScrolling() const;
296 void SetBoundsDelta(const gfx::Vector2dF& bounds_delta); 296 void SetBoundsDelta(const gfx::Vector2dF& bounds_delta);
297 gfx::Vector2dF bounds_delta() const { return bounds_delta_; } 297 gfx::Vector2dF bounds_delta() const { return bounds_delta_; }
298 298
299 void SetCurrentScrollOffset(const gfx::ScrollOffset& scroll_offset); 299 void SetCurrentScrollOffset(const gfx::ScrollOffset& scroll_offset);
300 gfx::ScrollOffset CurrentScrollOffset() const; 300 gfx::ScrollOffset CurrentScrollOffset() const;
301 void SetCurrentOverscroll(const gfx::ScrollOffset& overscroll);
302 gfx::ScrollOffset CurrentOverscroll() const;
301 303
302 gfx::ScrollOffset MaxScrollOffset() const; 304 gfx::ScrollOffset MaxScrollOffset() const;
303 gfx::ScrollOffset ClampScrollOffsetToLimits(gfx::ScrollOffset offset) const; 305 gfx::ScrollOffset ClampScrollOffsetToLimits(gfx::ScrollOffset offset) const;
304 gfx::Vector2dF ClampScrollToMaxScrollOffset(); 306 gfx::Vector2dF ClampScrollToMaxScrollOffset();
305 307
306 // Returns the delta of the scroll that was outside of the bounds of the 308 // Returns the delta of the scroll that was outside of the bounds of the
307 // initial scroll 309 // initial scroll
308 gfx::Vector2dF ScrollBy(const gfx::Vector2dF& scroll); 310 gfx::Vector2dF ScrollBy(const gfx::Vector2dF& scroll);
309 311
310 void SetScrollClipLayer(int scroll_clip_layer_id); 312 // TODO(tapted): Remove this overload.
313 void SetScrollClipLayer(int scroll_clip_layer_id) {
314 SetScrollClipAndCanOverscroll(scroll_clip_layer_id, false);
315 }
316 void SetScrollClipAndCanOverscroll(int scroll_clip_layer_id,
317 bool can_overscroll);
311 int scroll_clip_layer_id() const { return scroll_clip_layer_id_; } 318 int scroll_clip_layer_id() const { return scroll_clip_layer_id_; }
312 LayerImpl* scroll_clip_layer() const; 319 LayerImpl* scroll_clip_layer() const;
313 bool scrollable() const; 320 bool scrollable() const;
321 bool can_overscroll() const { return can_overscroll_; }
314 322
315 void set_user_scrollable_horizontal(bool scrollable); 323 void set_user_scrollable_horizontal(bool scrollable);
316 bool user_scrollable_horizontal() const { 324 bool user_scrollable_horizontal() const {
317 return user_scrollable_horizontal_; 325 return user_scrollable_horizontal_;
318 } 326 }
319 void set_user_scrollable_vertical(bool scrollable); 327 void set_user_scrollable_vertical(bool scrollable);
320 bool user_scrollable_vertical() const { return user_scrollable_vertical_; } 328 bool user_scrollable_vertical() const { return user_scrollable_vertical_; }
321 329
322 bool user_scrollable(ScrollbarOrientation orientation) const; 330 bool user_scrollable(ScrollbarOrientation orientation) const;
323 331
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 511
504 // Properties synchronized from the associated Layer. 512 // Properties synchronized from the associated Layer.
505 gfx::Size bounds_; 513 gfx::Size bounds_;
506 int scroll_clip_layer_id_; 514 int scroll_clip_layer_id_;
507 515
508 gfx::Vector2dF offset_to_transform_parent_; 516 gfx::Vector2dF offset_to_transform_parent_;
509 uint32_t main_thread_scrolling_reasons_; 517 uint32_t main_thread_scrolling_reasons_;
510 518
511 bool user_scrollable_horizontal_ : 1; 519 bool user_scrollable_horizontal_ : 1;
512 bool user_scrollable_vertical_ : 1; 520 bool user_scrollable_vertical_ : 1;
521 bool can_overscroll_ : 1;
513 bool should_flatten_transform_from_property_tree_ : 1; 522 bool should_flatten_transform_from_property_tree_ : 1;
514 523
515 // Tracks if drawing-related properties have changed since last redraw. 524 // Tracks if drawing-related properties have changed since last redraw.
516 bool layer_property_changed_ : 1; 525 bool layer_property_changed_ : 1;
517 bool may_contain_video_ : 1; 526 bool may_contain_video_ : 1;
518 527
519 bool masks_to_bounds_ : 1; 528 bool masks_to_bounds_ : 1;
520 bool contents_opaque_ : 1; 529 bool contents_opaque_ : 1;
521 bool use_parent_backface_visibility_ : 1; 530 bool use_parent_backface_visibility_ : 1;
522 bool use_local_transform_for_backface_visibility_ : 1; 531 bool use_local_transform_for_backface_visibility_ : 1;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 bool scrolls_drawn_descendant_ : 1; 588 bool scrolls_drawn_descendant_ : 1;
580 bool has_will_change_transform_hint_ : 1; 589 bool has_will_change_transform_hint_ : 1;
581 bool needs_push_properties_ : 1; 590 bool needs_push_properties_ : 1;
582 591
583 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 592 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
584 }; 593 };
585 594
586 } // namespace cc 595 } // namespace cc
587 596
588 #endif // CC_LAYERS_LAYER_IMPL_H_ 597 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698