Bug 1385745 Part 2 - Add test cases for box-decoration-break. r?cjku draft
authorLouis Chang <lochang@mozilla.com>
Thu, 17 Aug 2017 11:17:23 +0800
changeset 647919 d2a83bcf4bc4f1051ada04e3034e8b5f1b131bab
parent 647918 80cbaef755f73af6e670ffffb627730f31b94438
child 726670 a9ad2360254a63a19a2543314053a5e4997125ed
push id74584
push userlochang@mozilla.com
push dateThu, 17 Aug 2017 03:18:21 +0000
reviewerscjku
bugs1385745
milestone57.0a1
Bug 1385745 Part 2 - Add test cases for box-decoration-break. r?cjku MozReview-Commit-ID: H0uLtr1O1Im
layout/reftests/svg/box-decoration-break-clone-ref.html
layout/reftests/svg/box-decoration-break-clone.html
layout/reftests/svg/box-decoration-break-slice-ref.html
layout/reftests/svg/box-decoration-break-slice.html
layout/reftests/svg/reftest.list
layout/reftests/svg/svg-integration/box-decoration-break-01-ref.xhtml
layout/reftests/svg/svg-integration/box-decoration-break-01.xhtml
layout/reftests/svg/svg-integration/box-decoration-break-02-ref.xhtml
layout/reftests/svg/svg-integration/box-decoration-break-02.xhtml
layout/reftests/svg/svg-integration/box-decoration-break-03.xhtml
layout/reftests/svg/svg-integration/reftest.list
deleted file mode 100644
--- a/layout/reftests/svg/box-decoration-break-slice-ref.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<head>
-  <meta charset="utf-8">
-  <style>
-    span {
-      padding: 0em 1em;
-      margin-left: 10px;
-      font: 24px sans-serif;
-      line-height: 2;
-    }
-  </style>
-</head>
-<body>
-  <span>The</span>
-</body>
deleted file mode 100644
--- a/layout/reftests/svg/box-decoration-break-slice.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!--
-     Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/
--->
-
-<html>
-<head>
-  <meta charset="utf-8">
-  <title>Test of box-decoration-break:slice with clip-path</title>
-  <style>
-    span {
-      padding: 0em 1em;
-      margin-left: 10px;
-      font: 24px sans-serif;
-      line-height: 2;
-      clip-path: url(#path);
-    }
-  </style>
-</head>
-<body>
-  <span>The<br>quick<br>orange fox</span>
-
-  <svg height="0">
-    <defs>
-      <clipPath id="path" clipPathUnits="objectBoundingBox">
-        <rect x="0" y="0" width="1" height="0.3"/>
-      </clipPath>
-    </defs>
-  </svg>
-</body>
-</html>
--- a/layout/reftests/svg/reftest.list
+++ b/layout/reftests/svg/reftest.list
@@ -51,19 +51,16 @@ pref(layout.css.mix-blend-mode.enabled,t
 #skip-if(Android) pref(layout.css.mix-blend-mode.enabled,true) == blend-overlay.svg blend-overlay-ref.svg
 #skip-if(Android)  pref(layout.css.mix-blend-mode.enabled,true) == blend-saturation.svg blend-saturation-ref.svg
 #skip-if(Android) pref(layout.css.mix-blend-mode.enabled,true) == blend-screen.svg blend-screen-ref.svg
 #skip-if(Android) pref(layout.css.mix-blend-mode.enabled,true) == blend-soft-light.svg blend-soft-light-ref.svg
 skip-if(Android) pref(layout.css.mix-blend-mode.enabled,true) == blend-difference-stacking.html blend-difference-stacking-ref.html
 
 == border-radius-01.html pass.svg
 
-== box-decoration-break-clone.html box-decoration-break-clone-ref.html
-== box-decoration-break-slice.html box-decoration-break-slice-ref.html
-
 == clip-01.svg pass.svg
 == clip-02a.svg clip-02-ref.svg
 == clip-02b.svg clip-02-ref.svg
 == clip-surface-clone-01.svg clip-surface-clone-01-ref.svg
 == clip-use-element-01.svg pass.svg
 == clip-use-element-02.svg pass.svg
 
 == clipPath-advanced-01.svg pass.svg
rename from layout/reftests/svg/box-decoration-break-clone-ref.html
rename to layout/reftests/svg/svg-integration/box-decoration-break-01-ref.xhtml
--- a/layout/reftests/svg/box-decoration-break-clone-ref.html
+++ b/layout/reftests/svg/svg-integration/box-decoration-break-01-ref.xhtml
@@ -1,27 +1,37 @@
-<html>
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-  <meta charset="utf-8">
+  <meta charset="utf-8" />
   <style>
+    .clip {
+      clip-path:url(#path);
+    }
     span {
-      padding: 0em 1em;
-      margin-left: 10px;
       font: 24px sans-serif;
       line-height: 2;
-      clip-path: url(#path);
+      color: lime;
+      background: lime;
+    }
+    br {
+      line-height: 0;
     }
   </style>
 </head>
 <body>
-  <span>The</span><br>
-  <span>quick</span><br>
-  <span>orange fox</span>
+  <h2>Box-Decoration-Break: Clone</h2>
+  <span class="clip">The</span><br />
+  <span class="clip">quick</span><br />
+  <span class="clip">orange fox</span>
 
-  <svg height="0">
+  <h2>Box-Decoration-Break: Slice</h2>
+  <span>The</span>
+
+  <svg xmlns="http://www.w3.org/2000/svg" height="0">
     <defs>
       <clipPath id="path" clipPathUnits="objectBoundingBox">
-        <rect x="0" y="0" width="1" height="0.5"/>
+        <rect x="0" y="0" width="1" height="0.3"/>
       </clipPath>
     </defs>
   </svg>
+
 </body>
 </html>
rename from layout/reftests/svg/box-decoration-break-clone.html
rename to layout/reftests/svg/svg-integration/box-decoration-break-01.xhtml
--- a/layout/reftests/svg/box-decoration-break-clone.html
+++ b/layout/reftests/svg/svg-integration/box-decoration-break-01.xhtml
@@ -1,34 +1,41 @@
 <!--
      Any copyright is dedicated to the Public Domain.
      http://creativecommons.org/publicdomain/zero/1.0/
 -->
 
-<html>
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-  <meta charset="utf-8">
-  <title>Test of box-decoration-break:clone with clip-path</title>
+  <meta charset="utf-8" />
+  <title>Test of box-decoration-break with clip-path: url</title>
   <style>
     .clone {
       box-decoration-break: clone;
     }
     span {
-      padding: 0em 1em;
-      margin-left: 10px;
       font: 24px sans-serif;
       line-height: 2;
+      color: lime;
+      background: lime;
       clip-path: url(#path);
     }
+    br {
+      line-height: 0;
+    }
   </style>
 </head>
 <body>
-  <span class="clone">The<br>quick<br>orange fox</span>
+  <h2>Box-Decoration-Break: Clone</h2>
+  <span class="clone">The<br />quick<br />orange fox</span>
 
-  <svg height="0">
+  <h2>Box-Decoration-Break: Slice</h2>
+  <span>The<br />quick<br />orange fox</span>
+
+  <svg xmlns="http://www.w3.org/2000/svg" height="0">
     <defs>
       <clipPath id="path" clipPathUnits="objectBoundingBox">
-        <rect x="0" y="0" width="1" height="0.5"/>
+        <rect x="0" y="0" width="1" height="0.3"/>
       </clipPath>
     </defs>
   </svg>
 </body>
 </html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/svg-integration/box-decoration-break-02-ref.xhtml
@@ -0,0 +1,27 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <meta charset="utf-8" />
+  <style>
+    span {
+      font: 24px sans-serif;
+      line-height: 2;
+      color: lime;
+      background: lime;
+    }
+    br {
+      line-height: 0;
+    }
+  </style>
+</head>
+<body>
+  <h2>Box-Decoration-Break: Clone</h2>
+  <span>The</span><br />
+  <span>quick</span><br />
+  <span>orange fox</span>
+
+  <h2>Box-Decoration-Break: Slice</h2>
+  <span>The</span><br />
+  <span>quick</span><br />
+  <span>orange fox</span>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/svg-integration/box-decoration-break-02.xhtml
@@ -0,0 +1,33 @@
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <meta charset="utf-8" />
+  <title>Test of box-decoration-break with filter</title>
+  <style>
+    .clone {
+      box-decoration-break: clone;
+    }
+    span {
+      font: 24px sans-serif;
+      line-height: 2;
+      color: lime;
+      background: lime;
+      filter: blur(0px);
+    }
+    br {
+      line-height: 0;
+    }
+  </style>
+</head>
+<body>
+  <h2>Box-Decoration-Break: Clone</h2>
+  <span class="clone">The<br />quick<br />orange fox</span>
+
+  <h2>Box-Decoration-Break: Slice</h2>
+  <span>The<br />quick<br />orange fox</span>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/svg-integration/box-decoration-break-03.xhtml
@@ -0,0 +1,42 @@
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <meta charset="utf-8" />
+  <title>Test of box-decoration-break with clip-path: url and filter</title>
+  <style>
+    .clone {
+      box-decoration-break: clone;
+    }
+    span {
+      font: 24px sans-serif;
+      line-height: 2;
+      color: lime;
+      background: lime;
+      clip-path: url(#path);
+      filter: blur(0px);
+    }
+    br {
+      line-height: 0;
+    }
+  </style>
+</head>
+<body>
+  <h2>Box-Decoration-Break: Clone</h2>
+  <span class="clone">The<br />quick<br />orange fox</span>
+
+  <h2>Box-Decoration-Break: Slice</h2>
+  <span>The<br />quick<br />orange fox</span>
+
+  <svg xmlns="http://www.w3.org/2000/svg" height="0">
+    <defs>
+      <clipPath id="path" clipPathUnits="objectBoundingBox">
+        <rect x="0" y="0" width="1" height="0.3"/>
+      </clipPath>
+    </defs>
+  </svg>
+</body>
+</html>
--- a/layout/reftests/svg/svg-integration/reftest.list
+++ b/layout/reftests/svg/svg-integration/reftest.list
@@ -39,8 +39,13 @@ fuzzy-if(skiaContent,1,5) == patterned-s
 
 fuzzy(1,5000) == mask-clipPath-opacity-01a.xhtml mask-clipPath-opacity-01-ref.xhtml
 fuzzy(1,5000) == mask-clipPath-opacity-01b.xhtml mask-clipPath-opacity-01-ref.xhtml
 fuzzy(1,5000) == mask-clipPath-opacity-01c.xhtml mask-clipPath-opacity-01-ref.xhtml
 fuzzy(1,5000) == mask-clipPath-opacity-01d.xhtml mask-clipPath-opacity-01-ref.xhtml
 fuzzy(1,5000) == mask-clipPath-opacity-01e.xhtml mask-clipPath-opacity-01-ref.xhtml
 
 == transform-outer-svg-01.xhtml transform-outer-svg-01-ref.xhtml
+
+# box-decoration-break tests
+fuzzy-if(Android,4,10) == box-decoration-break-01.xhtml box-decoration-break-01-ref.xhtml
+fuzzy(56,14) == box-decoration-break-02.xhtml box-decoration-break-02-ref.xhtml
+fuzzy(67,234) == box-decoration-break-03.xhtml box-decoration-break-01-ref.xhtml