[webkit-changes] [WebKit/WebKit] 30bf9d: [iOS] fast/events/iOS/rotation are failing

Chris Dumez noreply at github.com
Fri Jan 27 07:44:28 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 30bf9df2e3d0b12f39ae0658cc9666e9cbfe6d0e
      https://github.com/WebKit/WebKit/commit/30bf9df2e3d0b12f39ae0658cc9666e9cbfe6d0e
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2023-01-27 (Fri, 27 Jan 2023)

  Changed paths:
    M Tools/WebKitTestRunner/TestController.h
    M Tools/WebKitTestRunner/ios/TestControllerIOS.mm

  Log Message:
  -----------
  [iOS] fast/events/iOS/rotation are failing
https://bugs.webkit.org/show_bug.cgi?id=251227
rdar://104203486

Reviewed by Wenson Hsieh.

This seems to have regressed with 255459 at main, which updated the logic
to restore portrait orientation between tests when we added support
for the screen orientation API.

There are 2 ways to restore the orientation:
1. Call [UIScene requestGeometryUpdateWithPreferences:]
2. Lock the orientation to portrait then unlock

In 255459 at main, I had replaced method 1 with method 2 because method 1
didn't work properly with the screen orientation lock tests. However,
it broke the tests in fast/events/iOS/rotation which rely on
`[UIScene requestGeometryUpdateWithPreferences:]` to simulate screen
rotation during the tests.

After several hours of trying to find a common mechanism to restore
orientation that would work for both screen rotation and orientation
lock tests, I still wasn't able to make it work.

For this reason, in my this, I am using method 2 only for tests that
lock the screen orientation and keep using the old method 1 for all
other tests. As a result, this restores pre-255459 at main behavior and
fixes existing tests. It also doesn't regress the screen orientation
lock tests which were added in 255459 at main.

* Tools/WebKitTestRunner/TestController.h:
* Tools/WebKitTestRunner/ios/TestControllerIOS.mm:
(-[WindowDidRotateObserver initWithCallback:]):
(-[WindowDidRotateObserver dealloc]):
(-[WindowDidRotateObserver _windowDidRotate]):
(WTR::TestController::restorePortraitOrientationIfNeeded):
(WTR::TestController::lockScreenOrientation):

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




More information about the webkit-changes mailing list