Title: [254765] trunk/Tools
Revision
254765
Author
megan_gard...@apple.com
Date
2020-01-17 13:57:30 -0800 (Fri, 17 Jan 2020)

Log Message

Fix assertion when test fast/events/ios/rotation/basic-rotation.html is followed by fast/events/ios/rotation/do-not-shrink-to-fit-content-after-rotation.html
https://bugs.webkit.org/show_bug.cgi?id=206383
<rdar://problem/58618513>

Reviewed by Tim Horton.

Rotation tests are asserting because _didEndRotation is being called multiple times.
The call is at the end of viewWillTransitionToSize, which is called with the same
size that the view already is. Therefore, if no size is changing, early out,
which keeps this double call from happening.

* WebKitTestRunner/ios/PlatformWebViewIOS.mm:
(-[PlatformWebViewController viewWillTransitionToSize:withTransitionCoordinator:]):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (254764 => 254765)


--- trunk/Tools/ChangeLog	2020-01-17 21:43:13 UTC (rev 254764)
+++ trunk/Tools/ChangeLog	2020-01-17 21:57:30 UTC (rev 254765)
@@ -1,3 +1,19 @@
+2020-01-17  Megan Gardner  <megan_gard...@apple.com>
+
+        Fix assertion when test fast/events/ios/rotation/basic-rotation.html is followed by fast/events/ios/rotation/do-not-shrink-to-fit-content-after-rotation.html
+        https://bugs.webkit.org/show_bug.cgi?id=206383
+        <rdar://problem/58618513>
+
+        Reviewed by Tim Horton.
+
+        Rotation tests are asserting because _didEndRotation is being called multiple times.
+        The call is at the end of viewWillTransitionToSize, which is called with the same
+        size that the view already is. Therefore, if no size is changing, early out,
+        which keeps this double call from happening.
+
+        * WebKitTestRunner/ios/PlatformWebViewIOS.mm:
+        (-[PlatformWebViewController viewWillTransitionToSize:withTransitionCoordinator:]):
+
 2020-01-17  Jonathan Bedard  <jbed...@apple.com>
 
         Python 3: Add support to run-webkit-tests (Follow-up fix)

Modified: trunk/Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm (254764 => 254765)


--- trunk/Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm	2020-01-17 21:43:13 UTC (rev 254764)
+++ trunk/Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm	2020-01-17 21:57:30 UTC (rev 254765)
@@ -133,6 +133,9 @@
 
     TestRunnerWKWebView *webView = WTR::TestController::singleton().mainWebView()->platformView();
 
+    if (CGSizeEqualToSize([webView frame].size, toSize))
+        return;
+
     if (webView.usesSafariLikeRotation)
         [webView _setInterfaceOrientationOverride:[[UIApplication sharedApplication] statusBarOrientation]];
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to