Skip to content
Permalink
Browse files
CrashTracer: MobileSafari at WebKit: -[WKWebView(WKViewInternalIOS) _…
…updateScrollViewForTransaction:]

https://bugs.webkit.org/show_bug.cgi?id=241563
<rdar://94621991>

Reviewed by Wenson Hsieh.

Protect against a null root scrolling node.

* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _updateScrollViewForTransaction:]):

Canonical link: https://commits.webkit.org/251509@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@295504 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
smfr committed Jun 13, 2022
1 parent f03b76f commit 5ce26563f824299cfbf45a8ec2a4cabc13226f3b
Showing 1 changed file with 10 additions and 2 deletions.
@@ -876,8 +876,16 @@ - (void)_updateScrollViewForTransaction:(const WebKit::RemoteLayerTreeTransactio
[_scrollView setMinimumZoomScale:layerTreeTransaction.minimumScaleFactor()];
[_scrollView setMaximumZoomScale:layerTreeTransaction.maximumScaleFactor()];
[_scrollView _setZoomEnabledInternal:layerTreeTransaction.allowsUserScaling()];
auto rootNode = _page->scrollingCoordinatorProxy()->rootNode();
WebKit::ScrollingTreeScrollingNodeDelegateIOS::updateScrollViewForOverscrollBehavior(_scrollView.get(), rootNode->horizontalOverscrollBehavior(), rootNode->verticalOverscrollBehavior(), WebKit::ScrollingTreeScrollingNodeDelegateIOS::AllowOverscrollToPreventScrollPropagation::No);

auto horizontalOverscrollBehavior = WebCore::OverscrollBehavior::Auto;
auto verticalOverscrollBehavior = WebCore::OverscrollBehavior::Auto;

if (auto rootNode = _page->scrollingCoordinatorProxy()->rootNode()) {
horizontalOverscrollBehavior = rootNode->horizontalOverscrollBehavior();
verticalOverscrollBehavior = rootNode->verticalOverscrollBehavior();
}

WebKit::ScrollingTreeScrollingNodeDelegateIOS::updateScrollViewForOverscrollBehavior(_scrollView.get(), horizontalOverscrollBehavior, verticalOverscrollBehavior, WebKit::ScrollingTreeScrollingNodeDelegateIOS::AllowOverscrollToPreventScrollPropagation::No);

bool hasDockedInputView = !CGRectIsEmpty(_inputViewBoundsInWindow);
bool isZoomed = layerTreeTransaction.pageScaleFactor() > layerTreeTransaction.initialScaleFactor();

0 comments on commit 5ce2656

Please sign in to comment.