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

Side by Side Diff: third_party/WebKit/Source/platform/scroll/ScrollAnimatorBase.h

Issue 1496693005: Update RootFrameViewport::userScroll to distribute scrolls between viewports. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2010, Google Inc. All rights reserved. 2 * Copyright (c) 2010, Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 virtual void setIsActive() { } 66 virtual void setIsActive() { }
67 67
68 #if OS(MACOSX) 68 #if OS(MACOSX)
69 virtual void handleWheelEventPhase(PlatformWheelEventPhase) { } 69 virtual void handleWheelEventPhase(PlatformWheelEventPhase) { }
70 #endif 70 #endif
71 71
72 void setCurrentPosition(const FloatPoint&); 72 void setCurrentPosition(const FloatPoint&);
73 FloatPoint currentPosition() const; 73 FloatPoint currentPosition() const;
74 74
75 // Returns how much of pixelDelta will be used by the underlying scrollable
76 // area.
77 virtual float computeDeltaToConsume(ScrollbarOrientation, float pixelDelta) const;
78
75 virtual void cancelAnimations() { } 79 virtual void cancelAnimations() { }
76 virtual void serviceScrollAnimations() { } 80 virtual void serviceScrollAnimations() { }
77 virtual bool hasRunningAnimation() const { return false; } 81 virtual bool hasRunningAnimation() const { return false; }
78 82
79 virtual void contentAreaWillPaint() const { } 83 virtual void contentAreaWillPaint() const { }
80 virtual void mouseEnteredContentArea() const { } 84 virtual void mouseEnteredContentArea() const { }
81 virtual void mouseExitedContentArea() const { } 85 virtual void mouseExitedContentArea() const { }
82 virtual void mouseMovedInContentArea() const { } 86 virtual void mouseMovedInContentArea() const { }
83 virtual void mouseEnteredScrollbar(Scrollbar&) const { } 87 virtual void mouseEnteredScrollbar(Scrollbar&) const { }
84 virtual void mouseExitedScrollbar(Scrollbar&) const { } 88 virtual void mouseExitedScrollbar(Scrollbar&) const { }
(...skipping 17 matching lines...) Expand all
102 106
103 virtual bool setScrollbarsVisibleForTesting(bool) { return false; } 107 virtual bool setScrollbarsVisibleForTesting(bool) { return false; }
104 108
105 DECLARE_VIRTUAL_TRACE(); 109 DECLARE_VIRTUAL_TRACE();
106 110
107 protected: 111 protected:
108 explicit ScrollAnimatorBase(ScrollableArea*); 112 explicit ScrollAnimatorBase(ScrollableArea*);
109 113
110 virtual void notifyPositionChanged(); 114 virtual void notifyPositionChanged();
111 115
116 float clampScrollPosition(ScrollbarOrientation, float) const;
117
112 RawPtrWillBeMember<ScrollableArea> m_scrollableArea; 118 RawPtrWillBeMember<ScrollableArea> m_scrollableArea;
113 float m_currentPosX; // We avoid using a FloatPoint in order to reduce 119 float m_currentPosX; // We avoid using a FloatPoint in order to reduce
114 float m_currentPosY; // subclass code complexity. 120 float m_currentPosY; // subclass code complexity.
115
116 private:
117 float clampScrollPosition(ScrollbarOrientation, float);
118 }; 121 };
119 122
120 } // namespace blink 123 } // namespace blink
121 124
122 #endif // ScrollAnimatorBase_h 125 #endif // ScrollAnimatorBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698