Changeset 248466 in webkit
- Timestamp:
- Aug 9, 2019, 8:53:59 AM (7 years ago)
- Location:
- branches/safari-608.1-branch/Source
- Files:
-
- 16 edited
-
WebCore/ChangeLog (modified) (2 diffs)
-
WebCore/page/scrolling/AsyncScrollingCoordinator.cpp (modified) (2 diffs)
-
WebCore/page/scrolling/AsyncScrollingCoordinator.h (modified) (1 diff)
-
WebCore/page/scrolling/ScrollingCoordinator.cpp (modified) (1 diff)
-
WebCore/page/scrolling/ScrollingCoordinator.h (modified) (2 diffs)
-
WebCore/rendering/RenderLayerCompositor.cpp (modified) (1 diff)
-
WebCore/rendering/RenderLayerCompositor.h (modified) (1 diff)
-
WebKit/ChangeLog (modified) (2 diffs)
-
WebKit/Shared/ios/InteractionInformationAtPosition.h (modified) (2 diffs)
-
WebKit/Shared/ios/InteractionInformationAtPosition.mm (modified) (2 diffs)
-
WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h (modified) (2 diffs)
-
WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm (modified) (2 diffs)
-
WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.h (modified) (2 diffs)
-
WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm (modified) (1 diff)
-
WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h (modified) (1 diff)
-
WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-608.1-branch/Source/WebCore/ChangeLog
r248458 r248466 1 2019-08-08 Kocsen Chung <kocsen_chung@apple.com> 2 3 Cherry-pick r248438. rdar://problem/54093226 4 5 [iOS] Position image information should respect the image orientation 6 https://bugs.webkit.org/show_bug.cgi?id=200487 7 8 Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-08-08 9 Reviewed by Simon Fraser. 10 1 2019-08-09 Kocsen Chung <kocsen_chung@apple.com> 2 3 Cherry-pick r248447. rdar://problem/54109873 4 5 Add to InteractionInformationAtPosition information about whether the element is in a subscrollable region 6 https://bugs.webkit.org/show_bug.cgi?id=200374 7 rdar://problem/54095519 8 9 Reviewed by Tim Horton. 11 10 Source/WebCore: 12 11 13 Re-factor CachedImage::imageSizeForRenderer() into another overriding 14 function which does not scale the imageSize. Therefore the new function 15 returns FloatSize while the original function returns LayoutSize. 16 17 * loader/cache/CachedImage.cpp: 18 (WebCore::CachedImage::imageSizeForRenderer const): 19 * loader/cache/CachedImage.h: 20 * rendering/RenderElement.h: 12 Add to InteractionInformationAtPosition a ScrollingNodeID which represents the enclosing scrolling 13 node that affects the targeted element's position. We use this to find a UIScrollView in the UI process. 14 15 The entrypoint to finding the enclosing scrolling node is ScrollingCoordinator::scrollableContainerNodeID(), 16 which calls RenderLayerCompositor::asyncScrollableContainerNodeID() to look for a scrolling ancestor in 17 the current frame, and then looks for an enclosing scrollable frame, or a scrolling ancestor in 18 the enclosing frame. 19 20 There's a bit of subtlety in RenderLayerCompositor::asyncScrollableContainerNodeID() because if you're asking 21 for the node that scrolls the renderer, if the renderer itself has a layer and is scrollable, you want 22 its enclosing scroller. 23 24 * page/scrolling/AsyncScrollingCoordinator.cpp: 25 (WebCore::AsyncScrollingCoordinator::scrollableContainerNodeID const): 26 * page/scrolling/AsyncScrollingCoordinator.h: 27 * page/scrolling/ScrollingCoordinator.cpp: 28 (WebCore::scrollableContainerNodeID const): 29 * page/scrolling/ScrollingCoordinator.h: 30 * rendering/RenderLayer.h: 31 * rendering/RenderLayerCompositor.cpp: 32 (WebCore::RenderLayerCompositor::asyncScrollableContainerNodeID): 33 * rendering/RenderLayerCompositor.h: 21 34 22 35 Source/WebKit: 23 36 24 imagePositionInformation() should respect the image orientation when 25 drawing an Image to a ShareableBitmap context. 26 27 boundsPositionInformation() already takes care of the image orientation 28 because it gets RenderImage::enclosingBoundingBox(). 29 37 Add InteractionInformationAtPosition.containerScrollingNodeID and initialize it in elementPositionInformation() 38 by asking the scrolling coordinator. 39 40 Also add a way to get from a ScrollingNodeID to a UIScrollView to RemoteScrollingCoordinatorProxy, 41 which gets the scrolling node and asks the delegate for the UIView. 42 43 * Shared/ios/InteractionInformationAtPosition.h: 44 * Shared/ios/InteractionInformationAtPosition.mm: 45 (WebKit::InteractionInformationAtPosition::encode const): 46 (WebKit::InteractionInformationAtPosition::decode): 47 * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h: 48 * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm: 49 (WebKit::RemoteScrollingCoordinatorProxy::scrollViewForScrollingNodeID const): 50 * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.h: 51 * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: 52 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollView const): 53 * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h: 30 54 * WebProcess/WebPage/ios/WebPageIOS.mm: 31 (WebKit::imagePositionInformation): 32 33 Tools: 34 35 Add an API test to verify the position image information is drawn rotated 36 because of respecting its image orientation. 37 38 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 39 * TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm: 40 (TestWebKitAPI::TEST): 41 * TestWebKitAPI/Tests/WebKitCocoa/exif-orientation-8-llo.jpg: Added. 42 * TestWebKitAPI/Tests/WebKitCocoa/img-with-rotated-image.html: Added. 43 44 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248438 268f45cc-cd09-0410-ab3c-d52691b4dbfc 45 46 2019-08-08 Said Abou-Hallawa <sabouhallawa@apple.com> 47 48 [iOS] Position image information should respect the image orientation 49 https://bugs.webkit.org/show_bug.cgi?id=200487 50 51 Reviewed by Simon Fraser. 52 53 Re-factor CachedImage::imageSizeForRenderer() into another overriding 54 function which does not scale the imageSize. Therefore the new function 55 returns FloatSize while the original function returns LayoutSize. 56 57 * loader/cache/CachedImage.cpp: 58 (WebCore::CachedImage::imageSizeForRenderer const): 59 * loader/cache/CachedImage.h: 60 * rendering/RenderElement.h: 55 (WebKit::elementPositionInformation): 56 57 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248447 268f45cc-cd09-0410-ab3c-d52691b4dbfc 58 59 2019-08-08 Kocsen Chung <kocsen_chung@apple.com> 60 61 Cherry-pick r248438. rdar://problem/54093226 62 63 [iOS] Position image information should respect the image orientation 64 https://bugs.webkit.org/show_bug.cgi?id=200487 65 66 Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-08-08 67 Reviewed by Simon Fraser. 68 69 Source/WebCore: 70 71 Re-factor CachedImage::imageSizeForRenderer() into another overriding 72 function which does not scale the imageSize. Therefore the new function 73 returns FloatSize while the original function returns LayoutSize. 74 75 * loader/cache/CachedImage.cpp: 76 (WebCore::CachedImage::imageSizeForRenderer const): 77 * loader/cache/CachedImage.h: 78 * rendering/RenderElement.h: 79 80 Source/WebKit: 81 82 imagePositionInformation() should respect the image orientation when 83 drawing an Image to a ShareableBitmap context. 84 85 boundsPositionInformation() already takes care of the image orientation 86 because it gets RenderImage::enclosingBoundingBox(). 87 88 * WebProcess/WebPage/ios/WebPageIOS.mm: 89 (WebKit::imagePositionInformation): 90 91 Tools: 92 93 Add an API test to verify the position image information is drawn rotated 94 because of respecting its image orientation. 95 96 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 97 * TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm: 98 (TestWebKitAPI::TEST): 99 * TestWebKitAPI/Tests/WebKitCocoa/exif-orientation-8-llo.jpg: Added. 100 * TestWebKitAPI/Tests/WebKitCocoa/img-with-rotated-image.html: Added. 101 102 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248438 268f45cc-cd09-0410-ab3c-d52691b4dbfc 103 104 2019-08-08 Said Abou-Hallawa <sabouhallawa@apple.com> 105 106 [iOS] Position image information should respect the image orientation 107 https://bugs.webkit.org/show_bug.cgi?id=200487 108 109 Reviewed by Simon Fraser. 110 111 Re-factor CachedImage::imageSizeForRenderer() into another overriding 112 function which does not scale the imageSize. Therefore the new function 113 returns FloatSize while the original function returns LayoutSize. 114 115 * loader/cache/CachedImage.cpp: 116 (WebCore::CachedImage::imageSizeForRenderer const): 117 * loader/cache/CachedImage.h: 118 * rendering/RenderElement.h: 61 119 62 120 2019-08-08 Alan Coon <alancoon@apple.com> … … 378 436 379 437 Reviewed by Darin Adler. 438 439 2019-08-08 Simon Fraser <simon.fraser@apple.com> 440 441 Add to InteractionInformationAtPosition information about whether the element is in a subscrollable region 442 https://bugs.webkit.org/show_bug.cgi?id=200374 443 rdar://problem/54095519 444 445 Reviewed by Tim Horton. 446 447 Add to InteractionInformationAtPosition a ScrollingNodeID which represents the enclosing scrolling 448 node that affects the targeted element's position. We use this to find a UIScrollView in the UI process. 449 450 The entrypoint to finding the enclosing scrolling node is ScrollingCoordinator::scrollableContainerNodeID(), 451 which calls RenderLayerCompositor::asyncScrollableContainerNodeID() to look for a scrolling ancestor in 452 the current frame, and then looks for an enclosing scrollable frame, or a scrolling ancestor in 453 the enclosing frame. 454 455 There's a bit of subtlety in RenderLayerCompositor::asyncScrollableContainerNodeID() because if you're asking 456 for the node that scrolls the renderer, if the renderer itself has a layer and is scrollable, you want 457 its enclosing scroller. 458 459 * page/scrolling/AsyncScrollingCoordinator.cpp: 460 (WebCore::AsyncScrollingCoordinator::scrollableContainerNodeID const): 461 * page/scrolling/AsyncScrollingCoordinator.h: 462 * page/scrolling/ScrollingCoordinator.cpp: 463 (WebCore::scrollableContainerNodeID const): 464 * page/scrolling/ScrollingCoordinator.h: 465 * rendering/RenderLayer.h: 466 * rendering/RenderLayerCompositor.cpp: 467 (WebCore::RenderLayerCompositor::asyncScrollableContainerNodeID): 468 * rendering/RenderLayerCompositor.h: 380 469 381 470 We normally prevent page caching if there were any pending subresource loads when navigating, -
branches/safari-608.1-branch/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp
r247344 r248466 38 38 #include "Page.h" 39 39 #include "PerformanceLoggingClient.h" 40 #include "RenderLayerCompositor.h" 41 #include "RenderView.h" 40 42 #include "ScrollAnimator.h" 41 43 #include "ScrollingConstraints.h" … … 785 787 } 786 788 789 ScrollingNodeID AsyncScrollingCoordinator::scrollableContainerNodeID(const RenderObject& renderer) const 790 { 791 if (auto overflowScrollingNodeID = renderer.view().compositor().asyncScrollableContainerNodeID(renderer)) 792 return overflowScrollingNodeID; 793 794 // If we're in a scrollable frame, return that. 795 auto* frameView = renderer.frame().view(); 796 if (!frameView) 797 return 0; 798 799 if (auto scrollingNodeID = frameView->scrollingNodeID()) 800 return scrollingNodeID; 801 802 // Otherwise, look for a scrollable element in the containing frame. 803 if (auto* ownerElement = renderer.document().ownerElement()) { 804 if (auto* frameRenderer = ownerElement->renderer()) 805 return scrollableContainerNodeID(*frameRenderer); 806 } 807 808 return 0; 809 } 810 787 811 String AsyncScrollingCoordinator::scrollingStateTreeAsText(ScrollingStateTreeAsTextBehavior behavior) const 788 812 { -
branches/safari-608.1-branch/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h
r247344 r248466 92 92 bool asyncFrameOrOverflowScrollingEnabled() const; 93 93 94 WEBCORE_EXPORT ScrollingNodeID scrollableContainerNodeID(const RenderObject&) const override; 95 94 96 WEBCORE_EXPORT void frameViewLayoutUpdated(FrameView&) override; 95 97 WEBCORE_EXPORT void frameViewRootLayerDidChange(FrameView&) override; -
branches/safari-608.1-branch/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
r247306 r248466 97 97 } 98 98 99 ScrollingNodeID ScrollingCoordinator::scrollableContainerNodeID(const RenderObject&) const 100 { 101 return 0; 102 } 103 99 104 EventTrackingRegions ScrollingCoordinator::absoluteEventTrackingRegionsForFrame(const Frame& frame) const 100 105 { -
branches/safari-608.1-branch/Source/WebCore/page/scrolling/ScrollingCoordinator.h
r247344 r248466 60 60 class Page; 61 61 class Region; 62 class RenderObject; 62 63 class RenderLayer; 63 64 class ScrollableArea; … … 83 84 // Return whether this scrolling coordinator handles scrolling for the given overflow scroll layer. 84 85 WEBCORE_EXPORT virtual bool coordinatesScrollingForOverflowLayer(const RenderLayer&) const; 86 87 // Returns the ScrollingNodeID of the innermost scrolling node that scrolls the renderer. 88 WEBCORE_EXPORT virtual ScrollingNodeID scrollableContainerNodeID(const RenderObject&) const; 85 89 86 90 // Should be called whenever the given frame view has been laid out. -
branches/safari-608.1-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp
r247610 r248466 2709 2709 } 2710 2710 2711 // Note that this returns the ScrollingNodeID of the scroller this layer is embedded in, not the layer's own ScrollingNodeID if it has one. 2712 ScrollingNodeID RenderLayerCompositor::asyncScrollableContainerNodeID(const RenderObject& renderer) 2713 { 2714 auto* enclosingLayer = renderer.enclosingLayer(); 2715 if (!enclosingLayer) 2716 return 0; 2717 2718 auto layerScrollingNodeID = [](const RenderLayer& layer) -> ScrollingNodeID { 2719 if (layer.isComposited()) 2720 return layer.backing()->scrollingNodeIDForRole(ScrollCoordinationRole::Scrolling); 2721 return 0; 2722 }; 2723 2724 // If the renderer is inside the layer, we care about the layer's scrollability. Otherwise, we let traverseAncestorLayers look at ancestors. 2725 if (!renderer.hasLayer()) { 2726 if (auto scrollingNodeID = layerScrollingNodeID(*enclosingLayer)) 2727 return scrollingNodeID; 2728 } 2729 2730 ScrollingNodeID containerScrollingNodeID = 0; 2731 traverseAncestorLayers(*enclosingLayer, [&](const RenderLayer& ancestorLayer, bool isContainingBlockChain, bool /*isPaintOrderAncestor*/) { 2732 if (isContainingBlockChain && ancestorLayer.hasCompositedScrollableOverflow()) { 2733 containerScrollingNodeID = layerScrollingNodeID(ancestorLayer); 2734 return AncestorTraversal::Stop; 2735 } 2736 return AncestorTraversal::Continue; 2737 }); 2738 2739 return containerScrollingNodeID; 2740 } 2741 2711 2742 // Return true if the given layer is a stacking context and has compositing child 2712 2743 // layers that it needs to clip. In this case we insert a clipping GraphicsLayer -
branches/safari-608.1-branch/Source/WebCore/rendering/RenderLayerCompositor.h
r247246 r248466 215 215 bool updateAncestorClippingStack(const RenderLayer&, const RenderLayer* compositingAncestor) const; 216 216 217 // Returns the ScrollingNodeID for the containing async-scrollable layer that scrolls this renderer's border box. 218 // May return 0 for position-fixed content. 219 static ScrollingNodeID asyncScrollableContainerNodeID(const RenderObject&); 220 217 221 // Whether layer's backing needs a graphics layer to clip z-order children of the given layer. 218 222 static bool clipsCompositingDescendants(const RenderLayer&); -
branches/safari-608.1-branch/Source/WebKit/ChangeLog
r248461 r248466 1 2019-08-08 Kocsen Chung <kocsen_chung@apple.com> 2 3 Cherry-pick r248039. rdar://problem/54087592 4 5 [iOS 13] Safari crashes when closing a tab with a focused element if the unified field has focus 6 https://bugs.webkit.org/show_bug.cgi?id=200291 7 <rdar://problem/53717946> 8 9 Reviewed by Megan Gardner. 1 2019-08-09 Kocsen Chung <kocsen_chung@apple.com> 2 3 Cherry-pick r248447. rdar://problem/54109873 4 5 Add to InteractionInformationAtPosition information about whether the element is in a subscrollable region 6 https://bugs.webkit.org/show_bug.cgi?id=200374 7 rdar://problem/54095519 8 9 Reviewed by Tim Horton. 10 Source/WebCore: 11 12 Add to InteractionInformationAtPosition a ScrollingNodeID which represents the enclosing scrolling 13 node that affects the targeted element's position. We use this to find a UIScrollView in the UI process. 14 15 The entrypoint to finding the enclosing scrolling node is ScrollingCoordinator::scrollableContainerNodeID(), 16 which calls RenderLayerCompositor::asyncScrollableContainerNodeID() to look for a scrolling ancestor in 17 the current frame, and then looks for an enclosing scrollable frame, or a scrolling ancestor in 18 the enclosing frame. 19 20 There's a bit of subtlety in RenderLayerCompositor::asyncScrollableContainerNodeID() because if you're asking 21 for the node that scrolls the renderer, if the renderer itself has a layer and is scrollable, you want 22 its enclosing scroller. 23 24 * page/scrolling/AsyncScrollingCoordinator.cpp: 25 (WebCore::AsyncScrollingCoordinator::scrollableContainerNodeID const): 26 * page/scrolling/AsyncScrollingCoordinator.h: 27 * page/scrolling/ScrollingCoordinator.cpp: 28 (WebCore::scrollableContainerNodeID const): 29 * page/scrolling/ScrollingCoordinator.h: 30 * rendering/RenderLayer.h: 31 * rendering/RenderLayerCompositor.cpp: 32 (WebCore::RenderLayerCompositor::asyncScrollableContainerNodeID): 33 * rendering/RenderLayerCompositor.h: 10 34 11 35 Source/WebKit: 12 36 13 Makes -requestAutocorrectionContextWithCompletionHandler: robust in the case where the web page has been closed, 14 and there is no Connection object to use when waiting for a sync IPC response. 15 16 Test: AutocorrectionTests.RequestAutocorrectionContextAfterClosingPage 17 18 * UIProcess/ios/WKContentViewInteraction.mm: 19 (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]): 20 21 Tools: 22 23 Add an API test to exercise the scenario of synchronously requesting the autocorrection context immediately 24 after closing the web view, while the web view's content view isn't the first responder. 25 26 * TestWebKitAPI/Tests/ios/AutocorrectionTestsIOS.mm: 27 * TestWebKitAPI/ios/UIKitSPI.h: 28 29 30 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248039 268f45cc-cd09-0410-ab3c-d52691b4dbfc 31 32 2019-07-31 Wenson Hsieh <wenson_hsieh@apple.com> 33 34 [iOS 13] Safari crashes when closing a tab with a focused element if the unified field has focus 35 https://bugs.webkit.org/show_bug.cgi?id=200291 36 <rdar://problem/53717946> 37 38 Reviewed by Megan Gardner. 39 40 Makes -requestAutocorrectionContextWithCompletionHandler: robust in the case where the web page has been closed, 41 and there is no Connection object to use when waiting for a sync IPC response. 42 43 Test: AutocorrectionTests.RequestAutocorrectionContextAfterClosingPage 44 45 * UIProcess/ios/WKContentViewInteraction.mm: 46 (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]): 37 Add InteractionInformationAtPosition.containerScrollingNodeID and initialize it in elementPositionInformation() 38 by asking the scrolling coordinator. 39 40 Also add a way to get from a ScrollingNodeID to a UIScrollView to RemoteScrollingCoordinatorProxy, 41 which gets the scrolling node and asks the delegate for the UIView. 42 43 * Shared/ios/InteractionInformationAtPosition.h: 44 * Shared/ios/InteractionInformationAtPosition.mm: 45 (WebKit::InteractionInformationAtPosition::encode const): 46 (WebKit::InteractionInformationAtPosition::decode): 47 * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h: 48 * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm: 49 (WebKit::RemoteScrollingCoordinatorProxy::scrollViewForScrollingNodeID const): 50 * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.h: 51 * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: 52 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollView const): 53 * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h: 54 * WebProcess/WebPage/ios/WebPageIOS.mm: 55 (WebKit::elementPositionInformation): 56 57 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248447 268f45cc-cd09-0410-ab3c-d52691b4dbfc 58 59 2019-08-08 Kocsen Chung <kocsen_chung@apple.com> 60 61 Cherry-pick r248039. rdar://problem/54087592 62 63 [iOS 13] Safari crashes when closing a tab with a focused element if the unified field has focus 64 https://bugs.webkit.org/show_bug.cgi?id=200291 65 <rdar://problem/53717946> 66 67 Reviewed by Megan Gardner. 68 69 Source/WebKit: 70 71 Makes -requestAutocorrectionContextWithCompletionHandler: robust in the case where the web page has been closed, 72 and there is no Connection object to use when waiting for a sync IPC response. 73 74 Test: AutocorrectionTests.RequestAutocorrectionContextAfterClosingPage 75 76 * UIProcess/ios/WKContentViewInteraction.mm: 77 (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]): 78 79 Tools: 80 81 Add an API test to exercise the scenario of synchronously requesting the autocorrection context immediately 82 after closing the web view, while the web view's content view isn't the first responder. 83 84 * TestWebKitAPI/Tests/ios/AutocorrectionTestsIOS.mm: 85 * TestWebKitAPI/ios/UIKitSPI.h: 86 87 88 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248039 268f45cc-cd09-0410-ab3c-d52691b4dbfc 89 90 2019-07-31 Wenson Hsieh <wenson_hsieh@apple.com> 91 92 [iOS 13] Safari crashes when closing a tab with a focused element if the unified field has focus 93 https://bugs.webkit.org/show_bug.cgi?id=200291 94 <rdar://problem/53717946> 95 96 Reviewed by Megan Gardner. 97 98 Makes -requestAutocorrectionContextWithCompletionHandler: robust in the case where the web page has been closed, 99 and there is no Connection object to use when waiting for a sync IPC response. 100 101 Test: AutocorrectionTests.RequestAutocorrectionContextAfterClosingPage 102 103 * UIProcess/ios/WKContentViewInteraction.mm: 104 (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]): 47 105 48 106 2019-08-08 Kocsen Chung <kocsen_chung@apple.com> … … 310 368 would then destroy them on the main thread when the WebResourceLoadStatisticsStore is destroyed on the 311 369 main thread. 370 371 2019-08-08 Simon Fraser <simon.fraser@apple.com> 372 373 Add to InteractionInformationAtPosition information about whether the element is in a subscrollable region 374 https://bugs.webkit.org/show_bug.cgi?id=200374 375 rdar://problem/54095519 376 377 Reviewed by Tim Horton. 378 379 Add InteractionInformationAtPosition.containerScrollingNodeID and initialize it in elementPositionInformation() 380 by asking the scrolling coordinator. 381 382 Also add a way to get from a ScrollingNodeID to a UIScrollView to RemoteScrollingCoordinatorProxy, 383 which gets the scrolling node and asks the delegate for the UIView. 384 385 * Shared/ios/InteractionInformationAtPosition.h: 386 * Shared/ios/InteractionInformationAtPosition.mm: 387 (WebKit::InteractionInformationAtPosition::encode const): 388 (WebKit::InteractionInformationAtPosition::decode): 389 * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h: 390 * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm: 391 (WebKit::RemoteScrollingCoordinatorProxy::scrollViewForScrollingNodeID const): 392 * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.h: 393 * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: 394 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollView const): 395 * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h: 396 * WebProcess/WebPage/ios/WebPageIOS.mm: 397 (WebKit::elementPositionInformation): 312 398 313 399 * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: -
branches/safari-608.1-branch/Source/WebKit/Shared/ios/InteractionInformationAtPosition.h
r246892 r248466 32 32 #include "ShareableBitmap.h" 33 33 #include <WebCore/IntPoint.h> 34 #include <WebCore/ScrollTypes.h> 34 35 #include <WebCore/SelectionRect.h> 35 36 #include <WebCore/TextIndicator.h> … … 62 63 bool isAnimatedImage { false }; 63 64 bool isElement { false }; 65 WebCore::ScrollingNodeID containerScrollingNodeID { 0 }; 64 66 #if ENABLE(DATA_DETECTION) 65 67 bool isDataDetectorLink { false }; -
branches/safari-608.1-branch/Source/WebKit/Shared/ios/InteractionInformationAtPosition.mm
r246892 r248466 57 57 encoder << isAnimatedImage; 58 58 encoder << isElement; 59 encoder << containerScrollingNodeID; 59 60 encoder << adjustedPointForNodeRespondingToClickEvents; 60 61 encoder << url; … … 126 127 return false; 127 128 129 if (!decoder.decode(result.containerScrollingNodeID)) 130 return false; 131 128 132 if (!decoder.decode(result.adjustedPointForNodeRespondingToClickEvents)) 129 133 return false; -
branches/safari-608.1-branch/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h
r246490 r248466 34 34 #include <wtf/Noncopyable.h> 35 35 #include <wtf/RefPtr.h> 36 37 OBJC_CLASS UIScrollView; 36 38 37 39 namespace WebCore { … … 88 90 89 91 #if PLATFORM(IOS_FAMILY) 92 UIScrollView *scrollViewForScrollingNodeID(WebCore::ScrollingNodeID) const; 93 90 94 WebCore::FloatRect currentLayoutViewport() const; 91 95 void scrollingTreeNodeWillStartPanGesture(); -
branches/safari-608.1-branch/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm
r246962 r248466 32 32 #import "RemoteLayerTreeHost.h" 33 33 #import "RemoteLayerTreeNode.h" 34 #import "ScrollingTreeOverflowScrollingNodeIOS.h" 34 35 #import "WebPageProxy.h" 35 36 #import <UIKit/UIView.h> … … 53 54 using namespace WebCore; 54 55 56 UIScrollView *RemoteScrollingCoordinatorProxy::scrollViewForScrollingNodeID(WebCore::ScrollingNodeID nodeID) const 57 { 58 auto* treeNode = m_scrollingTree->nodeForID(nodeID); 59 if (!is<ScrollingTreeOverflowScrollingNode>(treeNode)) 60 return nil; 61 62 auto* scrollingNode = downcast<ScrollingTreeOverflowScrollingNode>(treeNode); 63 // All ScrollingTreeOverflowScrollingNodes are ScrollingTreeOverflowScrollingNodeIOS on iOS. 64 return static_cast<ScrollingTreeOverflowScrollingNodeIOS*>(scrollingNode)->scrollView(); 65 } 66 55 67 void RemoteScrollingCoordinatorProxy::connectStateNodeLayers(ScrollingStateTree& stateTree, const RemoteLayerTreeHost& layerTreeHost) 56 68 { -
branches/safari-608.1-branch/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.h
r243926 r248466 30 30 #include <WebCore/ScrollingTreeOverflowScrollingNode.h> 31 31 32 OBJC_CLASS UIScrollView; 33 32 34 namespace WebKit { 33 35 … … 38 40 static Ref<ScrollingTreeOverflowScrollingNodeIOS> create(WebCore::ScrollingTree&, WebCore::ScrollingNodeID); 39 41 virtual ~ScrollingTreeOverflowScrollingNodeIOS(); 42 43 UIScrollView* scrollView() const; 40 44 41 45 private: -
branches/safari-608.1-branch/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm
r243926 r248466 52 52 } 53 53 54 UIScrollView* ScrollingTreeOverflowScrollingNodeIOS::scrollView() const 55 { 56 return m_scrollingNodeDelegate->scrollView(); 57 } 58 54 59 void ScrollingTreeOverflowScrollingNodeIOS::commitStateBeforeChildren(const WebCore::ScrollingStateNode& stateNode) 55 60 { -
branches/safari-608.1-branch/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h
r246926 r248466 75 75 76 76 UIScrollView *findActingScrollParent(UIScrollView *); 77 UIScrollView *scrollView() const; 77 78 78 79 private: 79 UIScrollView *scrollView() const;80 81 80 RetainPtr<CALayer> m_scrollLayer; 82 81 RetainPtr<CALayer> m_scrolledContentsLayer; -
branches/safari-608.1-branch/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
r248458 r248466 2711 2711 } 2712 2712 2713 auto* elementForScrollTesting = linkElement ? linkElement : &element; 2714 if (auto* renderer = elementForScrollTesting->renderer()) { 2715 #if ENABLE(ASYNC_SCROLLING) 2716 if (auto* scrollingCoordinator = page.scrollingCoordinator()) 2717 info.containerScrollingNodeID = scrollingCoordinator->scrollableContainerNodeID(*renderer); 2718 #endif 2719 } 2720 2713 2721 if (auto* renderer = element.renderer()) { 2714 2722 if (renderer->isRenderImage())
Note:
See TracChangeset
for help on using the changeset viewer.