Title: [103634] trunk/Source/WebCore
- Revision
- 103634
- Author
- [email protected]
- Date
- 2011-12-23 10:18:23 -0800 (Fri, 23 Dec 2011)
Log Message
Add two (currently unused) new member functions to ScrollElasticityControllerClient
https://bugs.webkit.org/show_bug.cgi?id=75179
Reviewed by Dan Bernstein.
This is so we'll be able to move more code to ScrollElasticityController.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::pinnedInDirection):
(WebCore::ScrollAnimatorMac::immediateScrollByWithoutContentEdgeConstraints):
* platform/mac/ScrollElasticityController.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (103633 => 103634)
--- trunk/Source/WebCore/ChangeLog 2011-12-23 17:34:34 UTC (rev 103633)
+++ trunk/Source/WebCore/ChangeLog 2011-12-23 18:18:23 UTC (rev 103634)
@@ -1,3 +1,18 @@
+2011-12-23 Anders Carlsson <[email protected]>
+
+ Add two (currently unused) new member functions to ScrollElasticityControllerClient
+ https://bugs.webkit.org/show_bug.cgi?id=75179
+
+ Reviewed by Dan Bernstein.
+
+ This is so we'll be able to move more code to ScrollElasticityController.
+
+ * platform/mac/ScrollAnimatorMac.h:
+ * platform/mac/ScrollAnimatorMac.mm:
+ (WebCore::ScrollAnimatorMac::pinnedInDirection):
+ (WebCore::ScrollAnimatorMac::immediateScrollByWithoutContentEdgeConstraints):
+ * platform/mac/ScrollElasticityController.h:
+
2011-12-23 Simon Fraser <[email protected]>
Blur filter doesn't invalidate enough
Modified: trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.h (103633 => 103634)
--- trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.h 2011-12-23 17:34:34 UTC (rev 103633)
+++ trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.h 2011-12-23 18:18:23 UTC (rev 103634)
@@ -124,11 +124,12 @@
void immediateScrollTo(const FloatPoint&);
void immediateScrollBy(const FloatSize&);
- void immediateScrollByWithoutContentEdgeConstraints(const FloatSize&);
#if ENABLE(RUBBER_BANDING)
/// ScrollElasticityControllerClient member functions.
virtual IntSize stretchAmount() OVERRIDE;
+ virtual bool pinnedInDirection(const FloatSize&) OVERRIDE;
+ virtual void immediateScrollByWithoutContentEdgeConstraints(const FloatSize&) OVERRIDE;
virtual void startSnapRubberbandTimer() OVERRIDE;
virtual void stopSnapRubberbandTimer() OVERRIDE;
Modified: trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm (103633 => 103634)
--- trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm 2011-12-23 17:34:34 UTC (rev 103633)
+++ trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm 2011-12-23 18:18:23 UTC (rev 103634)
@@ -703,13 +703,6 @@
notifyPositionChanged();
}
-void ScrollAnimatorMac::immediateScrollByWithoutContentEdgeConstraints(const FloatSize& delta)
-{
- m_scrollableArea->setConstrainsScrollingToContentEdge(false);
- immediateScrollBy(delta);
- m_scrollableArea->setConstrainsScrollingToContentEdge(true);
-}
-
void ScrollAnimatorMac::immediateScrollToPointForScrollAnimation(const FloatPoint& newPosition)
{
ASSERT(m_scrollAnimationHelper);
@@ -1067,6 +1060,18 @@
return m_scrollableArea->overhangAmount();
}
+bool ScrollAnimatorMac::pinnedInDirection(const FloatSize& direction)
+{
+ return pinnedInDirection(direction.width(), direction.height());
+}
+
+void ScrollAnimatorMac::immediateScrollByWithoutContentEdgeConstraints(const FloatSize& delta)
+{
+ m_scrollableArea->setConstrainsScrollingToContentEdge(false);
+ immediateScrollBy(delta);
+ m_scrollableArea->setConstrainsScrollingToContentEdge(true);
+}
+
void ScrollAnimatorMac::startSnapRubberbandTimer()
{
m_snapRubberBandTimer.startRepeating(1.0 / 60.0);
Modified: trunk/Source/WebCore/platform/mac/ScrollElasticityController.h (103633 => 103634)
--- trunk/Source/WebCore/platform/mac/ScrollElasticityController.h 2011-12-23 17:34:34 UTC (rev 103633)
+++ trunk/Source/WebCore/platform/mac/ScrollElasticityController.h 2011-12-23 18:18:23 UTC (rev 103634)
@@ -40,7 +40,8 @@
public:
virtual IntSize stretchAmount() = 0;
-
+ virtual bool pinnedInDirection(const FloatSize&) = 0;
+ virtual void immediateScrollByWithoutContentEdgeConstraints(const FloatSize&) = 0;
virtual void startSnapRubberbandTimer() = 0;
virtual void stopSnapRubberbandTimer() = 0;
};
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes