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

Unified Diff: Source/platform/scroll/ScrollableArea.h

Issue 246293006: Blink Support for Overlay Scrollbar Animation Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix unittest and move unittest to blink_platform_unittests Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/scroll/ScrollAnimatorNone.cpp ('k') | Source/platform/scroll/ScrollableArea.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/scroll/ScrollableArea.h
diff --git a/Source/platform/scroll/ScrollableArea.h b/Source/platform/scroll/ScrollableArea.h
index b710d7d48efd7b1847df169a1666697405f0c095..95015f3c46415c89be4f45408e4a03ff41fa8f5d 100644
--- a/Source/platform/scroll/ScrollableArea.h
+++ b/Source/platform/scroll/ScrollableArea.h
@@ -40,6 +40,7 @@ class HostWindow;
class PlatformWheelEvent;
class ProgrammaticScrollAnimator;
class ScrollAnimator;
+class ScrollbarStateTransitionAnimator;
enum ScrollBehavior {
ScrollBehaviorAuto,
@@ -107,7 +108,7 @@ public:
virtual void contentsResized();
- bool hasOverlayScrollbars() const;
+ virtual bool hasOverlayScrollbars() const;
void setScrollbarOverlayStyle(ScrollbarOverlayStyle);
ScrollbarOverlayStyle scrollbarOverlayStyle() const { return static_cast<ScrollbarOverlayStyle>(m_scrollbarOverlayStyle); }
@@ -123,6 +124,17 @@ public:
return m_animators ? m_animators->programmaticScrollAnimator.get() : 0;
}
+ // This getter will create a ScrollbarStateTransitionAnimator if needed and doesn't already exist.
+ ScrollbarStateTransitionAnimator* scrollbarStateTransitionAnimator() const;
+ // This getter will return null if the ScrollbarStateTransitionAnimator hasn't been created yet.
+ ScrollbarStateTransitionAnimator* existingScrollbarStateTransitionAnimator() const
+ {
+ return m_animators ? m_animators->scrollbarStateTransitionAnimator.get() : 0;
+ }
+
+ bool isDuringStateTransitionAnimation() const;
+ void stateTransitionInProgress();
+
const IntPoint& scrollOrigin() const { return m_scrollOrigin; }
bool scrollOriginChanged() const { return m_scrollOriginChanged; }
@@ -192,6 +204,7 @@ public:
// animations.
bool scheduleAnimation();
void serviceScrollAnimations(double monotonicTime);
+ void serviceScrollbarAnimations();
virtual bool usesCompositedScrolling() const { return false; }
@@ -270,6 +283,7 @@ private:
struct ScrollableAreaAnimators {
OwnPtr<ScrollAnimator> scrollAnimator;
OwnPtr<ProgrammaticScrollAnimator> programmaticScrollAnimator;
+ OwnPtr<ScrollbarStateTransitionAnimator> scrollbarStateTransitionAnimator;
};
mutable OwnPtr<ScrollableAreaAnimators> m_animators;
« no previous file with comments | « Source/platform/scroll/ScrollAnimatorNone.cpp ('k') | Source/platform/scroll/ScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698