Changeset 175827 in webkit
- Timestamp:
- Nov 10, 2014, 1:39:02 PM (11 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/Source/WebKit2/ChangeLog ¶
r175822 r175827 1 2014-11-10 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS WK2] Scroll deceleration rate is wrong 4 https://bugs.webkit.org/show_bug.cgi?id=138574 5 rdar://problem/18715303 6 7 Reviewed by Benjamin Poulain. 8 9 The CSS Snap Points code incorrectly set the WKScrollView's deceleration rate, 10 overriding the custom value that UIWebScrollView sets. 11 12 Fix by having WKScrollView store the custom rate at init time, and 13 using that value in -scrollViewWillBeginDragging:. 14 15 * UIProcess/API/Cocoa/WKWebView.mm: 16 (-[WKWebView scrollViewWillBeginDragging:]): 17 * UIProcess/ios/WKScrollView.h: 18 * UIProcess/ios/WKScrollView.mm: 19 (-[WKScrollView initWithFrame:]): 20 1 21 2014-11-09 Ada Chan <adachan@apple.com> 2 22 -
TabularUnified trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm ¶
r175796 r175827 1308 1308 if (scrollView.panGestureRecognizer.state == UIGestureRecognizerStateBegan) 1309 1309 [_contentView scrollViewWillStartPanOrPinchGesture]; 1310 1310 1311 [_contentView willStartZoomOrScroll]; 1311 1312 #if ENABLE(CSS_SCROLL_SNAP) && ENABLE(ASYNC_SCROLLING) 1312 1313 // FIXME: We will want to detect whether snapping will occur before beginning to drag. See WebPageProxy::didCommitLayerTree. 1313 1314 WebKit::RemoteScrollingCoordinatorProxy* coordinator = _page->scrollingCoordinatorProxy(); 1314 scrollView.decelerationRate = (coordinator && coordinator->shouldSetScrollViewDecelerationRateFast()) ? UIScrollViewDecelerationRateFast : UIScrollViewDecelerationRateNormal; 1315 ASSERT(scrollView == _scrollView.get()); 1316 scrollView.decelerationRate = (coordinator && coordinator->shouldSetScrollViewDecelerationRateFast()) ? UIScrollViewDecelerationRateFast : [_scrollView preferredScrollDecelerationFactor];; 1315 1317 #endif 1316 1318 } -
TabularUnified trunk/Source/WebKit2/UIProcess/ios/WKScrollView.h ¶
r170463 r175827 33 33 34 34 @property (nonatomic, assign) WKWebView <UIScrollViewDelegate> *internalDelegate; 35 @property (nonatomic, readonly) CGFloat preferredScrollDecelerationFactor; 35 36 36 37 - (void)_setContentSizePreservingContentOffsetDuringRubberband:(CGSize)contentSize; -
TabularUnified trunk/Source/WebKit2/UIProcess/ios/WKScrollView.mm ¶
r173710 r175827 112 112 } 113 113 114 - (id)initWithFrame:(CGRect)frame 115 { 116 if (self = [super initWithFrame:frame]) { 117 ASSERT([self verticalScrollDecelerationFactor] == [self horizontalScrollDecelerationFactor]); 118 // FIXME: use UIWebPreferredScrollDecelerationFactor() from UIKit: rdar://problem/18931007. 119 _preferredScrollDecelerationFactor = [self verticalScrollDecelerationFactor]; 120 } 121 122 return self; 123 } 124 114 125 - (void)setInternalDelegate:(WKWebView <UIScrollViewDelegate> *)internalDelegate 115 126 {
Note:
See TracChangeset
for help on using the changeset viewer.