New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[iOS 16] All layout tests in fast/events/ios/rotation time out #1957
Conversation
(Note that these tests will fail with text diffs after these changes, but for other reasons — some of them, for example, hard-code the iPhone 8 screen width/height in the test, or in test expectations. However, these failures are not specific to iOS 16). |
@@ -1256,9 +1256,14 @@ | |||
#define HAVE_VK_IMAGE_TRANSLATION_SUPPORT 1 | |||
#endif | |||
|
|||
#if !defined(HAVE_UIKIT_RESIZABLE_WINDOWS) && PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 160000 | |||
#if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 160000 | |||
#if !defined(HAVE_UIKIT_RESIZABLE_WINDOWS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: Is checking !defined
really necessary here? Most other things in this file don't seem to bother 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see anything in the style guidelines (or webkit-dev) about this 🤷🏻♂️
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
250ac1f
to
b751dd0
Compare
Committed 252016@main (b751dd0): https://commits.webkit.org/252016@main Reviewed commits have been landed. Closing PR #1957 and removing active labels. |
b751dd0