Bug 797708 - Test that gradients are positioned correctly on SVG text with a filter applied. r=longsonr
☠☠ backed out by d0cba47694a3 ☠ ☠
authorCameron McCormack <cam@mcc.id.au>
Thu, 04 Oct 2012 18:28:32 +1000
changeset 115521 739f8aac68a6ba0a57d9dfc2b45630fd300d9e57
parent 115520 136440ce1cd0d7831f8da46681c537498529d4b4
child 115522 5d2aec62e1550db2f5bdef6f244e44dced480b3d
push id1708
push userakeybl@mozilla.com
push dateMon, 19 Nov 2012 21:10:21 +0000
treeherdermozilla-beta@27b14fe50103 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslongsonr
bugs797708
milestone18.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 797708 - Test that gradients are positioned correctly on SVG text with a filter applied. r=longsonr
layout/reftests/svg/reftest.list
layout/reftests/svg/text-gradient-04-ref.svg
layout/reftests/svg/text-gradient-04.svg
--- a/layout/reftests/svg/reftest.list
+++ b/layout/reftests/svg/reftest.list
@@ -248,16 +248,17 @@ random-if(gtk2Widget) == objectBoundingB
 == suspend-07.svg pass.svg
 == suspend-08.svg pass.svg
 == symbol-01.svg symbol-01-ref.svg
 == text-font-size-01.svg pass.svg
 random-if(gtk2Widget) == text-font-weight-01.svg text-font-weight-01-ref.svg # bug 386713
 == text-gradient-01.svg text-gradient-01-ref.svg
 random-if(winWidget) == text-gradient-02.svg text-gradient-02-ref.svg # see bug 590101
 == text-gradient-03.svg pass.svg
+== text-gradient-04.svg text-gradient-04-ref.svg
 == text-in-link-01.svg text-in-link-01-ref.svg
 == text-in-link-02.svg text-in-link-02-ref.svg
 == text-in-link-03.svg text-in-link-03-ref.svg
 # Tests for bug 546813: sanity-check using HTML text, then test SVG behavior.
 fails-if(Android) != text-language-00.xhtml text-language-00-ref.xhtml
 fails-if(Android) random-if(gtk2Widget) != text-language-01.xhtml text-language-01-ref.xhtml # Fails on Linux tryserver due to lack of CJK fonts.
 fuzzy-if(OSX==10.8,46,26) == text-layout-01.svg text-layout-01-ref.svg
 == text-layout-02.svg text-layout-02-ref.svg
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/text-gradient-04-ref.svg
@@ -0,0 +1,21 @@
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg">
+
+  <title>Reference for gradients being positioned correctly within filters</title>
+  <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=797708 -->
+
+  <linearGradient id="g" gradientUnits="userSpaceOnUse" x1="100" y1="0" x2="200" y2="0">
+    <stop offset="0" stop-color="red"/>
+    <stop offset="0.5" stop-color="red"/>
+    <stop offset="0.5" stop-color="blue"/>
+    <stop offset="1" stop-color="blue"/>
+  </linearGradient>
+
+  <g style="font: bold 32px sans-serif; fill: url(#g); text-anchor: middle">
+    <text x="125" y="100">hi</text>
+    <text x="175" y="100">hi</text>
+  </g>
+</svg>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/text-gradient-04.svg
@@ -0,0 +1,27 @@
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg">
+
+  <title>Test for gradients being positioned correctly within filters</title>
+  <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=797708 -->
+
+  <linearGradient id="g" gradientUnits="userSpaceOnUse" x1="100" y1="0" x2="200" y2="0">
+    <stop offset="0" stop-color="red"/>
+    <stop offset="0.5" stop-color="red"/>
+    <stop offset="0.5" stop-color="blue"/>
+    <stop offset="1" stop-color="blue"/>
+  </linearGradient>
+
+  <filter id="f">
+    <feMerge>
+      <feMergeNode in="SourceGraphic"/>
+    </feMerge>
+  </filter>
+
+  <g style="font: bold 32px sans-serif; fill: url(#g); text-anchor: middle; filter: url(#f)">
+    <text x="125" y="100">hi</text>
+    <text x="175" y="100">hi</text>
+  </g>
+</svg>