[Windows] Attempting to scroll from a non-scrollable layer results the main document...
authorroger_fong@apple.com <roger_fong@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Sep 2013 23:24:48 +0000 (23:24 +0000)
committerroger_fong@apple.com <roger_fong@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Sep 2013 23:24:48 +0000 (23:24 +0000)
https://bugs.webkit.org/show_bug.cgi?id=121889.
<rdar://problem/15072441>

* WebView.cpp:
(WebView::gesture):
Call scrollByRecursively on the current RenderLayer's enclosingScrollableLayer to make sure that the method
doesn't bail early and end up just scrolling the main document instead of the next scrollable layer in the RenderLayer tree.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156433 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/win/ChangeLog
Source/WebKit/win/WebView.cpp

index bd121699d06591f136a0d947d45ed0e00773fc5d..4fc5cffb4b42c3a2433a8ad751e9e2d218a0f849 100644 (file)
@@ -1,3 +1,16 @@
+2013-09-25  Roger Fong  <roger_fong@apple.com>
+
+        [Windows] Attempting to scroll from a non-scrollable layer results the main document getting scrolled.
+        https://bugs.webkit.org/show_bug.cgi?id=121889.
+        <rdar://problem/15072441>
+
+        Reviewed by Timothy Horton.
+
+        * WebView.cpp:
+        (WebView::gesture): 
+        Call scrollByRecursively on the current RenderLayer's enclosingScrollableLayer to make sure that the method
+        doesn't bail early and end up just scrolling the main document instead of the next scrollable layer in the RenderLayer tree.
+
 2013-09-25  Patrick Gansterer  <paroga@webkit.org>
 
         [WIN] Replace CF time functions with Windows API functions in WebHistory
index d8ce77e508443a624fa36bfbd266da9459b51c24..12429caca0d2d8327b3885b615775b97ab351902 100644 (file)
@@ -1706,7 +1706,7 @@ bool WebView::gesture(WPARAM wParam, LPARAM lParam)
             coreFrame->view()->scrollBy(IntSize(-deltaX, -deltaY));
             scrolledArea = coreFrame->view();
         } else
-            m_gestureTargetNode->renderer()->enclosingLayer()->scrollByRecursively(IntSize(-deltaX, -deltaY), WebCore::RenderLayer::ScrollOffsetClamped, &scrolledArea);
+            m_gestureTargetNode->renderer()->enclosingLayer()->enclosingScrollableLayer()->scrollByRecursively(IntSize(-deltaX, -deltaY), WebCore::RenderLayer::ScrollOffsetClamped, &scrolledArea);
 
         if (!(UpdatePanningFeedbackPtr() && BeginPanningFeedbackPtr() && EndPanningFeedbackPtr())) {
             CloseGestureInfoHandlePtr()(gestureHandle);