Changeset 228016 in webkit
- Timestamp:
- Feb 2, 2018 9:44:36 AM (6 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r227993 r228016 1 2018-02-02 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 [Extra Zoom Mode] Implement support for indirect mainframe scrolling 4 https://bugs.webkit.org/show_bug.cgi?id=182421 5 <rdar://problem/35142694> 6 7 Reviewed by Tim Horton. 8 9 Makes a few small adjustments to WKScrollView to improve mainframe scrolling, and disable the pinch gesture for 10 zooming. See below for more details. 11 12 * UIProcess/API/Cocoa/WKWebView.mm: 13 14 Remove a now-unneeded WebKitAdditions import. 15 16 * UIProcess/ios/WKScrollView.mm: 17 (-[WKScrollView initWithFrame:]): 18 19 Add imports for -Before and -After versions of WKScrollViewAdditions. 20 21 (-[WKScrollView addGestureRecognizer:]): 22 23 Override -addGestureRecognizer here to prevent touches on the pinch gesture recognizer from being recognized. 24 I chose this approach instead of just disabling the gesture in -initWithFrame: because (1) the pinch gesture 25 recognizer is lazily created when setting minimum or maximum zoom scales, rather than immediately in 26 -initWithFrame:, and (2) even if we set the -enabled to NO, UIKit later resets it to YES in other codepaths. 27 1 28 2018-02-01 Tim Horton <timothy_horton@apple.com> 2 29 -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
r227869 r228016 6341 6341 @end 6342 6342 6343 #if USE(APPLE_INTERNAL_SDK)6344 #import <WebKitAdditions/WKWebViewAdditionsAfter.mm>6345 #endif6346 6347 6343 #endif // WK_API_ENABLED -
trunk/Source/WebKit/UIProcess/ios/WKScrollView.mm
r220506 r228016 35 35 using namespace WebKit; 36 36 37 #if USE(APPLE_INTERNAL_SDK) 38 #import <WebKitAdditions/WKScrollViewAdditionsBefore.mm> 39 #endif 40 37 41 @interface UIScrollView (UIScrollViewInternalHack) 38 42 - (CGFloat)_rubberBandOffsetForOffset:(CGFloat)newOffset maxOffset:(CGFloat)maxOffset minOffset:(CGFloat)minOffset range:(CGFloat)range outside:(BOOL *)outside; … … 135 139 #endif 136 140 141 #if ENABLE(EXTRA_ZOOM_MODE) 142 [self _configureScrollingForExtraZoomMode]; 143 #endif 144 137 145 return self; 138 146 } … … 312 320 } 313 321 322 - (void)addGestureRecognizer:(UIGestureRecognizer *)gestureRecognizer 323 { 324 [super addGestureRecognizer:gestureRecognizer]; 325 326 #if ENABLE(EXTRA_ZOOM_MODE) 327 if (gestureRecognizer == self.pinchGestureRecognizer) 328 gestureRecognizer.allowedTouchTypes = @[]; 329 #endif 330 } 331 332 #if USE(APPLE_INTERNAL_SDK) 333 #import <WebKitAdditions/WKScrollViewAdditionsAfter.mm> 334 #endif 335 314 336 @end 315 337
Note: See TracChangeset
for help on using the changeset viewer.