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

Unified Diff: sky/engine/platform/scroll/ScrollableArea.cpp

Issue 720713003: Remove WebScroll* (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/platform/scroll/ScrollableArea.h ('k') | sky/engine/platform/scroll/Scrollbar.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/platform/scroll/ScrollableArea.cpp
diff --git a/sky/engine/platform/scroll/ScrollableArea.cpp b/sky/engine/platform/scroll/ScrollableArea.cpp
index f12031840acf4053b7c94a9acdf775896fc9b0b1..26ef19f4df319bda8e82b15ec4e960f1fc17a945 100644
--- a/sky/engine/platform/scroll/ScrollableArea.cpp
+++ b/sky/engine/platform/scroll/ScrollableArea.cpp
@@ -36,7 +36,6 @@
#include "platform/Logging.h"
#include "platform/graphics/GraphicsLayer.h"
#include "platform/geometry/FloatPoint.h"
-#include "platform/scroll/ProgrammaticScrollAnimator.h"
#include "platform/scroll/Scrollbar.h"
#include "wtf/PassOwnPtr.h"
@@ -98,17 +97,6 @@ ScrollAnimator* ScrollableArea::scrollAnimator() const
return m_animators->scrollAnimator.get();
}
-ProgrammaticScrollAnimator* ScrollableArea::programmaticScrollAnimator() const
-{
- if (!m_animators)
- m_animators = adoptPtr(new ScrollableAreaAnimators);
-
- if (!m_animators->programmaticScrollAnimator)
- m_animators->programmaticScrollAnimator = ProgrammaticScrollAnimator::create(const_cast<ScrollableArea*>(this));
-
- return m_animators->programmaticScrollAnimator.get();
-}
-
void ScrollableArea::setScrollOrigin(const IntPoint& origin)
{
if (m_scrollOrigin != origin) {
@@ -129,8 +117,6 @@ bool ScrollableArea::scroll(ScrollDirection direction, ScrollGranularity granula
if (!userInputScrollable(orientation))
return false;
- cancelProgrammaticScrollAnimation();
-
float step = 0;
switch (granularity) {
case ScrollByLine:
@@ -156,7 +142,6 @@ bool ScrollableArea::scroll(ScrollDirection direction, ScrollGranularity granula
void ScrollableArea::scrollToOffsetWithoutAnimation(const FloatPoint& offset)
{
- cancelProgrammaticScrollAnimation();
scrollAnimator()->scrollToOffsetWithoutAnimation(offset);
}
@@ -168,13 +153,6 @@ void ScrollableArea::scrollToOffsetWithoutAnimation(ScrollbarOrientation orienta
scrollToOffsetWithoutAnimation(FloatPoint(scrollAnimator()->currentPosition().x(), offset));
}
-void ScrollableArea::programmaticallyScrollSmoothlyToOffset(const FloatPoint& offset)
-{
- if (ScrollAnimator* scrollAnimator = existingScrollAnimator())
- scrollAnimator->cancelAnimations();
- programmaticScrollAnimator()->animateToOffset(offset);
-}
-
void ScrollableArea::notifyScrollPositionChanged(const IntPoint& position)
{
scrollPositionChanged(position);
@@ -236,7 +214,6 @@ bool ScrollableArea::handleWheelEvent(const PlatformWheelEvent& wheelEvent)
if (wheelEvent.modifiers() & PlatformEvent::CtrlKey)
return false;
- cancelProgrammaticScrollAnimation();
return scrollAnimator()->handleWheelEvent(wheelEvent);
}
@@ -382,14 +359,6 @@ void ScrollableArea::serviceScrollAnimations(double monotonicTime)
{
if (ScrollAnimator* scrollAnimator = existingScrollAnimator())
scrollAnimator->serviceScrollAnimations();
- if (ProgrammaticScrollAnimator* programmaticScrollAnimator = existingProgrammaticScrollAnimator())
- programmaticScrollAnimator->tickAnimation(monotonicTime);
-}
-
-void ScrollableArea::cancelProgrammaticScrollAnimation()
-{
- if (ProgrammaticScrollAnimator* programmaticScrollAnimator = existingProgrammaticScrollAnimator())
- programmaticScrollAnimator->cancelAnimation();
}
IntPoint ScrollableArea::clampScrollPosition(const IntPoint& scrollPosition) const
« no previous file with comments | « sky/engine/platform/scroll/ScrollableArea.h ('k') | sky/engine/platform/scroll/Scrollbar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698