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

Side by Side Diff: Source/platform/scroll/ScrollableArea.h

Issue 977663002: Mac: Delete now-dead elastic overscroll code (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « Source/platform/scroll/ScrollTypes.h ('k') | Source/platform/scroll/ScrollableArea.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 void notifyScrollPositionChanged(const DoublePoint&); 77 void notifyScrollPositionChanged(const DoublePoint&);
78 78
79 static bool scrollBehaviorFromString(const String&, ScrollBehavior&); 79 static bool scrollBehaviorFromString(const String&, ScrollBehavior&);
80 80
81 ScrollResult handleWheelEvent(const PlatformWheelEvent&); 81 ScrollResult handleWheelEvent(const PlatformWheelEvent&);
82 82
83 // Functions for controlling if you can scroll past the end of the document. 83 // Functions for controlling if you can scroll past the end of the document.
84 bool constrainsScrollingToContentEdge() const { return m_constrainsScrolling ToContentEdge; } 84 bool constrainsScrollingToContentEdge() const { return m_constrainsScrolling ToContentEdge; }
85 void setConstrainsScrollingToContentEdge(bool constrainsScrollingToContentEd ge) { m_constrainsScrollingToContentEdge = constrainsScrollingToContentEdge; } 85 void setConstrainsScrollingToContentEdge(bool constrainsScrollingToContentEd ge) { m_constrainsScrollingToContentEdge = constrainsScrollingToContentEdge; }
86 86
87 void setVerticalScrollElasticity(ScrollElasticity scrollElasticity) { m_vert icalScrollElasticity = scrollElasticity; }
88 ScrollElasticity verticalScrollElasticity() const { return static_cast<Scrol lElasticity>(m_verticalScrollElasticity); }
89
90 void setHorizontalScrollElasticity(ScrollElasticity scrollElasticity) { m_ho rizontalScrollElasticity = scrollElasticity; }
91 ScrollElasticity horizontalScrollElasticity() const { return static_cast<Scr ollElasticity>(m_horizontalScrollElasticity); }
92
93 void setHasViewportConstrainedObjectsForScrollCompensation(bool hasViewportC onstrainedObjects) { m_hasViewportConstrainedObjectsForScrollCompensation = hasV iewportConstrainedObjects; } 87 void setHasViewportConstrainedObjectsForScrollCompensation(bool hasViewportC onstrainedObjects) { m_hasViewportConstrainedObjectsForScrollCompensation = hasV iewportConstrainedObjects; }
94 bool hasViewportConstrainedObjectsForScrollCompensation() const { return m_h asViewportConstrainedObjectsForScrollCompensation; } 88 bool hasViewportConstrainedObjectsForScrollCompensation() const { return m_h asViewportConstrainedObjectsForScrollCompensation; }
95 89
96 bool inLiveResize() const { return m_inLiveResize; } 90 bool inLiveResize() const { return m_inLiveResize; }
97 void willStartLiveResize(); 91 void willStartLiveResize();
98 void willEndLiveResize(); 92 void willEndLiveResize();
99 93
100 void contentAreaWillPaint() const; 94 void contentAreaWillPaint() const;
101 void mouseEnteredContentArea() const; 95 void mouseEnteredContentArea() const;
102 void mouseExitedContentArea() const; 96 void mouseExitedContentArea() const;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 virtual IntPoint lastKnownMousePosition() const { return IntPoint(); } 186 virtual IntPoint lastKnownMousePosition() const { return IntPoint(); }
193 187
194 virtual bool shouldSuspendScrollAnimations() const { return true; } 188 virtual bool shouldSuspendScrollAnimations() const { return true; }
195 virtual void scrollbarStyleChanged() { } 189 virtual void scrollbarStyleChanged() { }
196 190
197 virtual bool scrollbarsCanBeActive() const = 0; 191 virtual bool scrollbarsCanBeActive() const = 0;
198 192
199 // Returns the bounding box of this scrollable area, in the coordinate syste m of the enclosing scroll view. 193 // Returns the bounding box of this scrollable area, in the coordinate syste m of the enclosing scroll view.
200 virtual IntRect scrollableAreaBoundingBox() const = 0; 194 virtual IntRect scrollableAreaBoundingBox() const = 0;
201 195
202 virtual bool isRubberBandInProgress() const { return false; }
203 virtual bool rubberBandingOnCompositorThread() const { return false; }
204
205 virtual bool scrollAnimatorEnabled() const { return false; } 196 virtual bool scrollAnimatorEnabled() const { return false; }
206 197
207 // NOTE: Only called from Internals for testing. 198 // NOTE: Only called from Internals for testing.
208 void setScrollOffsetFromInternals(const IntPoint&); 199 void setScrollOffsetFromInternals(const IntPoint&);
209 200
210 IntPoint clampScrollPosition(const IntPoint&) const; 201 IntPoint clampScrollPosition(const IntPoint&) const;
211 202
212 // Let subclasses provide a way of asking for and servicing scroll 203 // Let subclasses provide a way of asking for and servicing scroll
213 // animations. 204 // animations.
214 bool scheduleAnimation(); 205 bool scheduleAnimation();
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 struct ScrollableAreaAnimators { 300 struct ScrollableAreaAnimators {
310 RefPtr<ScrollAnimator> scrollAnimator; 301 RefPtr<ScrollAnimator> scrollAnimator;
311 OwnPtr<ProgrammaticScrollAnimator> programmaticScrollAnimator; 302 OwnPtr<ProgrammaticScrollAnimator> programmaticScrollAnimator;
312 }; 303 };
313 304
314 mutable OwnPtr<ScrollableAreaAnimators> m_animators; 305 mutable OwnPtr<ScrollableAreaAnimators> m_animators;
315 unsigned m_constrainsScrollingToContentEdge : 1; 306 unsigned m_constrainsScrollingToContentEdge : 1;
316 307
317 unsigned m_inLiveResize : 1; 308 unsigned m_inLiveResize : 1;
318 309
319 unsigned m_verticalScrollElasticity : 2; // ScrollElasticity
320 unsigned m_horizontalScrollElasticity : 2; // ScrollElasticity
321
322 unsigned m_scrollbarOverlayStyle : 2; // ScrollbarOverlayStyle 310 unsigned m_scrollbarOverlayStyle : 2; // ScrollbarOverlayStyle
323 311
324 unsigned m_scrollOriginChanged : 1; 312 unsigned m_scrollOriginChanged : 1;
325 313
326 unsigned m_hasViewportConstrainedObjectsForScrollCompensation : 1; 314 unsigned m_hasViewportConstrainedObjectsForScrollCompensation : 1;
327 315
328 // There are 8 possible combinations of writing mode and direction. Scroll o rigin will be non-zero in the x or y axis 316 // There are 8 possible combinations of writing mode and direction. Scroll o rigin will be non-zero in the x or y axis
329 // if there is any reversed direction or writing-mode. The combinations are: 317 // if there is any reversed direction or writing-mode. The combinations are:
330 // writing-mode / direction scrollOrigin.x() set scrollOrigin.y() set 318 // writing-mode / direction scrollOrigin.x() set scrollOrigin.y() set
331 // horizontal-tb / ltr NO NO 319 // horizontal-tb / ltr NO NO
332 // horizontal-tb / rtl YES NO 320 // horizontal-tb / rtl YES NO
333 // horizontal-bt / ltr NO YES 321 // horizontal-bt / ltr NO YES
334 // horizontal-bt / rtl YES YES 322 // horizontal-bt / rtl YES YES
335 // vertical-lr / ltr NO NO 323 // vertical-lr / ltr NO NO
336 // vertical-lr / rtl NO YES 324 // vertical-lr / rtl NO YES
337 // vertical-rl / ltr YES NO 325 // vertical-rl / ltr YES NO
338 // vertical-rl / rtl YES YES 326 // vertical-rl / rtl YES YES
339 IntPoint m_scrollOrigin; 327 IntPoint m_scrollOrigin;
340 }; 328 };
341 329
342 } // namespace blink 330 } // namespace blink
343 331
344 #endif // ScrollableArea_h 332 #endif // ScrollableArea_h
OLDNEW
« no previous file with comments | « Source/platform/scroll/ScrollTypes.h ('k') | Source/platform/scroll/ScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698