Title: [292030] trunk/LayoutTests
Revision
292030
Author
za...@apple.com
Date
2022-03-29 07:23:11 -0700 (Tue, 29 Mar 2022)

Log Message

Make fast/repaint/list-item-equal-style-change-no-repaint.html less prone to flakiness
https://bugs.webkit.org/show_bug.cgi?id=238480

Reviewed by Simon Fraser.

Use Internals::layoutCount to check whether animation triggers layout.

* fast/repaint/list-item-equal-style-change-no-repaint-expected.txt:
* fast/repaint/list-item-equal-style-change-no-repaint.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (292029 => 292030)


--- trunk/LayoutTests/ChangeLog	2022-03-29 12:24:28 UTC (rev 292029)
+++ trunk/LayoutTests/ChangeLog	2022-03-29 14:23:11 UTC (rev 292030)
@@ -1,3 +1,15 @@
+2022-03-29  Alan Bujtas  <za...@apple.com>
+
+        Make fast/repaint/list-item-equal-style-change-no-repaint.html less prone to flakiness
+        https://bugs.webkit.org/show_bug.cgi?id=238480
+
+        Reviewed by Simon Fraser.
+        
+        Use Internals::layoutCount to check whether animation triggers layout.
+
+        * fast/repaint/list-item-equal-style-change-no-repaint-expected.txt:
+        * fast/repaint/list-item-equal-style-change-no-repaint.html:
+
 2022-03-29  Tim Nguyen  <n...@apple.com>
 
         Re-import inert and <dialog> WPT

Modified: trunk/LayoutTests/fast/repaint/list-item-equal-style-change-no-repaint-expected.txt (292029 => 292030)


--- trunk/LayoutTests/fast/repaint/list-item-equal-style-change-no-repaint-expected.txt	2022-03-29 12:24:28 UTC (rev 292029)
+++ trunk/LayoutTests/fast/repaint/list-item-equal-style-change-no-repaint-expected.txt	2022-03-29 14:23:11 UTC (rev 292030)
@@ -1,2 +1,2 @@
 Test
-
+Number of layouts triggered: 0

Modified: trunk/LayoutTests/fast/repaint/list-item-equal-style-change-no-repaint.html (292029 => 292030)


--- trunk/LayoutTests/fast/repaint/list-item-equal-style-change-no-repaint.html	2022-03-29 12:24:28 UTC (rev 292029)
+++ trunk/LayoutTests/fast/repaint/list-item-equal-style-change-no-repaint.html	2022-03-29 14:23:11 UTC (rev 292030)
@@ -1,35 +1,43 @@
 <!DOCTYPE html>
 <html>
-  <head>
-    <style>
-    body {
-      margin: 0;
-    }
+<head>
+<style>
+body {
+  margin: 0;
+}
 
-    .animated {
-      -webkit-animation: test 1s;
-    }
+.animated {
+  -webkit-animation: test 1s;
+}
 
-    @-webkit-keyframes test {
-      from {
-        padding: 0;
-      }
-      to {
-        padding: 0;
-      }
-    }
-    </style>
-    <script src=""
-    <script>
-    function repaintTest() {
-      // This should not trigger a repaint.
-      document.body.classList.add('animated');
-    }
-    </script>
-  </head>
-  <body _onload_="runRepaintTest();">
-    <ul>
-      <li>Test</li>
-    </ul>
-  </body>
+@-webkit-keyframes test {
+  from {
+    padding: 0;
+  }
+  to {
+    padding: 0;
+  }
+}
+</style>
+</head>
+<body>
+<ul><li>Test</li></ul>
+</body>
+<script>
+if (window.testRunner)
+  testRunner.dumpAsText();
+
+if (window.internals) {
+  document.body.offsetHeight;
+  let layoutCountBefore = internals.layoutCount;
+  // This should not trigger layout.
+  document.body.classList.add('animated');
+  document.body.offsetHeight;
+  let layoutCountAfter = internals.layoutCount;
+
+  let pre = document.createElement('pre');
+  document.body.appendChild(pre);
+  pre.innerHTML = "Number of layouts triggered: " + (layoutCountAfter - layoutCountBefore);
+}
+</script>
 </html>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to