Title: [188541] trunk/Source/WebKit2
Revision
188541
Author
wenson_hs...@apple.com
Date
2015-08-17 13:39:04 -0700 (Mon, 17 Aug 2015)

Log Message

Cannot change WKWebView scrollView deceleration rate
https://bugs.webkit.org/show_bug.cgi?id=148086
<rdar://problem/21893685>

Reviewed by Simon Fraser.

Updates the preferred scroll deceleration factor when the scrollView's decelerationRate is explicitly set by the
user, so when snap scrolling is inactive and [WKWebView scrollViewWillBeginDragging] sets its scrollView's
decelerationRate to the preferred decelerationRate, it will be set to the updated value.

* UIProcess/ios/WKScrollView.mm:
(-[WKScrollView setDecelerationRate:]): Overrides setDecelerationRate to update _preferredScrollDecelerationFactor.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (188540 => 188541)


--- trunk/Source/WebKit2/ChangeLog	2015-08-17 20:37:06 UTC (rev 188540)
+++ trunk/Source/WebKit2/ChangeLog	2015-08-17 20:39:04 UTC (rev 188541)
@@ -1,3 +1,18 @@
+2015-08-17  Wenson Hsieh  <wenson_hs...@apple.com>
+
+        Cannot change WKWebView scrollView deceleration rate
+        https://bugs.webkit.org/show_bug.cgi?id=148086
+        <rdar://problem/21893685>
+
+        Reviewed by Simon Fraser.
+
+        Updates the preferred scroll deceleration factor when the scrollView's decelerationRate is explicitly set by the
+        user, so when snap scrolling is inactive and [WKWebView scrollViewWillBeginDragging] sets its scrollView's
+        decelerationRate to the preferred decelerationRate, it will be set to the updated value.
+
+        * UIProcess/ios/WKScrollView.mm:
+        (-[WKScrollView setDecelerationRate:]): Overrides setDecelerationRate to update _preferredScrollDecelerationFactor.
+
 2015-08-17  Timothy Horton  <timothy_hor...@apple.com>
 
         Adopt shrink-wrapping for TextIndicators on Mac

Modified: trunk/Source/WebKit2/UIProcess/ios/WKScrollView.mm (188540 => 188541)


--- trunk/Source/WebKit2/UIProcess/ios/WKScrollView.mm	2015-08-17 20:37:06 UTC (rev 188540)
+++ trunk/Source/WebKit2/UIProcess/ios/WKScrollView.mm	2015-08-17 20:39:04 UTC (rev 188541)
@@ -267,6 +267,12 @@
         [self _restoreContentOffsetWithRubberbandAmount:rubberbandAmount];
 }
 
+- (void)setDecelerationRate:(CGFloat)decelerationRate
+{
+    [super setDecelerationRate:decelerationRate];
+    _preferredScrollDecelerationFactor = decelerationRate;
+}
+
 @end
 
 #endif // PLATFORM(IOS)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to