Scrolling with platformWidget and delegateScrolling is incorrectly clamped
https://bugs.webkit.org/show_bug.cgi?id=117369
<rdar://problem/13985064>

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-06-09
Reviewed by Darin Adler.

The patch http://trac.webkit.org/changeset/142526 clamps the input position
in the ScrollView scroll range. This was done for the path to the ScrollingCoordinator.

The problem with that change is ScrollView::setScrollPosition() can delegate the scrolling
to either a platformWidget, or through delegateScrolling. After r142526, the position is clamped,
and we do not let those external scrolling mechanims handle the out-of-bound scrolling.

This patch fixes the issue by moving the threaded scrolling call to ScrollView,
after the delegate handling code.

* page/FrameView.cpp:
(WebCore::FrameView::setScrollPosition):
(WebCore::FrameView::requestScrollPositionUpdate):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151356 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/platform/ScrollView.cpp b/Source/WebCore/platform/ScrollView.cpp
index 11e126a..313e267 100644
--- a/Source/WebCore/platform/ScrollView.cpp
+++ b/Source/WebCore/platform/ScrollView.cpp
@@ -425,6 +425,9 @@
     if (newScrollPosition == scrollPosition())
         return;
 
+    if (requestScrollPositionUpdate(newScrollPosition))
+        return;
+
     updateScrollbars(IntSize(newScrollPosition.x(), newScrollPosition.y()));
 }