Bug 1496274 [wpt PR 13345] - [LayoutNG] Correct clip-path reference box calculation., a=testonly
authorMorten Stenshorne <mstensho@chromium.org>
Tue, 09 Oct 2018 04:14:13 +0000
changeset 495959 13844f50ee32e17f513b7c1013c2348200e21b8c
parent 495958 7b67ae2b52aedb838bb7be437812bb96d1bb1809
child 495960 34559e14034d813d25d57f0ab509cd00f3d3f822
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1496274, 13345, 641907, 1257913, 596554
milestone64.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 1496274 [wpt PR 13345] - [LayoutNG] Correct clip-path reference box calculation., a=testonly Automatic update from web-platform-tests[LayoutNG] Correct clip-path reference box calculation. We used coordinates relatively to the line box, while we were expected by the caller to be relative to the containing block. Flipping for writing mode was bogus for NG (but needed by legacy), since NG uses truly physical coordinates. Hardened tests to contain a leading line and padding, and leading content on the first line of the clipped child. Bug: 641907 Change-Id: I2b1b9ff4ea92a6405fcdffcf139842458b46442f Cq-Include-Trybots: luci.chromium.try​:linux_layout_tests_layout_ng Reviewed-on: https://chromium-review.googlesource.com/c/1257913 Reviewed-by: Koji Ishii <kojii@chromium.org> Reviewed-by: Fredrik Söderquist <fs@opera.com> Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/master@{#596554} -- wpt-commits: e9a0828c85819340f721f121aac19ab8eefa3439 wpt-pr: 13345
testing/web-platform/tests/css/css-masking/clip-path/clip-path-inline-001.html
testing/web-platform/tests/css/css-masking/clip-path/clip-path-inline-002.html
testing/web-platform/tests/css/css-masking/clip-path/clip-path-inline-003.html
--- a/testing/web-platform/tests/css/css-masking/clip-path/clip-path-inline-001.html
+++ b/testing/web-platform/tests/css/css-masking/clip-path/clip-path-inline-001.html
@@ -1,27 +1,31 @@
 <!DOCTYPE html>
 <title>clip-path on inline, horizontal-tb writing-mode</title>
 <link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
 <link rel="help" href="https://www.w3.org/TR/css-masking-1/#the-clip-path" title="5.1 Clipping Shape: the clip-path property">
 <link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
 <meta content="ahem" name="flags">
 <style>
+  body {
+    overflow: hidden;
+  }
   .container {
     writing-mode: horizontal-tb;
+    padding: 70px 30px;
+    margin: -170px -230px;
     font: 100px/1 Ahem;
     line-height: 100px;
-    color: red;
-  }
-  .container::first-letter {
-    color:green;
+    color: transparent;
   }
   .container > span {
     clip-path: polygon(0% 0%, 50% 0%, 50% 100%, 0% 100%);
+    color: red;
+  }
+  .container > span > span {
+    color: green;
   }
 </style>
 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
 <div class="container">
-  <span>
-    XX<br>
-    XXX
-  </span>
+  <br>
+  XX<span><span>X</span>X<br>XXXXX</span>
 </div>
--- a/testing/web-platform/tests/css/css-masking/clip-path/clip-path-inline-002.html
+++ b/testing/web-platform/tests/css/css-masking/clip-path/clip-path-inline-002.html
@@ -1,28 +1,31 @@
 <!DOCTYPE html>
 <title>clip-path on inline, vertical-rl writing-mode</title>
 <link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
 <link rel="help" href="https://www.w3.org/TR/css-masking-1/#the-clip-path" title="5.1 Clipping Shape: the clip-path property">
 <link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
 <meta content="ahem" name="flags">
 <style>
+  body {
+    overflow: hidden;
+  }
   .container {
     writing-mode: vertical-rl;
-    margin-left: -100px;
+    padding: 70px 30px;
+    margin: -270px -130px;
     font: 100px/1 Ahem;
     line-height: 100px;
-    color: red;
-  }
-  .container::first-letter {
-    color:green;
+    color: transparent;
   }
   .container > span {
     clip-path: polygon(0% 0%, 100% 0%, 100% 50%, 0% 50%);
+    color: red;
+  }
+  .container > span > span {
+    color: green;
   }
 </style>
 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
 <div class="container">
-  <span>
-    XX<br>
-    XXX
-  </span>
+  <br>
+  XX<span><span>X</span>X<br>XXXXX</span>
 </div>
--- a/testing/web-platform/tests/css/css-masking/clip-path/clip-path-inline-003.html
+++ b/testing/web-platform/tests/css/css-masking/clip-path/clip-path-inline-003.html
@@ -1,27 +1,31 @@
 <!DOCTYPE html>
 <title>clip-path on inline, vertical-lr writing-mode</title>
 <link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
 <link rel="help" href="https://www.w3.org/TR/css-masking-1/#the-clip-path" title="5.1 Clipping Shape: the clip-path property">
 <link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
 <meta content="ahem" name="flags">
 <style>
+  body {
+    overflow: hidden;
+  }
   .container {
     writing-mode: vertical-lr;
+    padding: 70px 30px;
+    margin: -270px -130px;
     font: 100px/1 Ahem;
     line-height: 100px;
-    color: red;
-  }
-  .container::first-letter {
-    color:green;
+    color: transparent;
   }
   .container > span {
     clip-path: polygon(0% 0%, 100% 0%, 100% 50%, 0% 50%);
+    color: red;
+  }
+  .container > span > span {
+    color: green;
   }
 </style>
 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
 <div class="container">
-  <span>
-    XX<br>
-    XXX
-  </span>
+  <br>
+  XX<span><span>X</span>X<br>XXXXX</span>
 </div>