Bug 1359834 Part 4: Add a reftest to ensure dynamic changes to shape-outside trigger reflow. draft
authorBrad Werth <bwerth@mozilla.com>
Wed, 12 Jul 2017 13:16:25 -0700
changeset 609588 8245eff3e35f04eb5e5aecf5ea3e335320355f6a
parent 609587 2119e8ca75bb7d64c0e4318c6db8a3f9dad4ca54
child 637580 6fdde0fcc2d674909e1e0b6e3159349a632948e2
push id68588
push userbwerth@mozilla.com
push dateMon, 17 Jul 2017 00:28:25 +0000
bugs1359834
milestone56.0a1
Bug 1359834 Part 4: Add a reftest to ensure dynamic changes to shape-outside trigger reflow. MozReview-Commit-ID: BDGRKlss8JE
layout/reftests/css-shapes/dynamic-shape-outside-1-ref.html
layout/reftests/css-shapes/dynamic-shape-outside-1.html
layout/reftests/css-shapes/reftest.list
layout/reftests/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-shapes/dynamic-shape-outside-1-ref.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+<title>Reference: Dynamic change to shape-outside</title>
+<style>
+.circle {
+  float: left;
+  border-radius: 50%;
+  width: 25vmin;
+  height: 25vmin;
+  background: #f06;
+  shape-outside: circle();
+}
+</style>
+</head>
+<body>
+<div class="circle"></div>
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent
+scelerisque pretium interdum. Nam rhoncus auctor consequat. Duis porta
+tortor eu nibh efficitur, eget tempor tortor semper. Integer eu sem
+placerat, sodales tortor at, ornare orci. Fusce id malesuada est. Aenean
+ mattis augue sapien. Fusce efficitur ante sed porttitor blandit. Nam
+facilisis aliquam elit, ut consequat quam interdum sit amet. Integer
+bibendum turpis at mi dapibus dictum. Donec id lorem arcu. Pellentesque
+tortor nunc, semper a dui vel, maximus varius orci. Maecenas posuere
+enim in tempor imperdiet.
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-shapes/dynamic-shape-outside-1.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+<title>Dynamic change to shape-outside</title>
+<style>
+.circle {
+  float: left;
+  border-radius: 50%;
+  width: 25vmin;
+  height: 25vmin;
+  background: #f06;
+}
+</style>
+<script>
+function doTest() {
+  let circle = document.querySelector(".circle");
+  circle.style.shapeOutside = "circle()";
+
+  document.documentElement.removeAttribute('class');
+}
+document.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</head>
+<body>
+<div class="circle"></div>
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent
+scelerisque pretium interdum. Nam rhoncus auctor consequat. Duis porta
+tortor eu nibh efficitur, eget tempor tortor semper. Integer eu sem
+placerat, sodales tortor at, ornare orci. Fusce id malesuada est. Aenean
+ mattis augue sapien. Fusce efficitur ante sed porttitor blandit. Nam
+facilisis aliquam elit, ut consequat quam interdum sit amet. Integer
+bibendum turpis at mi dapibus dictum. Donec id lorem arcu. Pellentesque
+tortor nunc, semper a dui vel, maximus varius orci. Maecenas posuere
+enim in tempor imperdiet.
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-shapes/reftest.list
@@ -0,0 +1,1 @@
+pref(layout.css.shape-outside.enabled,true) == dynamic-shape-outside-1.html dynamic-shape-outside-1-ref.html
--- a/layout/reftests/reftest.list
+++ b/layout/reftests/reftest.list
@@ -101,16 +101,19 @@ include css-parsing/reftest.list
 include css-placeholder/reftest.list
 
 # css ruby
 include css-ruby/reftest.list
 
 # css required
 include css-required/reftest.list
 
+# css shapes
+include css-shapes/reftest.list
+
 # css optional
 include css-optional/reftest.list
 
 # css valid
 include css-valid/reftest.list
 
 # css invalid
 include css-invalid/reftest.list