Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ec945fa4fae17e95471f50789b79fc0d89704fa7
      
https://github.com/WebKit/WebKit/commit/ec945fa4fae17e95471f50789b79fc0d89704fa7
  Author: Richard Robinson <richard_robins...@apple.com>
  Date:   2023-03-16 (Thu, 16 Mar 2023)

  Changed paths:
    M LayoutTests/platform/wk2/TestExpectations
    M Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
    M Source/WebKit/UIProcess/ios/WKKeyboardScrollingAnimator.h
    M Source/WebKit/UIProcess/ios/WKKeyboardScrollingAnimator.mm

  Log Message:
  -----------
  [ iOS x86_64 ] fast/scrolling/keyboard-scrolling-distance-pageDown.html is a 
near-constant crash
https://bugs.webkit.org/show_bug.cgi?id=253323
rdar://106199360

Reviewed by Simon Fraser.

This test was occasionally crashing as a consequence of the test that runs 
prior to it,
`keyboard-scrolling-distance-pageDown`. This prior test is implemented in such 
a way that it ends
as soon as a certain number of scroll events occur, and does not wait until the 
scroll itself
actually finishes.

As a result, by the time `keyboard-scrolling-distance-pageDown` is run, the 
scroll from the previous
test may still be running. Then, `-[WKWebView _didFinishScrolling:]` gets 
called at some point
during the second test, once the scroll from the first test finishes. The 
scrolling coordinator proxy
from the first test has been destroyed at this point, which causes the crash to 
happen when the proxy
tries to be dereferenced.

This is essentially the equivalent of going to a new page midway through a 
scroll and not halting the
scroll. This PR fixes this by always immediately stopping any keyboard scroll 
that may be in progress
whenever any new page is loaded.

* LayoutTests/platform/wk2/TestExpectations:
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _didCommitLoadForMainFrame]):
* Source/WebKit/UIProcess/ios/WKKeyboardScrollingAnimator.h:
* Source/WebKit/UIProcess/ios/WKKeyboardScrollingAnimator.mm:
(-[WKKeyboardScrollingAnimator stopScrollingImmediately]):
(-[WKKeyboardScrollViewAnimator stopScrollingImmediately]):

Canonical link: https://commits.webkit.org/261757@main


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to