Changeset 292812 in webkit
- Timestamp:
- Apr 13, 2022 9:41:00 AM (3 months ago)
- Location:
- trunk
- Files:
-
- 2 added
- 23 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/scrolling/ios/constrain-scrollintoview-position-expected.txt (added)
-
LayoutTests/fast/scrolling/ios/constrain-scrollintoview-position.html (added)
-
LayoutTests/resources/ui-helper.js (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/RenderLayer.cpp (modified) (1 diff)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/UIProcess/API/ios/WKWebViewIOS.h (modified) (1 diff)
-
Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm (modified) (3 diffs)
-
Source/WebKit/UIProcess/PageClient.h (modified) (1 diff)
-
Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp (modified) (1 diff)
-
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm (modified) (3 diffs)
-
Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.h (modified) (1 diff)
-
Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm (modified) (1 diff)
-
Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm (modified) (2 diffs)
-
Source/WebKit/UIProcess/WebPageProxy.h (modified) (1 diff)
-
Source/WebKit/UIProcess/WebPageProxy.messages.in (modified) (1 diff)
-
Source/WebKit/UIProcess/ios/PageClientImplIOS.h (modified) (1 diff)
-
Source/WebKit/UIProcess/ios/PageClientImplIOS.mm (modified) (1 diff)
-
Source/WebKit/UIProcess/ios/WKContentViewInteraction.h (modified) (1 diff)
-
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (modified) (3 diffs)
-
Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm (modified) (1 diff)
-
Source/WebKit/WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm (modified) (1 diff)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r292800 r292812 1 2022-04-13 Simon Fraser <simon.fraser@apple.com> 2 3 [css-scroll-snap] scrollIntoView fails with scroll-snap-type on :root 4 https://bugs.webkit.org/show_bug.cgi?id=239063 5 <rdar://problem/91603363> 6 7 Reviewed by Dean Jackson. 8 9 Make UIHelper.waitForScrollCompletion() work on iOS. 10 11 * fast/scrolling/ios/constrain-scrollintoview-position-expected.txt: Added. 12 * fast/scrolling/ios/constrain-scrollintoview-position.html: Added. 13 * resources/ui-helper.js: 14 (window.UIHelper.async waitForScrollCompletion.await.new.Promise.): 15 (window.UIHelper.async waitForScrollCompletion.await.new.Promise): 16 (window.UIHelper.async waitForScrollCompletion): 17 1 18 2022-04-12 Wenson Hsieh <wenson_hsieh@apple.com> 2 19 -
trunk/LayoutTests/resources/ui-helper.js
r290646 r292812 142 142 static async waitForScrollCompletion() 143 143 { 144 if (this.isIOSFamily()) { 145 await new Promise(resolve => { 146 testRunner.runUIScript(` 147 (function() { 148 uiController.didEndScrollingCallback = function() { 149 uiController.uiScriptComplete(); 150 } 151 })()`, resolve); 152 }); 153 // Wait for the new scroll position to get back to the web process. 154 return UIHelper.renderingUpdate(); 155 } 156 144 157 return new Promise(resolve => { 145 158 eventSender.callAfterScrollingCompletes(() => { -
trunk/Source/WebCore/ChangeLog
r292810 r292812 1 2022-04-13 Simon Fraser <simon.fraser@apple.com> 2 3 [css-scroll-snap] scrollIntoView fails with scroll-snap-type on :root 4 https://bugs.webkit.org/show_bug.cgi?id=239063 5 <rdar://problem/91603363> 6 7 Reviewed by Dean Jackson. 8 9 Programmatic smooth scrolls on iframe documents were broken because 10 ScrollingTreeFrameScrollingNodeRemoteIOS was overlooked when adding support (easily done 11 since the main frame's scrolling is controlled via the WKWebView; some unification here 12 would be beneficial). Implementing startAnimatedScrollToPosition() and stopAnimatedScroll() 13 on ScrollingTreeFrameScrollingNodeRemoteIOS fixes this. 14 15 However, this revealed an additional bug; RenderLayer::scrollRectToVisible() failed to clamp 16 the target scroll position correctly, and nothing in the iOS-smooth scrolling code path 17 clamped, so the scroll would go too far. 18 19 Testing required getting UIHelper.waitForScrollCompletion() to work. This is based on the 20 uiController.didEndScrollingCallback, but that was only hooked up for the main scroller. So 21 make it work for all scrollers by plumbing ScrollingNodeIDs through 22 scrollingNodeScrollViewDidScroll() and friends so that everything ends up in -[WKWebViewIOS 23 _didFinishScrolling:] with a UIScrollView argument; to avoid any behavior change, this bails 24 for non-main scroll views, but TestRunnerWKWebView overrides it to make testing work. 25 26 Test: fast/scrolling/ios/constrain-scrollintoview-position.html 27 28 * rendering/RenderLayer.cpp: 29 (WebCore::RenderLayer::scrollRectToVisible): 30 1 31 2022-04-13 Chris Dumez <cdumez@apple.com> 2 32 -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r292706 r292812 2550 2550 2551 2551 LayoutRect exposeRect = getRectToExpose(viewRect, newRect, insideFixed, options.alignX, options.alignY); 2552 IntPoint scrollPosition(roundedIntPoint(exposeRect.location())); 2553 2554 // Adjust offsets if they're outside of the allowable range. 2555 scrollPosition = scrollPosition.constrainedBetween(IntPoint(), IntPoint(frameView.contentsSize())); 2552 auto scrollPosition = roundedIntPoint(exposeRect.location()); 2553 2554 scrollPosition = frameView.constrainedScrollPosition(scrollPosition); 2556 2555 2557 2556 // FIXME: Should we use contentDocument()->scrollingElement()? -
trunk/Source/WebKit/ChangeLog
r292810 r292812 1 2022-04-13 Simon Fraser <simon.fraser@apple.com> 2 3 [css-scroll-snap] scrollIntoView fails with scroll-snap-type on :root 4 https://bugs.webkit.org/show_bug.cgi?id=239063 5 <rdar://problem/91603363> 6 7 Reviewed by Dean Jackson. 8 9 Programmatic smooth scrolls on iframe documents were broken because 10 ScrollingTreeFrameScrollingNodeRemoteIOS was overlooked when adding support (easily done 11 since the main frame's scrolling is controlled via the WKWebView; some unification here 12 would be beneficial). Implementing startAnimatedScrollToPosition() and stopAnimatedScroll() 13 on ScrollingTreeFrameScrollingNodeRemoteIOS fixes this. 14 15 However, this revealed an additional bug; RenderLayer::scrollRectToVisible() failed to clamp 16 the target scroll position correctly, and nothing in the iOS-smooth scrolling code path 17 clamped, so the scroll would go too far. 18 19 Testing required getting UIHelper.waitForScrollCompletion() to work. This is based on the 20 uiController.didEndScrollingCallback, but that was only hooked up for the main scroller. So 21 make it work for all scrollers by plumbing ScrollingNodeIDs through 22 scrollingNodeScrollViewDidScroll() and friends so that everything ends up in -[WKWebViewIOS 23 _didFinishScrolling:] with a UIScrollView argument; to avoid any behavior change, this bails 24 for non-main scroll views, but TestRunnerWKWebView overrides it to make testing work. 25 26 Test: fast/scrolling/ios/constrain-scrollintoview-position.html 27 28 * UIProcess/API/ios/WKWebViewIOS.h: 29 * UIProcess/API/ios/WKWebViewIOS.mm: 30 (-[WKWebView _didFinishScrolling:]): 31 (-[WKWebView scrollViewDidEndDragging:willDecelerate:]): 32 (-[WKWebView scrollViewDidEndDecelerating:]): 33 (-[WKWebView scrollViewDidScrollToTop:]): 34 (-[WKWebView scrollViewDidEndScrollingAnimation:]): 35 (-[WKWebView _didFinishScrolling]): Deleted. 36 * UIProcess/PageClient.h: 37 * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp: 38 (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidScroll): 39 * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm: 40 (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeWillStartPanGesture): 41 (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeWillStartScroll): 42 (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidEndScroll): 43 * UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.h: 44 * UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm: 45 (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::startAnimatedScrollToPosition): 46 (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::stopAnimatedScroll): 47 * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm: 48 (-[WKScrollingNodeScrollViewDelegate scrollViewDidEndScrollingAnimation:]): 49 (WebKit::ScrollingTreeScrollingNodeDelegateIOS::repositionScrollingLayers): 50 * UIProcess/WebPageProxy.h: 51 * UIProcess/WebPageProxy.messages.in: 52 * UIProcess/ios/PageClientImplIOS.h: 53 * UIProcess/ios/PageClientImplIOS.mm: 54 (WebKit::PageClientImpl::scrollingNodeScrollViewWillStartPanGesture): 55 (WebKit::PageClientImpl::scrollingNodeScrollViewDidScroll): 56 (WebKit::PageClientImpl::scrollingNodeScrollWillStartScroll): 57 (WebKit::PageClientImpl::scrollingNodeScrollDidEndScroll): 58 * UIProcess/ios/WKContentViewInteraction.h: 59 * UIProcess/ios/WKContentViewInteraction.mm: 60 (-[WKContentView _scrollingNodeScrollingWillBegin:]): 61 (-[WKContentView _scrollingNodeScrollingDidEnd:]): 62 (-[WKContentView keyboardScrollViewAnimatorDidFinishScrolling:]): 63 (-[WKContentView _scrollingNodeScrollingWillBegin]): Deleted. 64 (-[WKContentView _scrollingNodeScrollingDidEnd]): Deleted. 65 * UIProcess/ios/WebPageProxyIOS.mm: 66 (WebKit::WebPageProxy::scrollingNodeScrollViewWillStartPanGesture): 67 (WebKit::WebPageProxy::scrollingNodeScrollViewDidScroll): 68 (WebKit::WebPageProxy::scrollingNodeScrollWillStartScroll): 69 (WebKit::WebPageProxy::scrollingNodeScrollDidEndScroll): 70 * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm: 71 (WebKit::WebChromeClient::didStartOverflowScroll): 72 (WebKit::WebChromeClient::didEndOverflowScroll): 73 1 74 2022-04-13 Chris Dumez <cdumez@apple.com> 2 75 -
trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.h
r292065 r292812 86 86 - (void)_zoomOutWithOrigin:(WebCore::FloatPoint)origin animated:(BOOL)animated; 87 87 - (void)_zoomToInitialScaleWithOrigin:(WebCore::FloatPoint)origin animated:(BOOL)animated; 88 - (void)_didFinishScrolling ;88 - (void)_didFinishScrolling:(UIScrollView *)scrollView; 89 89 90 90 - (void)_setHasCustomContentView:(BOOL)hasCustomContentView loadedMIMEType:(const WTF::String&)mimeType; -
trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm
r292793 r292812 1677 1677 } 1678 1678 1679 - (void)_didFinishScrolling 1680 { 1679 - (void)_didFinishScrolling:(UIScrollView *)scrollView 1680 { 1681 if (scrollView != _scrollView.get()) 1682 return; 1683 1681 1684 if (![self usesStandardContentView]) 1682 1685 return; … … 1726 1729 // If we're decelerating, scroll offset will be updated when scrollViewDidFinishDecelerating: is called. 1727 1730 if (!decelerate) 1728 [self _didFinishScrolling ];1731 [self _didFinishScrolling:scrollView]; 1729 1732 } 1730 1733 1731 1734 - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView 1732 1735 { 1733 [self _didFinishScrolling ];1736 [self _didFinishScrolling:scrollView]; 1734 1737 } 1735 1738 1736 1739 - (void)scrollViewDidScrollToTop:(UIScrollView *)scrollView 1737 1740 { 1738 [self _didFinishScrolling ];1741 [self _didFinishScrolling:scrollView]; 1739 1742 } 1740 1743 … … 1859 1862 - (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView 1860 1863 { 1861 [self _didFinishScrolling ];1864 [self _didFinishScrolling:scrollView]; 1862 1865 } 1863 1866 -
trunk/Source/WebKit/UIProcess/PageClient.h
r292252 r292812 481 481 virtual double minimumZoomScale() const = 0; 482 482 virtual WebCore::FloatRect documentRect() const = 0; 483 virtual void scrollingNodeScrollViewWillStartPanGesture( ) = 0;484 virtual void scrollingNodeScrollViewDidScroll( ) = 0;485 virtual void scrollingNodeScrollWillStartScroll( ) = 0;486 virtual void scrollingNodeScrollDidEndScroll( ) = 0;483 virtual void scrollingNodeScrollViewWillStartPanGesture(WebCore::ScrollingNodeID) = 0; 484 virtual void scrollingNodeScrollViewDidScroll(WebCore::ScrollingNodeID) = 0; 485 virtual void scrollingNodeScrollWillStartScroll(WebCore::ScrollingNodeID) = 0; 486 virtual void scrollingNodeScrollDidEndScroll(WebCore::ScrollingNodeID) = 0; 487 487 virtual Vector<String> mimeTypesWithCustomContentProviders() = 0; 488 488 -
trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp
r292793 r292812 228 228 229 229 #if PLATFORM(IOS_FAMILY) 230 m_webPageProxy.scrollingNodeScrollViewDidScroll( );230 m_webPageProxy.scrollingNodeScrollViewDidScroll(scrolledNodeID); 231 231 #endif 232 232 -
trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm
r284448 r292812 130 130 } 131 131 132 void RemoteScrollingCoordinatorProxy::scrollingTreeNodeWillStartPanGesture(ScrollingNodeID )133 { 134 m_webPageProxy.scrollingNodeScrollViewWillStartPanGesture( );132 void RemoteScrollingCoordinatorProxy::scrollingTreeNodeWillStartPanGesture(ScrollingNodeID nodeID) 133 { 134 m_webPageProxy.scrollingNodeScrollViewWillStartPanGesture(nodeID); 135 135 } 136 136 … … 138 138 void RemoteScrollingCoordinatorProxy::scrollingTreeNodeWillStartScroll(ScrollingNodeID nodeID) 139 139 { 140 m_webPageProxy.scrollingNodeScrollWillStartScroll( );140 m_webPageProxy.scrollingNodeScrollWillStartScroll(nodeID); 141 141 142 142 m_uiState.addNodeWithActiveUserScroll(nodeID); … … 147 147 void RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidEndScroll(ScrollingNodeID nodeID) 148 148 { 149 m_webPageProxy.scrollingNodeScrollDidEndScroll( );149 m_webPageProxy.scrollingNodeScrollDidEndScroll(nodeID); 150 150 151 151 m_uiState.removeNodeWithActiveUserScroll(nodeID); -
trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.h
r279133 r292812 55 55 void repositionRelatedLayers() override; 56 56 57 bool startAnimatedScrollToPosition(WebCore::FloatPoint) final; 58 void stopAnimatedScroll() final; 59 57 60 std::unique_ptr<ScrollingTreeScrollingNodeDelegateIOS> m_scrollingNodeDelegate; 58 61 -
trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm
r283911 r292812 144 144 } 145 145 146 bool ScrollingTreeFrameScrollingNodeRemoteIOS::startAnimatedScrollToPosition(FloatPoint destinationPosition) 147 { 148 // Main frame animated scrolls are handled via PageClientImpl::requestScroll(). 149 if (!m_scrollingNodeDelegate) 150 return false; 151 152 bool started = m_scrollingNodeDelegate->startAnimatedScrollToPosition(destinationPosition); 153 if (started) 154 willStartAnimatedScroll(); 155 return started; 156 } 157 158 void ScrollingTreeFrameScrollingNodeRemoteIOS::stopAnimatedScroll() 159 { 160 // Main frame animated scrolls are handled via PageClientImpl::requestScroll(). 161 if (!m_scrollingNodeDelegate) 162 return; 163 164 m_scrollingNodeDelegate->stopAnimatedScroll(); 165 } 166 146 167 } 147 168 #endif -
trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm
r291501 r292812 133 133 } 134 134 135 - (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView 136 { 137 _scrollingTreeNodeDelegate->scrollDidEnd(); 138 } 139 135 140 - (CGPoint)_scrollView:(UIScrollView *)scrollView adjustedOffsetForOffset:(CGPoint)offset translation:(CGPoint)translation startPoint:(CGPoint)start locationInView:(CGPoint)locationInView horizontalVelocity:(inout double *)hv verticalVelocity:(inout double *)vv 136 141 { … … 332 337 { 333 338 BEGIN_BLOCK_OBJC_EXCEPTIONS 339 340 if ([scrollView() _isAnimatingScroll]) 341 return; 342 334 343 [scrollView() setContentOffset:scrollingNode().currentScrollOffset()]; 335 344 END_BLOCK_OBJC_EXCEPTIONS -
trunk/Source/WebKit/UIProcess/WebPageProxy.h
r292800 r292812 845 845 void adjustLayersForLayoutViewport(const WebCore::FloatRect& layoutViewport); 846 846 847 void scrollingNodeScrollViewWillStartPanGesture( );848 void scrollingNodeScrollViewDidScroll( );849 void scrollingNodeScrollWillStartScroll( );850 void scrollingNodeScrollDidEndScroll( );847 void scrollingNodeScrollViewWillStartPanGesture(WebCore::ScrollingNodeID); 848 void scrollingNodeScrollViewDidScroll(WebCore::ScrollingNodeID); 849 void scrollingNodeScrollWillStartScroll(WebCore::ScrollingNodeID); 850 void scrollingNodeScrollDidEndScroll(WebCore::ScrollingNodeID); 851 851 852 852 void dynamicViewportSizeUpdate(const WebCore::FloatSize& viewLayoutSize, const WebCore::FloatSize& minimumUnobscuredSize, const WebCore::FloatSize& maximumUnobscuredSize, const WebCore::FloatRect& targetExposedContentRect, const WebCore::FloatRect& targetUnobscuredRect, const WebCore::FloatRect& targetUnobscuredRectInScrollViewCoordinates, const WebCore::FloatBoxExtent& unobscuredSafeAreaInsets, double targetScale, int32_t deviceOrientation, double minimumEffectiveDeviceWidth, DynamicViewportSizeUpdateID); -
trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in
r292252 r292812 392 392 UpdateInputContextAfterBlurringAndRefocusingElement() 393 393 FocusedElementDidChangeInputMode(enum:uint8_t WebCore::InputMode mode) 394 ScrollingNodeScrollWillStartScroll( )395 ScrollingNodeScrollDidEndScroll( )394 ScrollingNodeScrollWillStartScroll(uint64_t nodeID) 395 ScrollingNodeScrollDidEndScroll(uint64_t nodeID) 396 396 ShowInspectorHighlight(struct WebCore::InspectorOverlay::Highlight highlight) 397 397 HideInspectorHighlight() -
trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.h
r292252 r292812 212 212 void disableInspectorNodeSearch() override; 213 213 214 void scrollingNodeScrollViewWillStartPanGesture( ) override;215 void scrollingNodeScrollViewDidScroll( ) override;216 void scrollingNodeScrollWillStartScroll( ) override;217 void scrollingNodeScrollDidEndScroll( ) override;214 void scrollingNodeScrollViewWillStartPanGesture(WebCore::ScrollingNodeID) override; 215 void scrollingNodeScrollViewDidScroll(WebCore::ScrollingNodeID) override; 216 void scrollingNodeScrollWillStartScroll(WebCore::ScrollingNodeID) override; 217 void scrollingNodeScrollDidEndScroll(WebCore::ScrollingNodeID) override; 218 218 219 219 void requestScrollToRect(const WebCore::FloatRect& targetRect, const WebCore::FloatPoint& origin) override; -
trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
r292252 r292812 761 761 } 762 762 763 void PageClientImpl::scrollingNodeScrollViewWillStartPanGesture( )763 void PageClientImpl::scrollingNodeScrollViewWillStartPanGesture(ScrollingNodeID) 764 764 { 765 765 [m_contentView scrollViewWillStartPanOrPinchGesture]; 766 766 } 767 767 768 void PageClientImpl::scrollingNodeScrollViewDidScroll( )768 void PageClientImpl::scrollingNodeScrollViewDidScroll(ScrollingNodeID) 769 769 { 770 770 [m_contentView _didScroll]; 771 771 } 772 772 773 void PageClientImpl::scrollingNodeScrollWillStartScroll( )774 { 775 [m_contentView _scrollingNodeScrollingWillBegin ];776 } 777 778 void PageClientImpl::scrollingNodeScrollDidEndScroll( )779 { 780 [m_contentView _scrollingNodeScrollingDidEnd ];773 void PageClientImpl::scrollingNodeScrollWillStartScroll(ScrollingNodeID nodeID) 774 { 775 [m_contentView _scrollingNodeScrollingWillBegin:nodeID]; 776 } 777 778 void PageClientImpl::scrollingNodeScrollDidEndScroll(ScrollingNodeID nodeID) 779 { 780 [m_contentView _scrollingNodeScrollingDidEnd:nodeID]; 781 781 } 782 782 -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
r292252 r292812 662 662 - (void)_didScroll; 663 663 - (void)_didEndScrollingOrZooming; 664 - (void)_scrollingNodeScrollingWillBegin ;665 - (void)_scrollingNodeScrollingDidEnd ;664 - (void)_scrollingNodeScrollingWillBegin:(WebCore::ScrollingNodeID)nodeID; 665 - (void)_scrollingNodeScrollingDidEnd:(WebCore::ScrollingNodeID)nodeID; 666 666 - (void)_showPlaybackTargetPicker:(BOOL)hasVideo fromRect:(const WebCore::IntRect&)elementRect routeSharingPolicy:(WebCore::RouteSharingPolicy)policy routingContextUID:(NSString *)contextUID; 667 667 - (void)_showRunOpenPanel:(API::OpenPanelParameters*)parameters frameInfo:(const WebKit::FrameInfoData&)frameInfo resultListener:(WebKit::WebOpenPanelResultListenerProxy*)listener; -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r292793 r292812 2287 2287 } 2288 2288 2289 - (void)_scrollingNodeScrollingWillBegin 2289 - (void)_scrollingNodeScrollingWillBegin:(WebCore::ScrollingNodeID)scrollingNodeID 2290 2290 { 2291 2291 [_textInteractionAssistant willStartScrollingOverflow]; 2292 2292 } 2293 2293 2294 - (void)_scrollingNodeScrollingDidEnd 2294 - (void)_scrollingNodeScrollingDidEnd:(WebCore::ScrollingNodeID)scrollingNodeID 2295 2295 { 2296 2296 // If scrolling ends before we've received a selection update, … … 2302 2302 [self _updateChangedSelection]; 2303 2303 [_textInteractionAssistant didEndScrollingOverflow]; 2304 2305 UIScrollView *targetScrollView = nil; 2306 if (auto* scrollingCoordinator = _page->scrollingCoordinatorProxy()) 2307 targetScrollView = scrollingCoordinator->scrollViewForScrollingNodeID(scrollingNodeID); 2308 2309 [_webView _didFinishScrolling:targetScrollView]; 2304 2310 } 2305 2311 … … 6341 6347 - (void)keyboardScrollViewAnimatorDidFinishScrolling:(WKKeyboardScrollViewAnimator *)animator 6342 6348 { 6343 [_webView _didFinishScrolling ];6349 [_webView _didFinishScrolling:self.webView.scrollView]; 6344 6350 } 6345 6351 -
trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
r292793 r292812 246 246 } 247 247 248 void WebPageProxy::scrollingNodeScrollViewWillStartPanGesture( )249 { 250 pageClient().scrollingNodeScrollViewWillStartPanGesture( );251 } 252 253 void WebPageProxy::scrollingNodeScrollViewDidScroll( )254 { 255 pageClient().scrollingNodeScrollViewDidScroll( );256 } 257 258 void WebPageProxy::scrollingNodeScrollWillStartScroll( )259 { 260 pageClient().scrollingNodeScrollWillStartScroll( );261 } 262 263 void WebPageProxy::scrollingNodeScrollDidEndScroll( )264 { 265 pageClient().scrollingNodeScrollDidEndScroll( );248 void WebPageProxy::scrollingNodeScrollViewWillStartPanGesture(ScrollingNodeID nodeID) 249 { 250 pageClient().scrollingNodeScrollViewWillStartPanGesture(nodeID); 251 } 252 253 void WebPageProxy::scrollingNodeScrollViewDidScroll(ScrollingNodeID nodeID) 254 { 255 pageClient().scrollingNodeScrollViewDidScroll(nodeID); 256 } 257 258 void WebPageProxy::scrollingNodeScrollWillStartScroll(ScrollingNodeID nodeID) 259 { 260 pageClient().scrollingNodeScrollWillStartScroll(nodeID); 261 } 262 263 void WebPageProxy::scrollingNodeScrollDidEndScroll(ScrollingNodeID nodeID) 264 { 265 pageClient().scrollingNodeScrollDidEndScroll(nodeID); 266 266 } 267 267 -
trunk/Source/WebKit/WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm
r290794 r292812 94 94 void WebChromeClient::didStartOverflowScroll() 95 95 { 96 m_page.send(Messages::WebPageProxy::ScrollingNodeScrollWillStartScroll()); 96 // FIXME: This is only relevant for legacy touch-driven overflow in the web process (see ScrollAnimatorIOS::handleTouchEvent), and should be removed. 97 m_page.send(Messages::WebPageProxy::ScrollingNodeScrollWillStartScroll(0)); 97 98 } 98 99 99 100 void WebChromeClient::didEndOverflowScroll() 100 101 { 101 m_page.send(Messages::WebPageProxy::ScrollingNodeScrollDidEndScroll()); 102 // FIXME: This is only relevant for legacy touch-driven overflow in the web process (see ScrollAnimatorIOS::handleTouchEvent), and should be removed. 103 m_page.send(Messages::WebPageProxy::ScrollingNodeScrollDidEndScroll(0)); 102 104 } 103 105 -
trunk/Tools/ChangeLog
r292810 r292812 1 2022-04-13 Simon Fraser <simon.fraser@apple.com> 2 3 [css-scroll-snap] scrollIntoView fails with scroll-snap-type on :root 4 https://bugs.webkit.org/show_bug.cgi?id=239063 5 <rdar://problem/91603363> 6 7 Reviewed by Dean Jackson. 8 9 _didFinishScrolling: now works for subscrollers too. 10 11 * WebKitTestRunner/cocoa/TestRunnerWKWebView.mm: 12 (-[TestRunnerWKWebView _didFinishScrolling:]): 13 (-[TestRunnerWKWebView _didFinishScrolling]): Deleted. 14 1 15 2022-04-13 Chris Dumez <cdumez@apple.com> 2 16 -
trunk/Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.mm
r281279 r292812 45 45 - (void)scrollViewWillBeginZooming:(UIScrollView *)scrollView withView:(UIView *)view; 46 46 - (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(CGFloat)scale; 47 - (void)_didFinishScrolling ;47 - (void)_didFinishScrolling:(UIScrollView *)scrollView; 48 48 - (void)_scheduleVisibleContentRectUpdate; 49 49 … … 427 427 } 428 428 429 - (void)_didFinishScrolling 430 { 431 [super _didFinishScrolling ];429 - (void)_didFinishScrolling:(UIScrollView *)scrollView 430 { 431 [super _didFinishScrolling:scrollView]; 432 432 433 433 if (self.didEndScrollingCallback)
Note: See TracChangeset
for help on using the changeset viewer.