Title: [114770] trunk/Source/WebCore
Revision
114770
Author
toniki...@webkit.org
Date
2012-04-20 12:11:52 -0700 (Fri, 20 Apr 2012)

Log Message

Relax ScrollView::adjustScrollPositionWithinRange in case constrainsScrollingToContentEdge is false
https://bugs.webkit.org/show_bug.cgi?id=84178

Reviewed by Adam Treat.
Patch by Antonio Gomes <ago...@rim.com>

No new tests since it is not easily testable.

When a port has both delegatesScrolling and constrainsScrollingToContentEdge set to FALSE
(i.e. it accepts overscrolled position), calling ScrollView::setScrollPosition with an overscrolled
position still gets the position clamped to the content size edges.

Patch relaxes ::adjustScrollPositionWithinRange in that sense in order to track the actual scroll
position.

Note: ScrollView::setScrollOffset already does something similar.

* platform/ScrollView.cpp:
(WebCore::ScrollView::adjustScrollPositionWithinRange):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (114769 => 114770)


--- trunk/Source/WebCore/ChangeLog	2012-04-20 19:09:25 UTC (rev 114769)
+++ trunk/Source/WebCore/ChangeLog	2012-04-20 19:11:52 UTC (rev 114770)
@@ -1,3 +1,24 @@
+2012-04-17  Antonio Gomes  <ago...@rim.com>
+
+        Relax ScrollView::adjustScrollPositionWithinRange in case constrainsScrollingToContentEdge is false
+        https://bugs.webkit.org/show_bug.cgi?id=84178
+
+        Reviewed by Adam Treat.
+
+        No new tests since it is not easily testable.
+
+        When a port has both delegatesScrolling and constrainsScrollingToContentEdge set to FALSE
+        (i.e. it accepts overscrolled position), calling ScrollView::setScrollPosition with an overscrolled
+        position still gets the position clamped to the content size edges.
+
+        Patch relaxes ::adjustScrollPositionWithinRange in that sense in order to track the actual scroll
+        position.
+
+        Note: ScrollView::setScrollOffset already does something similar.
+
+        * platform/ScrollView.cpp:
+        (WebCore::ScrollView::adjustScrollPositionWithinRange):
+
 2012-04-20  Sheriff Bot  <webkit.review....@gmail.com>
 
         Unreviewed, rolling out r114535.

Modified: trunk/Source/WebCore/platform/ScrollView.cpp (114769 => 114770)


--- trunk/Source/WebCore/platform/ScrollView.cpp	2012-04-20 19:09:25 UTC (rev 114769)
+++ trunk/Source/WebCore/platform/ScrollView.cpp	2012-04-20 19:11:52 UTC (rev 114770)
@@ -319,6 +319,9 @@
 
 IntPoint ScrollView::adjustScrollPositionWithinRange(const IntPoint& scrollPoint) const
 {
+    if (!constrainsScrollingToContentEdge())
+        return scrollPoint;
+
     IntPoint newScrollPosition = scrollPoint.shrunkTo(maximumScrollPosition());
     newScrollPosition = newScrollPosition.expandedTo(minimumScrollPosition());
     return newScrollPosition;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to