Bug 1383650 - Add reftest for rect, circle, ellipse and foreignObject r=longsonr
authorviolet <violet.bugreport@gmail.com>
Thu, 16 May 2019 13:21:22 +0000
changeset 474721 f9ec440d652a96149cd68945bfb638e8e4944394
parent 474720 b05458d3fe67c7e8e368c4d415a6774be4c33dcc
child 474722 21b3ac9c491755466306d68e1e198a6891c0e561
push id113168
push userrmaries@mozilla.com
push dateTue, 21 May 2019 16:39:23 +0000
treeherdermozilla-inbound@3c0f78074b72 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslongsonr
bugs1383650
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 1383650 - Add reftest for rect, circle, ellipse and foreignObject r=longsonr Differential Revision: https://phabricator.services.mozilla.com/D30807
layout/reftests/svg/geometry-properties-in-css-ref.html
layout/reftests/svg/geometry-properties-in-css.html
layout/reftests/svg/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/geometry-properties-in-css-ref.html
@@ -0,0 +1,20 @@
+<!doctype html>
+<svg width="800" height="600">
+  <g>
+    <rect x="40" y="40" width="100" height="100" rx="30" ry="30" fill="purple" />
+    <rect x="40" y="150" width="30" height="200" rx="20" ry="20" fill="magenta" />
+  </g>
+  <circle cx="170" cy="340" r="70px" fill="pink" />
+  <g>
+    <circle cx="230" cy="130" r="70px" fill="skyblue" />
+  </g>
+  <svg x="300" width="200" height="200" viewBox="0 0 100 100">
+    <ellipse cx="30" cy="100" rx="20" ry="40" fill="cyan" />
+    <ellipse cx="80" cy="50" rx="20" ry="40" fill="navy" />
+  </svg>
+  <foreignObject x="450" y="200" width="80" height="130">
+    <svg>
+      <rect width="50" height="50" rx="4" ry="4" fill="brown" />
+    </svg>
+  </foreignObject>
+</svg>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/geometry-properties-in-css.html
@@ -0,0 +1,75 @@
+<!doctype html>
+<style>
+  svg {
+    width: 800px;
+    height: 600px;
+    font-size: 10px;
+  }
+  svg svg {
+    width: 80px;
+    height: 80px;
+  }
+  rect:first-child {
+    x: 40px;
+    y: calc(5% + 10px);
+    width: calc(80px + 2em);
+    height: 10em;
+    rx: auto;
+    ry: 5%;
+    cx: 100px;
+    cy: 200px;
+  }
+  circle {
+    r: calc(70px);
+  }
+  g > #c2 {
+    cx: 80px;
+    cy: calc(20% + 10px);
+    x: 40px;
+    y: calc(5% + 10px);
+  }
+  svg > svg > ellipse {
+    cx: 30%;
+    cy: 100px;
+    rx: 20px;
+    ry: 40px;
+  }
+  svg > svg > ellipse:nth-child(2) {
+    transform: translate(50px, -50px);
+  }
+  svg ellipse {
+    cx: 10px;
+    cy: 10px;
+    rx: 10px;
+    ry: 10px;
+  }
+  foreignObject {
+    transform: translate(450px,0);
+    y: 200px;
+    width: 80px;
+    height: 130px;
+  }
+  #r2 {
+    width: 50px;
+    height:50px;
+  }
+</style>
+<svg>
+  <g>
+    <rect x="0" y="-10" width="30px" height="10px" rx="-5px" ry="auto" fill="purple" />
+    <rect x=" 40px /* some nonsense */ " y="150" width="30" height="20em" rx="20px" ry="20px" fill="magenta" />
+  </g>
+  <circle cx="/* more nonsense */ 170" cy="340" r="-5px" fill="pink" />
+  <g transform="translate(150,0)">
+    <circle id="c2" cx="20" cy="40" fill="skyblue" />
+  </g>
+  <svg x="300" width="200px" height="200px" viewBox="0 0 100 100">
+    <ellipse fill="cyan" />
+    <ellipse fill="navy" />
+  </svg>
+  <foreignObject>
+    <svg>
+      <rect id="r2" style="x:0;y:0" fill="brown" />
+    </svg>
+  </foreignObject>
+</svg>
--- a/layout/reftests/svg/reftest.list
+++ b/layout/reftests/svg/reftest.list
@@ -239,16 +239,17 @@ fuzzy-if(Android,0-18,0-600) == foreignO
 == foreignObject-dynamic-line-height-01.html foreignObject-dynamic-line-height-01-ref.html
 == foreignObject-vertical-01.svg foreignObject-vertical-01-ref.svg
 
 == fragmentIdentifier-01.xhtml pass.svg
 
 == g-transform-01.svg pass.svg
 
 == getElementById-a-element-01.svg pass.svg
+== geometry-properties-in-css.html geometry-properties-in-css-ref.html
 
 fuzzy-if(Android,0-9,0-980) fuzzy-if(skiaContent,0-3,0-32000) == gradient-live-01a.svg gradient-live-01-ref.svg
 fuzzy-if(Android,0-9,0-980) fuzzy-if(skiaContent,0-3,0-32000) == gradient-live-01b.svg gradient-live-01-ref.svg
 fuzzy-if(Android,0-9,0-980) fuzzy-if(skiaContent,0-3,0-32000) == gradient-live-01c.svg gradient-live-01-ref.svg
 fuzzy-if(Android,0-9,0-980) fuzzy-if(skiaContent,0-3,0-32000) == gradient-live-01d.svg gradient-live-01-ref.svg
 == gradient-transform-01.svg pass.svg
 == href-attr-change-restyles.svg href-attr-change-restyles-ref.svg
 fuzzy-if(skiaContent,0-1,0-550) == import-svg-01.html pass.svg