haikuwebkit/LayoutTests/platform/ios-15
Wenson Hsieh 110ceb0490 [iOS] Fix and reenable several layout tests to account for the changes in rdar://80384564
https://bugs.webkit.org/show_bug.cgi?id=229316

Reviewed by Tim Horton.

Source/WebKit:

After rdar://80384564, UIKit's non-editable text tap recognizer will no longer cause us to clear the active text
selection range when tapping outside of currently selected text in the page. Instead, WebKit's synthetic click
gesture recognizer should now manages clearing the selection (unless the page has prevented the "mousedown"
event).

With just the UIKit-side change, this already mostly works as expected since `commitPotentialTapFailed()` clears
out non-editable selections. However, there is one scenario in which we do want to clear out the selection when
tapping that isn't covered by the synthetic click gesture: when tapping on an element that does not handle or
prevent "mousedown"; this behavior is exercised by the existing layout test
`editing/selection/ios/hide-selection-after-tap-on-prevent-default-element.html`. To preserve this behavior, we
add a call to `clearSelectionAfterTapIfNeeded()` when completing a synthetic click, in the case where the
"mousedown" event was not swallowed.

These 3 tests should pass after the changes in rdar://80384564:
- editing/selection/ios/change-selection-by-tapping-with-existing-selection.html
- editing/selection/preserve-selection-when-clicking-button.html
- editing/selection/ios/persist-selection-after-tapping-on-element-with-mousedown-handler.html

And these WebKit-side changes are needed to keep these 2 tests passing:
- editing/selection/ios/hide-selection-after-tap-on-prevent-default-element.html
- fast/images/text-recognition/ios/reselect-word-in-image-overlay.html

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::completeSyntheticClick):

LayoutTests:

See WebKit/ChangeLog for more details.

* fast/images/text-recognition/ios/reselect-word-in-image-overlay.html:

Add a short delay to avoid timing out, due to the second long press gesture to select text not triggering.

* platform/ios-14/TestExpectations:

Remove iOS 14-specific PASS expectations, and remove the more generic FAIL expectation in the ios directory.
Instead, just mark these three layout tests as FAIL on iOS 15, and PASS elsewhere.

* platform/ios-15/TestExpectations: Added.
* platform/ios/TestExpectations:


Canonical link: https://commits.webkit.org/240810@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281420 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-22 21:26:45 +00:00
..
TestExpectations