Title: [227021] branches/safari-605-branch/LayoutTests

Diff

Modified: branches/safari-605-branch/LayoutTests/ChangeLog (227020 => 227021)


--- branches/safari-605-branch/LayoutTests/ChangeLog	2018-01-17 05:03:49 UTC (rev 227020)
+++ branches/safari-605-branch/LayoutTests/ChangeLog	2018-01-17 05:03:51 UTC (rev 227021)
@@ -1,5 +1,27 @@
 2018-01-16  Jason Marcell  <[email protected]>
 
+        Cherry-pick r226902. rdar://problem/36567966
+
+    2018-01-11  Simon Fraser  <[email protected]>
+
+            fast/events/ios/rotation/layout-viewport-during-safari-type-rotation.html is flakey
+            https://bugs.webkit.org/show_bug.cgi?id=181569
+            rdar://problem/34117680
+
+            Reviewed by Zalan Bujtas.
+
+            Wait a tick before starting the rotation, otherwise -[WKWebView _beginAnimatedResizeWithUpdates:]
+            can bail because the unobscuredRect is empty.
+
+            Also wait for both the rotation UI script to complete, and the receipt of the
+            orientationchange event.
+
+            * fast/events/ios/rotation/layout-viewport-during-safari-type-rotation.html:
+            * fast/events/ios/rotation/resources/rotation-utils.js:
+            (doTest):
+
+2018-01-16  Jason Marcell  <[email protected]>
+
         Cherry-pick r226842. rdar://problem/36568025
 
     2018-01-11  Chris Dumez  <[email protected]>

Modified: branches/safari-605-branch/LayoutTests/fast/events/ios/rotation/layout-viewport-during-safari-type-rotation.html (227020 => 227021)


--- branches/safari-605-branch/LayoutTests/fast/events/ios/rotation/layout-viewport-during-safari-type-rotation.html	2018-01-17 05:03:49 UTC (rev 227020)
+++ branches/safari-605-branch/LayoutTests/fast/events/ios/rotation/layout-viewport-during-safari-type-rotation.html	2018-01-17 05:03:51 UTC (rev 227021)
@@ -32,6 +32,23 @@
             })();`
         }
         
+        var rotationComplete = false;
+        var gotOrientationChange = false;
+        
+        function rotationFinished()
+        {
+            rotationComplete = true;
+            checkForCompletion();
+        }
+        
+        function checkForCompletion()
+        {
+            if (rotationComplete && gotOrientationChange) {
+                if (window.testRunner)
+                    testRunner.notifyDone();
+            }
+        }
+
         window.addEventListener('resize', function() {
             accumulateLog('');
             accumulateLog('In resize event handler:');
@@ -43,9 +60,14 @@
             accumulateLog('In orientationchange event handler:');
             accumulateLog('(This will trigger the resize handler by forcing a layout.)');
             logFixedAndViewports();
+            gotOrientationChange = true;
         }, false);
 
-        window.addEventListener('load', doTest, false);
+        window.addEventListener('load', function() {
+            setTimeout(function() {
+                doTest(rotationFinished);
+            }, 0);
+        }, false);
     </script>
 </head>
 <body>

Modified: branches/safari-605-branch/LayoutTests/fast/events/ios/rotation/resources/rotation-utils.js (227020 => 227021)


--- branches/safari-605-branch/LayoutTests/fast/events/ios/rotation/resources/rotation-utils.js	2018-01-17 05:03:49 UTC (rev 227020)
+++ branches/safari-605-branch/LayoutTests/fast/events/ios/rotation/resources/rotation-utils.js	2018-01-17 05:03:51 UTC (rev 227021)
@@ -27,7 +27,7 @@
     logFixedObject();
 }
 
-function doTest()
+function doTest(scriptCompleteCallback)
 {
     accumulateLog('Before rotation');
     logFixedAndViewports();
@@ -43,7 +43,11 @@
         logPre.textContent = logging;
         document.body.appendChild(logPre);
 
-        if (window.testRunner)
-            testRunner.notifyDone();
+        if (scriptCompleteCallback)
+            scriptCompleteCallback();
+        else {
+            if (window.testRunner)
+                testRunner.notifyDone();
+        }
     });
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to