From 0792f679c5b3e9acbbf05650da294029a20f8aa7 Mon Sep 17 00:00:00 2001 From: stuartmorgan Date: Fri, 2 Oct 2015 11:16:00 -0700 Subject: Set deceleration rate for WKWebView Matches the current setting for UIWebView. Note that this won't have any effect in older version of iOS since it was only recently fixed by http://trac.webkit.org/changeset/188541 BUG=520995 Review URL: https://codereview.chromium.org/1386693002 Cr-Commit-Position: refs/heads/master@{#352081} --- ios/web/web_state/web_view_internal_creation_util.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ios/web/web_state/web_view_internal_creation_util.mm b/ios/web/web_state/web_view_internal_creation_util.mm index c25283a..3fdb1b1 100644 --- a/ios/web/web_state/web_view_internal_creation_util.mm +++ b/ios/web/web_state/web_view_internal_creation_util.mm @@ -187,6 +187,10 @@ WKWebView* CreateWKWebView(CGRect frame, #endif PostWKWebViewCreation(result, browser_state); + // By default the web view uses a very sluggish scroll speed. Set it to a more + // reasonable value. + result.scrollView.decelerationRate = UIScrollViewDecelerationRateNormal; + return result; } -- cgit v1.1