Changeset 247656 in webkit


Ignore:
Timestamp:
Jul 19, 2019 3:49:32 PM (5 years ago)
Author:
Simon Fraser
Message:

[iOS WK2] Allow scrolling interaction on frames and oveflow scroll even when the main frame is rubber-banding
https://bugs.webkit.org/show_bug.cgi?id=199963
rdar://problem/52897797

Reviewed by Tim Horton.

Adopt UIKit SPI to allow for scrolling of inner UIScrollViews when the outer one is still rubber-banding.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):

  • UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:

(WebKit::ScrollingTreeScrollingNodeDelegateIOS::commitStateAfterChildren):

Location:
trunk/Source/WebKit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r247653 r247656  
    330330        (WebKit::StorageAreaMap::prewarm):
    331331        * WebProcess/WebStorage/StorageAreaMap.h:
     332
     3332019-07-19  Simon Fraser  <simon.fraser@apple.com>
     334
     335        [iOS WK2] Allow scrolling interaction on frames and oveflow scroll even when the main frame is rubber-banding
     336        https://bugs.webkit.org/show_bug.cgi?id=199963
     337        rdar://problem/52897797
     338
     339        Reviewed by Tim Horton.
     340
     341        Adopt UIKit SPI to allow for scrolling of inner UIScrollViews when the outer one is still rubber-banding.
     342
     343        * Platform/spi/ios/UIKitSPI.h:
     344        * UIProcess/API/Cocoa/WKWebView.mm:
     345        (-[WKWebView _initializeWithConfiguration:]):
     346        * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
     347        (WebKit::ScrollingTreeScrollingNodeDelegateIOS::commitStateAfterChildren):
    332348
    3333492019-07-17  Megan Gardner  <megan_gardner@apple.com>
  • trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h

    r247557 r247656  
    11181118- (CGPoint)_adjustedContentOffsetForContentOffset:(CGPoint)contentOffset;
    11191119- (void)_flashScrollIndicatorsPersistingPreviousFlashes:(BOOL)persisting;
     1120
     1121@property (nonatomic) BOOL tracksImmediatelyWhileDecelerating;
     1122@property (nonatomic, getter=_avoidsJumpOnInterruptedBounce, setter=_setAvoidsJumpOnInterruptedBounce:) BOOL _avoidsJumpOnInterruptedBounce;
    11201123@end
    11211124
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm

    r247651 r247656  
    691691    [_scrollView setBouncesZoom:YES];
    692692
     693    if ([_scrollView respondsToSelector:@selector(_setAvoidsJumpOnInterruptedBounce:)]) {
     694        [_scrollView setTracksImmediatelyWhileDecelerating:NO];
     695        [_scrollView _setAvoidsJumpOnInterruptedBounce:YES];
     696    }
     697
    693698    if ([_configuration _editableImagesEnabled])
    694699        [_scrollView panGestureRecognizer].allowedTouchTypes = @[ @(UITouchTypeDirect) ];
  • trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm

    r247013 r247656  
    249249            scrollView.scrollsToTop = NO;
    250250            scrollView.delegate = m_scrollViewDelegate.get();
     251
     252            if ([scrollView respondsToSelector:@selector(_setAvoidsJumpOnInterruptedBounce:)]) {
     253                scrollView.tracksImmediatelyWhileDecelerating = NO;
     254                scrollView._avoidsJumpOnInterruptedBounce = YES;
     255            }
    251256        }
    252257
Note: See TracChangeset for help on using the changeset viewer.