-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[iOS 16] All layout tests in fast/events/ios/rotation time out
https://bugs.webkit.org/show_bug.cgi?id=242199 rdar://93784344 Reviewed by Devin Rousso and Tim Horton. For all apps linked on or after iOS 16, `-[UIDevice setOrientation:animated:]` is a no-op; this causes all layout tests that attempt to simulate rotation (i.e., all the tests inside fast/events/ios/rotation) to time out while waiting for the web view to resize during rotation. In its place, UIKit has added `-[UIWindowScene requestGeometryUpdateWithPreferences:errorHandler:]`, which can be used to request a scene-level transition to one or more requested interface orientations; fix these failing layout tests by adopting this API instead on iOS 16. * Source/WTF/wtf/PlatformHave.h: Add a new build-time flag to guard the availability of the new UIKit API. * Tools/WebKitTestRunner/ios/TestControllerIOS.mm: (WTR::restorePortraitOrientationIfNeeded): (WTR::TestController::platformResetStateToConsistentValues): Additionally refactor logic for restoring device orientation to portrait mode between tests, so that it's also compatible with iOS 16. * Tools/WebKitTestRunner/ios/UIScriptControllerIOS.h: * Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::UIScriptControllerIOS::simulateRotation): (WTR::UIScriptControllerIOS::simulateRotationLikeSafari): Factor out common logic into a private helper method; use `-requestGeometryUpdateWithPreferences:` on iOS 16, and fall back to `-setOrientation:animated:` elsewhere. (WTR::toWindowSceneGeometryPreferences): (WTR::toUIDeviceOrientation): Canonical link: https://commits.webkit.org/252016@main
- Loading branch information
Showing
4 changed files
with
102 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters