Title: [190473] branches/safari-601.1.46-branch/Source/WebKit2
Revision
190473
Author
[email protected]
Date
2015-10-02 01:10:31 -0700 (Fri, 02 Oct 2015)

Log Message

Merged r189773.  rdar://problem/22824430

Modified Paths

Diff

Modified: branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog (190472 => 190473)


--- branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog	2015-10-02 08:09:36 UTC (rev 190472)
+++ branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog	2015-10-02 08:10:31 UTC (rev 190473)
@@ -1,5 +1,27 @@
 2015-10-02  Babak Shafiei  <[email protected]>
 
+        Merge r189773.
+
+    2015-09-14  Wenson Hsieh  <[email protected]>
+
+            WKWebView scroll deceleration rate is not being set properly
+            https://bugs.webkit.org/show_bug.cgi?id=149145
+            <rdar://problem/22064071>
+
+            Reviewed by Simon Fraser.
+
+            We are not currently setting the web view's deceleration rate to the correct preferred value because we
+            are setting the decelerationRate property of the scrollView, which snaps input values to the closer of
+            two predefined UIKit constants, UIScrollViewDecelerationRateFast and UIScrollViewDecelerationRateNormal.
+            To fix this, we directly set the horizontal and vertical scroll deceleration factors to the preferred
+            value.
+
+            * UIProcess/API/Cocoa/WKWebView.mm: 
+            (-[WKWebView scrollViewWillBeginDragging:]): Directly set the scroll view's deceleration factor without
+                    going through the decelerationRate property.
+
+2015-10-02  Babak Shafiei  <[email protected]>
+
         Merge r189366.
 
     2015-09-04  Dan Bernstein  <[email protected]>

Modified: branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (190472 => 190473)


--- branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm	2015-10-02 08:09:36 UTC (rev 190472)
+++ branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm	2015-10-02 08:10:31 UTC (rev 190473)
@@ -1472,7 +1472,9 @@
     // FIXME: We will want to detect whether snapping will occur before beginning to drag. See WebPageProxy::didCommitLayerTree.
     WebKit::RemoteScrollingCoordinatorProxy* coordinator = _page->scrollingCoordinatorProxy();
     ASSERT(scrollView == _scrollView.get());
-    scrollView.decelerationRate = (coordinator && coordinator->shouldSetScrollViewDecelerationRateFast()) ? UIScrollViewDecelerationRateFast : [_scrollView preferredScrollDecelerationFactor];
+    CGFloat scrollDecelerationFactor = (coordinator && coordinator->shouldSetScrollViewDecelerationRateFast()) ? UIScrollViewDecelerationRateFast : [_scrollView preferredScrollDecelerationFactor];
+    scrollView.horizontalScrollDecelerationFactor = scrollDecelerationFactor;
+    scrollView.verticalScrollDecelerationFactor = scrollDecelerationFactor;
 #endif
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to