Changeset 189773 in webkit
- Timestamp:
- Sep 14, 2015 7:42:39 PM (9 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r189753 r189773 1 2015-09-14 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 WKWebView scroll deceleration rate is not being set properly 4 https://bugs.webkit.org/show_bug.cgi?id=149145 5 <rdar://problem/22064071> 6 7 Reviewed by Simon Fraser. 8 9 We are not currently setting the web view's deceleration rate to the correct preferred value because we 10 are setting the decelerationRate property of the scrollView, which snaps input values to the closer of 11 two predefined UIKit constants, UIScrollViewDecelerationRateFast and UIScrollViewDecelerationRateNormal. 12 To fix this, we directly set the horizontal and vertical scroll deceleration factors to the preferred 13 value. 14 15 * UIProcess/API/Cocoa/WKWebView.mm: 16 (-[WKWebView scrollViewWillBeginDragging:]): Directly set the scroll view's deceleration factor without 17 going through the decelerationRate property. 18 1 19 2015-09-14 Dan Bernstein <mitz@apple.com> 2 20 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
r189635 r189773 1481 1481 WebKit::RemoteScrollingCoordinatorProxy* coordinator = _page->scrollingCoordinatorProxy(); 1482 1482 ASSERT(scrollView == _scrollView.get()); 1483 scrollView.decelerationRate = (coordinator && coordinator->shouldSetScrollViewDecelerationRateFast()) ? UIScrollViewDecelerationRateFast : [_scrollView preferredScrollDecelerationFactor]; 1483 CGFloat scrollDecelerationFactor = (coordinator && coordinator->shouldSetScrollViewDecelerationRateFast()) ? UIScrollViewDecelerationRateFast : [_scrollView preferredScrollDecelerationFactor]; 1484 scrollView.horizontalScrollDecelerationFactor = scrollDecelerationFactor; 1485 scrollView.verticalScrollDecelerationFactor = scrollDecelerationFactor; 1484 1486 #endif 1485 1487 }
Note: See TracChangeset
for help on using the changeset viewer.