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

Unified Diff: Source/platform/scroll/Scrollbar.cpp

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/Scrollbar.h ('k') | Source/platform/scroll/ScrollbarStateTransitionAnimator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/scroll/Scrollbar.cpp
diff --git a/Source/platform/scroll/Scrollbar.cpp b/Source/platform/scroll/Scrollbar.cpp
index afea041f44173813c64cf9b4ceed4761658d1b6f..f1586b62e38e51620258ebc08a7b102edbc223a2 100644
--- a/Source/platform/scroll/Scrollbar.cpp
+++ b/Source/platform/scroll/Scrollbar.cpp
@@ -531,6 +531,33 @@ bool Scrollbar::isOverlayScrollbar() const
return m_theme->usesOverlayScrollbars();
}
+bool Scrollbar::isDuringStateTransitionAnimation() const
+{
+ return m_enabled && isOverlayScrollbar() && m_scrollableArea->isDuringStateTransitionAnimation();
+}
+
+double Scrollbar::stateTransitionProgress() const
+{
+ return m_stateTransitionProgress;
+}
+
+blink::WebThemeEngine::State Scrollbar::stateTransitionStartState() const
+{
+ return m_startState;
+}
+
+blink::WebThemeEngine::State Scrollbar::stateTransitionEndState() const
+{
+ return m_endState;
+}
+
+void Scrollbar::updateStateTransitionData(blink::WebThemeEngine::State startState, blink::WebThemeEngine::State endState, double progress)
+{
+ m_startState = startState;
+ m_endState = endState;
+ m_stateTransitionProgress = progress;
+ updateThumb();
+}
bool Scrollbar::shouldParticipateInHitTesting()
{
// Non-overlay scrollbars should always participate in hit testing.
« no previous file with comments | « Source/platform/scroll/Scrollbar.h ('k') | Source/platform/scroll/ScrollbarStateTransitionAnimator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698