Bug 1477610 - Make sure a resize during page load doesn't get mis-identified as a resize caused by a subsequent layout change. r=hiro
authorBotond Ballo <botond@mozilla.com>
Thu, 09 May 2019 03:56:58 +0000
changeset 531986 695609f420a1f42efb91dbd552d4e75e1dc00c3f
parent 531985 ca147aeec45e24d7e614846461228261d1439ca4
child 531987 a7ec57d41cbbaf766097d735ba76908a2a587e16
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershiro
bugs1477610
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1477610 - Make sure a resize during page load doesn't get mis-identified as a resize caused by a subsequent layout change. r=hiro Differential Revision: https://phabricator.services.mozilla.com/D30416
testing/web-platform/tests/visual-viewport/viewport-scrollbars-cause-resize.html
--- a/testing/web-platform/tests/visual-viewport/viewport-scrollbars-cause-resize.html
+++ b/testing/web-platform/tests/visual-viewport/viewport-scrollbars-cause-resize.html
@@ -55,20 +55,20 @@
             }, "view size reflects appearance of classic scrollbars");
 
 
         document.body.style.width = "";
         document.body.style.height = "";
       }
 
       // Run the test after load to make sure any resize from a previous test
-      // doesn't interfere.
-      window.onload = function() {
+      // or from the load doesn't interfere.
+      window.onload = requestAnimationFrame(function() {
         try {
           runTest();
         } finally {
           done();
         }
-      };
+      });
     </script>
     <div id="log"></div>
     </body>
 </html>