Bug 1561352: Rewrite WPT test viewBox-scaling-text-001.html to not depend on Ahem font having X-with-diacritics character. r=longsonr
authorDaniel Holbert <dholbert@cs.stanford.edu>
Tue, 25 Jun 2019 18:02:21 +0000
changeset 480064 66cb2acf5a9e406f9c32b20cb522fb3b12b1c5e5
parent 480063 ae83f2b3979f536a0e24ca8730753eb6ef2974d4
child 480065 691b6b08b5ac1775512886fa8335f67e024d4cf3
push id36200
push useraiakab@mozilla.com
push dateTue, 25 Jun 2019 21:58:14 +0000
treeherdermozilla-central@b23bd78e4d94 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslongsonr
bugs1561352
milestone69.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 1561352: Rewrite WPT test viewBox-scaling-text-001.html to not depend on Ahem font having X-with-diacritics character. r=longsonr Differential Revision: https://phabricator.services.mozilla.com/D35833
testing/web-platform/tests/svg/coordinate-systems/support/viewBox-scaling-text-001-ref.html
testing/web-platform/tests/svg/coordinate-systems/viewBox-scaling-text-001.html
--- a/testing/web-platform/tests/svg/coordinate-systems/support/viewBox-scaling-text-001-ref.html
+++ b/testing/web-platform/tests/svg/coordinate-systems/support/viewBox-scaling-text-001-ref.html
@@ -1,22 +1,22 @@
 <!DOCTYPE html>
 <head>
   <meta charset="utf-8">
   <title>Reference case for text scaled via SVG viewBox</title>
   <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
   <style>
-    body { margin: 0; }
     svg {
       width: 100px;
       height: 100px;
-      background: red;
+      background: lightgray;
+      overflow: visible;
     }
-    rect {
-      fill: lime;
+    text {
+      font: 100px/1 monospace;
     }
   </style>
 </head>
 <body>
   <svg>
-    <rect height="100%" width="100%"></rect>
+    <text x="0" y="100">X̂̂̂̂̂̂</text>
   </svg>
 </body>
--- a/testing/web-platform/tests/svg/coordinate-systems/viewBox-scaling-text-001.html
+++ b/testing/web-platform/tests/svg/coordinate-systems/viewBox-scaling-text-001.html
@@ -1,30 +1,25 @@
 <!DOCTYPE html>
 <head>
   <meta charset="utf-8">
+  <meta name="assert" href="1px-tall-text should be visible when scaled up via the SVG viewBox attribute">
   <title>Testcase for text scaled via SVG viewBox</title>
   <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
   <link rel="help" href="https://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute">
   <link rel="match" href="support/viewBox-scaling-text-001-ref.html">
   <style>
-    body { margin: 0; }
     svg {
       width: 100px;
       height: 100px;
-      background: red;
+      background: lightgray;
+      overflow: visible;
     }
     text {
-      fill: lime;
-      font: 1px/1 Ahem;
+      font: 1px/1 monospace;
     }
   </style>
 </head>
 <body>
-  <!-- We position the <text> at y=0.8px, which is the alphabetic baseline for
-       the Ahem font. This puts the bottom of the rendered square glyph at
-       y=1px, i.e. the bottom of the SVG viewport. With that, the 1px-tall Ahem
-       square 'X' character should fully fill the SVG viewport (which is then
-       scaled up from 1x1 to 100x100). -->
   <svg viewBox="0 0 1 1">
-    <text x="0" y="0.8">X̂̂̂̂̂̂</text>
+    <text x="0" y="1">X̂̂̂̂̂̂</text>
   </svg>
 </body>