Bug 333698 - Fix x and y positioning of nested tspans - reftests; r=longsonr; a=roc

This commit is contained in:
KUROSAWA, Takeshi 2010-09-18 12:46:48 +09:00
parent 6692b57dcc
commit 32e3f2694c
30 changed files with 382 additions and 0 deletions

View File

@ -165,6 +165,28 @@ random-if(gtk2Widget) != text-language-01.xhtml text-language-01-ref.xhtml # Fai
== text-style-01d.svg text-style-01-ref.svg
== text-style-01e.svg text-style-01-ref.svg
== thin-stroke-01.svg pass.svg
== tspan-dxdy-01.svg tspan-dxdy-ref.svg
== tspan-dxdy-02.svg tspan-dxdy-ref.svg
== tspan-dxdy-03.svg tspan-dxdy-ref.svg
== tspan-dxdy-04.svg tspan-dxdy-ref.svg
== tspan-dxdy-05.svg tspan-dxdy-ref.svg
== tspan-dxdy-06.svg tspan-dxdy-ref.svg
== tspan-dxdy-textPath-01.svg tspan-dxdy-textPath-01-ref.svg
== tspan-rotate-01.svg tspan-rotate-ref.svg
== tspan-rotate-02.svg tspan-rotate-ref.svg
== tspan-rotate-03.svg tspan-rotate-ref.svg
== tspan-rotate-04.svg tspan-rotate-ref.svg
== tspan-rotate-05.svg tspan-rotate-ref.svg
== tspan-rotate-06.svg tspan-rotate-ref.svg
== tspan-rotate-textPath-01.svg tspan-rotate-textPath-01-ref.svg
== tspan-xy-01.svg tspan-xy-ref.svg
== tspan-xy-02.svg tspan-xy-ref.svg
== tspan-xy-03.svg tspan-xy-ref.svg
== tspan-xy-04.svg tspan-xy-ref.svg
== tspan-xy-05.svg tspan-xy-ref.svg
== tspan-xy-06.svg tspan-xy-ref.svg
== tspan-xy-anchor-middle-01.svg tspan-xy-anchor-middle-ref.svg
== tspan-xy-anchor-end-01.svg tspan-xy-anchor-end-ref.svg
== userSpaceOnUse-and-pattern-01.svg userSpaceOnUse-and-pattern-01-ref.svg
== viewBox-and-pattern-01.svg pass.svg
== viewBox-invalid-01.svg pass.svg

View File

@ -0,0 +1,10 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Testcase for tspan with ancestor dx/dy attributes</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=333698 -->
<text dx="50 40 40 0" dy="20 20 40 -20"><tspan>abcdef</tspan></text>
</svg>

After

Width:  |  Height:  |  Size: 434 B

View File

@ -0,0 +1,10 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Testcase for tspan with ancestor dx/dy attributes</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=333698 -->
<text dx="0 40 40 0" dy="20 20 40 -20"><tspan dx="50">abcdef</tspan></text>
</svg>

After

Width:  |  Height:  |  Size: 441 B

View File

@ -0,0 +1,10 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Testcase for tspan with ancestor dx/dy attributes</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=333698 -->
<text dx="50 40 40 0" dy="20 20 40 -20"><tspan>a</tspan>bcdef</text>
</svg>

After

Width:  |  Height:  |  Size: 435 B

View File

@ -0,0 +1,10 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Testcase for tspan with ancestor dx/dy attributes</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=333698 -->
<text dx="50 0 40 0" dy="20 0 0 -20">a<tspan dx="40" dy="20 40 40">bc</tspan>def</text>
</svg>

After

Width:  |  Height:  |  Size: 453 B

View File

@ -0,0 +1,10 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Testcase for tspan with ancestor x/y attributes</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=333698 -->
<text dx="50 40 40 0" dy="20 20 40 -20"><tspan><tspan>a</tspan>b<tspan>cde</tspan>f</tspan></text>
</svg>

After

Width:  |  Height:  |  Size: 462 B

View File

@ -0,0 +1,10 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Testcase for tspan with ancestor x/y attributes</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=333698 -->
<text dx="50 40 40 0" dy="20 20 40 -20">abc<tspan>def</tspan></text>
</svg>

After

Width:  |  Height:  |  Size: 432 B

View File

@ -0,0 +1,10 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Reference for tspan with ancestor dx/dy attributes</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=333698 -->
<text dx="50 40 40 0" dy="20 20 40 -20">abcdef</text>
</svg>

After

Width:  |  Height:  |  Size: 420 B

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Reference for tspan with ancestor dx/dy attributes and textPath</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=333698 -->
<defs>
<path id="path" d="M 50 20 l 100 10 l 100 -10" fill="none" stroke="black"/>
</defs>
<g>
<use xlink:href="#path"/>
<text><textPath xlink:href="#path"><tspan dx="10 20 10" dy="-10 10 15 -15">abcdef</tspan></textPath></text>
</g>
<g transform="translate(0, 50)">
<use xlink:href="#path"/>
<text><textPath xlink:href="#path" startOffset="33%"><tspan dx="10 20 10" dy="-10 10 15 -15">abcdef</tspan></textPath></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 833 B

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Testcase for tspan with ancestor dx/dy attributes and textPath</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=333698 -->
<defs>
<path id="path" d="M 50 20 l 100 10 l 100 -10" fill="none" stroke="black"/>
</defs>
<g>
<use xlink:href="#path"/>
<text dx="10 20 10" dy="-10 10 15 -15"><textPath xlink:href="#path"><tspan><tspan>a</tspan>b<tspan>cde</tspan>f</tspan></textPath></text>
</g>
<g transform="translate(0, 50)">
<use xlink:href="#path"/>
<text dx="10 20 10" dy="-10 10 15 -15"><textPath xlink:href="#path" startOffset="33%"><tspan><tspan>a</tspan>b<tspan>cde</tspan>f</tspan></textPath></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 892 B

View File

@ -0,0 +1,11 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Testcase for tspan with ancestor rotate attribute</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=333698 -->
<text x="50 100 150" y="20 40 80 60" rotate="90 45 -45 180"><tspan>abcdef</tspan></text>
<use xlink:href="tspan-xy-ref.svg#grid"/>
</svg>

After

Width:  |  Height:  |  Size: 498 B

View File

@ -0,0 +1,11 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Testcase for tspan with ancestor rotate attribute</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=333698 -->
<text x="50 100 150" y="20 40 80 60" rotate="0 45 -45 180"><tspan rotate="90">abcdef</tspan></text>
<use xlink:href="tspan-xy-ref.svg#grid"/>
</svg>

After

Width:  |  Height:  |  Size: 509 B

View File

@ -0,0 +1,11 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Testcase for tspan with ancestor rotate attribute</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=333698 -->
<text x="50 100 150" y="20 40 80 60" rotate="90 45 -45 180"><tspan>a</tspan>bcdef</text>
<use xlink:href="tspan-xy-ref.svg#grid"/>
</svg>

After

Width:  |  Height:  |  Size: 498 B

View File

@ -0,0 +1,11 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Testcase for tspan with ancestor rotate attribute</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=333698 -->
<text x="50 100 150" y="20 40 80 60" rotate="90 0 -45 180">a<tspan rotate="45">bc</tspan>def</text>
<use xlink:href="tspan-xy-ref.svg#grid"/>
</svg>

After

Width:  |  Height:  |  Size: 509 B

View File

@ -0,0 +1,11 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Testcase for tspan with ancestor rotate attribute</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=333698 -->
<text x="50 100 150" y="20 40 80 60" rotate="90 45 -45 180"><tspan><tspan>a</tspan>b<tspan>cde</tspan>f</tspan></text>
<use xlink:href="tspan-xy-ref.svg#grid"/>
</svg>

After

Width:  |  Height:  |  Size: 528 B

View File

@ -0,0 +1,11 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Testcase for tspan with ancestor rotate attribute</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=333698 -->
<text x="50 100 150" y="20 40 80 60" rotate="90 45 -45 180">abc<tspan>def</tspan></text>
<use xlink:href="tspan-xy-ref.svg#grid"/>
</svg>

After

Width:  |  Height:  |  Size: 498 B

View File

@ -0,0 +1,11 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Reference for tspan with ancestor rotate attribute</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=333698 -->
<text rotate="90 45 -45 180" x="50 100 150" y="20 40 80 60">abcdef</text>
<use xlink:href="tspan-xy-ref.svg#grid"/>
</svg>

After

Width:  |  Height:  |  Size: 484 B

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Testcase for tspan with ancestor rotate attribute and textPath</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=333698 -->
<defs>
<path id="path" d="M 50 20 l 50 10 l 50 -10" fill="none" stroke="black"/>
</defs>
<g>
<use xlink:href="#path"/>
<text><textPath xlink:href="#path"><tspan rotate="90 45 -45 180 180 180">abcdef</tspan></textPath></text>
</g>
<g transform="translate(0, 50)">
<use xlink:href="#path"/>
<text><textPath xlink:href="#path" startOffset="33%"><tspan rotate="90 45 -45 180 180 180">abcdef</tspan></textPath></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 826 B

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Testcase for tspan with ancestor rotate attribute and textPath</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=333698 -->
<defs>
<path id="path" d="M 50 20 l 50 10 l 50 -10" fill="none" stroke="black"/>
</defs>
<g>
<use xlink:href="#path"/>
<text rotate="90 45 -45 180"><textPath xlink:href="#path"><tspan><tspan>a</tspan>b<tspan>cde</tspan>f</tspan></textPath></text>
</g>
<g transform="translate(0, 50)">
<use xlink:href="#path"/>
<text rotate="90 45 -45 180"><textPath xlink:href="#path" startOffset="33%"><tspan><tspan>a</tspan>b<tspan>cde</tspan>f</tspan></textPath></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 870 B

View File

@ -0,0 +1,11 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Testcase for tspan with ancestor x/y attributes</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=333698 -->
<text x="50 100 150" y="20 40 80 60"><tspan>abcdef</tspan></text>
<use xlink:href="tspan-xy-ref.svg#grid"/>
</svg>

After

Width:  |  Height:  |  Size: 473 B

View File

@ -0,0 +1,11 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Testcase for tspan with ancestor x/y attributes</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=333698 -->
<text x="100 100 150" y="20 40 80 60"><tspan x="50">abcdef</tspan></text>
<use xlink:href="tspan-xy-ref.svg#grid"/>
</svg>

After

Width:  |  Height:  |  Size: 481 B

View File

@ -0,0 +1,11 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Testcase for tspan with ancestor x/y attributes</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=333698 -->
<text x="50 100 150" y="20 40 80 60"><tspan>a</tspan>bcdef</text>
<use xlink:href="tspan-xy-ref.svg#grid"/>
</svg>

After

Width:  |  Height:  |  Size: 473 B

View File

@ -0,0 +1,11 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Testcase for tspan with ancestor x/y attributes</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=333698 -->
<text x="50 0 150" y="20 0 0 60">a<tspan x="100" y="40 80 100">bc</tspan>def</text>
<use xlink:href="tspan-xy-ref.svg#grid"/>
</svg>

After

Width:  |  Height:  |  Size: 491 B

View File

@ -0,0 +1,11 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Testcase for tspan with ancestor x/y attributes</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=333698 -->
<text x="50 100 150" y="20 40 80 60"><tspan><tspan>a</tspan>b<tspan>cde</tspan>f</tspan></text>
<use xlink:href="tspan-xy-ref.svg#grid"/>
</svg>

After

Width:  |  Height:  |  Size: 503 B

View File

@ -0,0 +1,11 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Testcase for tspan with ancestor x/y attributes</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=333698 -->
<text x="50 100 150" y="20 40 80 60">abc<tspan>def</tspan></text>
<use xlink:href="tspan-xy-ref.svg#grid"/>
</svg>

After

Width:  |  Height:  |  Size: 473 B

View File

@ -0,0 +1,11 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Testcase for tspan with ancestor x/y attributes</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=333698 -->
<text x="50 100 150" y="20 40 80 60" text-anchor="end"><tspan>abcdef</tspan></text>
<use xlink:href="tspan-xy-ref.svg#grid" />
</svg>

After

Width:  |  Height:  |  Size: 492 B

View File

@ -0,0 +1,11 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Testcase for tspan with ancestor x/y attributes</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=333698 -->
<text x="50 100 150" y="20 40 80 60" text-anchor="end">abcdef</text>
<use xlink:href="tspan-xy-ref.svg#grid" />
</svg>

After

Width:  |  Height:  |  Size: 477 B

View File

@ -0,0 +1,11 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Testcase for tspan with ancestor x/y attributes</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=333698 -->
<text x="50 100 150" y="20 40 80 60" text-anchor="middle"><tspan>abcdef</tspan></text>
<use xlink:href="tspan-xy-ref.svg#grid" />
</svg>

After

Width:  |  Height:  |  Size: 495 B

View File

@ -0,0 +1,11 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Reference for tspan with ancestor x/y attributes</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=333698 -->
<text x="50 100 150" y="20 40 80 60" text-anchor="middle">abcdef</text>
<use xlink:href="tspan-xy-ref.svg#grid" />
</svg>

After

Width:  |  Height:  |  Size: 481 B

View File

@ -0,0 +1,23 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Reference for tspan with ancestor x/y attributes</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=333698 -->
<text x="50 100 150" y="20 40 80 60">abcdef</text>
<g id="grid">
<line x1="10" y1="20" x2="200" y2="20" stroke="black"/>
<line x1="50" y1="10" x2="50" y2="100" stroke="black"/>
<line x1="10" y1="40" x2="200" y2="40" stroke="black"/>
<line x1="100" y1="10" x2="100" y2="100" stroke="black"/>
<line x1="10" y1="80" x2="200" y2="80" stroke="black"/>
<line x1="150" y1="10" x2="150" y2="100" stroke="black"/>
<line x1="10" y1="60" x2="200" y2="60" stroke="black"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 866 B