Bug 1359834 Part 2: 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 608573 53f4b6d76470837a8c0bf3239d046623e8a04be1
parent 608529 396fba8d189fded7e033013b189f79b79cd4b96b
child 637357 8108d270ab097a4f97061b9bed347ba05edcb20a
push id68334
push userbwerth@mozilla.com
push dateThu, 13 Jul 2017 21:47:45 +0000
bugs1359834
milestone56.0a1
Bug 1359834 Part 2: 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>
+</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.
+<script>
+function doTest() {
+  let circle = document.querySelector(".circle");
+  circle.style.shapeOutside = "circle()";
+
+  document.documentElement.removeAttribute('class');
+}
+document.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</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