WebKit
WebKit copied to clipboard
REGRESSION (278484@main): [ iOS ] editing/selection/ios/place-selection-in-overflow-area.html is a consistent timeout
250f418f2b304fedc196a58ef65adeab4a39370d
REGRESSION (278484@main): [ iOS ] editing/selection/ios/place-selection-in-overflow-area.html is a consistent timeout https://bugs.webkit.org/show_bug.cgi?id=274180 rdar://128086114 Reviewed by NOBODY (OOPS!). After the changes in 278484@main, this test began to intermittently fail, but only when run after another layout test that ends with a selection rect over the tap location, `(25, 25)`. This is because the new logic to clear out the UI-side cached editor state in `278484@main` leaves the editor state without post-layout or visual data. This means that the `_lastSelectionDrawingInfo` on `WKContentView` isn't updated to reflect the fact that there's no more selection after committing the load. Subsequently, `-_shouldToggleSelectionCommandsAfterTapAt:` returns `YES` since we (incorrectly) think the user is still tapping a selection rect, which should toggle the edit menu instead of being handled as a synthetic click. To fix this, clear out the stale `_lastSelectionDrawingInfo` (along with `_cachedSelectedTextRange`) from the previous page upon transitioning to a new page. * LayoutTests/editing/selection/ios/persist-selection-after-tapping-on-element-with-mousedown-handler.html: Drive-by fix: remove a redundant call to `testRunner.notifyDone()`. This test currently ends faster than intended, since it doesn't wait for the keyboard to be dismissed. * LayoutTests/platform/ios/TestExpectations: Remove failing test expectations. * Source/WebKit/UIProcess/PageClient.h: * Source/WebKit/UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::clearEditorStateAfterPageTransition): Add a separate client method to call out to `WKContentView` (on iOS) to invalidate selection drawing info when transitioning to a new page. * Source/WebKit/UIProcess/ios/PageClientImplIOS.h: * Source/WebKit/UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::didClearEditorStateAfterPageTransition): * Source/WebKit/UIProcess/ios/WKContentViewInteraction.h: * Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _didClearEditorStateAfterPageTransition]): See comments above.
https://github.com/WebKit/WebKit/commit/250f418f2b304fedc196a58ef65adeab4a39370d
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/d8c1e87026c929fcc9ea3bb5815d230f6a06f7f1)
Oh dear, it looks like the API test failure (ScrollViewScrollabilityTests.ScrollableWithOverflowHiddenWhenZoomed) is real :/
I might need to adjust the approach here...
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/250f418f2b304fedc196a58ef65adeab4a39370d)
I suppose the other PageClientImpl
s need stubs for didClearEditorStateAfterPageTransition
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/1783513664b9985d8e3cd3bf971315d6b4f3f0a5)
EWS run on current version of this PR (hash https://github.com/WebKit/WebKit/commit/1a15f811c211b2c1f5267f079d1b9482ba5e8361)
Committed 278902@main (24339c7cdb41): https://commits.webkit.org/278902@main
Reviewed commits have been landed. Closing PR #28664 and removing active labels.