Title: [104345] trunk/Source/WebCore
- Revision
- 104345
- Author
- [email protected]
- Date
- 2012-01-06 14:58:50 -0800 (Fri, 06 Jan 2012)
Log Message
Add and use ScrollElasticityControllerClient::absoluteScrollPosition
https://bugs.webkit.org/show_bug.cgi?id=75744
Reviewed by Dan Bernstein.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::absoluteScrollPosition):
(WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
* platform/mac/ScrollElasticityController.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (104344 => 104345)
--- trunk/Source/WebCore/ChangeLog 2012-01-06 22:54:54 UTC (rev 104344)
+++ trunk/Source/WebCore/ChangeLog 2012-01-06 22:58:50 UTC (rev 104345)
@@ -1,3 +1,16 @@
+2012-01-06 Anders Carlsson <[email protected]>
+
+ Add and use ScrollElasticityControllerClient::absoluteScrollPosition
+ https://bugs.webkit.org/show_bug.cgi?id=75744
+
+ Reviewed by Dan Bernstein.
+
+ * platform/mac/ScrollAnimatorMac.h:
+ * platform/mac/ScrollAnimatorMac.mm:
+ (WebCore::ScrollAnimatorMac::absoluteScrollPosition):
+ (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
+ * platform/mac/ScrollElasticityController.h:
+
2012-01-06 Adam Barth <[email protected]>
Move FrameDestructionObserver to its own file
Modified: trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.h (104344 => 104345)
--- trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.h 2012-01-06 22:54:54 UTC (rev 104344)
+++ trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.h 2012-01-06 22:58:50 UTC (rev 104345)
@@ -130,6 +130,7 @@
virtual bool pinnedInDirection(const FloatSize&) OVERRIDE;
virtual bool canScrollHorizontally() OVERRIDE;
virtual bool canScrollVertically() OVERRIDE;
+ virtual WebCore::IntPoint absoluteScrollPosition() OVERRIDE;
virtual void immediateScrollByWithoutContentEdgeConstraints(const FloatSize&) OVERRIDE;
virtual void immediateScrollBy(const FloatSize&) OVERRIDE;
virtual void startSnapRubberbandTimer() OVERRIDE;
Modified: trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm (104344 => 104345)
--- trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm 2012-01-06 22:54:54 UTC (rev 104344)
+++ trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm 2012-01-06 22:58:50 UTC (rev 104345)
@@ -1068,6 +1068,11 @@
return scrollbar->enabled();
}
+IntPoint ScrollAnimatorMac::absoluteScrollPosition()
+{
+ return m_scrollableArea->visibleContentRect().location() + m_scrollableArea->scrollOrigin();
+}
+
void ScrollAnimatorMac::immediateScrollByWithoutContentEdgeConstraints(const FloatSize& delta)
{
m_scrollableArea->setConstrainsScrollingToContentEdge(false);
@@ -1350,7 +1355,7 @@
return;
}
- m_scrollElasticityController.m_origOrigin = (m_scrollableArea->visibleContentRect().location() + m_scrollableArea->scrollOrigin()) - m_scrollElasticityController.m_startStretch;
+ m_scrollElasticityController.m_origOrigin = m_scrollElasticityController.m_client->absoluteScrollPosition() - m_scrollElasticityController.m_startStretch;
m_scrollElasticityController.m_origVelocity = m_scrollElasticityController.m_momentumVelocity;
// Just like normal scrolling, prefer vertical rubberbanding
Modified: trunk/Source/WebCore/platform/mac/ScrollElasticityController.h (104344 => 104345)
--- trunk/Source/WebCore/platform/mac/ScrollElasticityController.h 2012-01-06 22:54:54 UTC (rev 104344)
+++ trunk/Source/WebCore/platform/mac/ScrollElasticityController.h 2012-01-06 22:58:50 UTC (rev 104345)
@@ -43,6 +43,10 @@
virtual bool pinnedInDirection(const FloatSize&) = 0;
virtual bool canScrollHorizontally() = 0;
virtual bool canScrollVertically() = 0;
+
+ // Return the absolute scroll position, not relative to the scroll origin.
+ virtual WebCore::IntPoint absoluteScrollPosition() = 0;
+
virtual void immediateScrollBy(const FloatSize&) = 0;
virtual void immediateScrollByWithoutContentEdgeConstraints(const FloatSize&) = 0;
virtual void startSnapRubberbandTimer() = 0;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes