Bug 862158 - Propagate implied SVG text rotate="" values over the top of inherited values. r=longsonr

This commit is contained in:
Cameron McCormack 2013-04-16 16:43:28 +10:00
parent 92ead0358e
commit eb98cff2f3
6 changed files with 44 additions and 7 deletions

View File

@ -319,11 +319,14 @@ HTTP(..) == text-scale-03.svg text-scale-03-ref.svg
== tspan-dxdy-06.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-dxdy-textPath-01.svg tspan-dxdy-textPath-01-ref.svg
skip-if(B2G) random-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) == tspan-rotate-01.svg tspan-rotate-ref.svg # Bug 629718 for random failure on WinXP # bug 773482 skip-if(B2G) random-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) == tspan-rotate-01.svg tspan-rotate-ref.svg # Bug 629718 for random failure on WinXP # bug 773482
skip-if(B2G) random-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) == tspan-rotate-02.svg tspan-rotate-ref.svg # Bug 629718 for random failure on WinXP # bug 773482 skip-if(B2G) random-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) pref(svg.text.css-frames.enabled,false) == tspan-rotate-02.svg tspan-rotate-02.svg # Bug 629718 for random failure on WinXP # bug 773482
skip-if(B2G) random-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) pref(svg.text.css-frames.enabled,true) == tspan-rotate-02.svg tspan-rotate-02-ref.svg # Bug 629718 for random failure on WinXP # bug 773482
skip-if(B2G) random-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) == tspan-rotate-03.svg tspan-rotate-ref.svg # Bug 629718 for random failure on WinXP # bug 773482 skip-if(B2G) random-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) == tspan-rotate-03.svg tspan-rotate-ref.svg # Bug 629718 for random failure on WinXP # bug 773482
skip-if(B2G) random-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) == tspan-rotate-04.svg tspan-rotate-ref.svg # Bug 629718 for random failure on WinXP # bug 773482 skip-if(B2G) random-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) pref(svg.text.css-frames.enabled,false) == tspan-rotate-04.svg tspan-rotate-04.svg # Bug 629718 for random failure on WinXP # bug 773482
skip-if(B2G) random-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) pref(svg.text.css-frames.enabled,true) == tspan-rotate-04.svg tspan-rotate-04-ref.svg # Bug 629718 for random failure on WinXP # bug 773482
random-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) == tspan-rotate-05.svg tspan-rotate-ref.svg # Bug 629718 for random failure on WinXP random-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) == tspan-rotate-05.svg tspan-rotate-ref.svg # Bug 629718 for random failure on WinXP
skip-if(B2G) random-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) == tspan-rotate-06.svg tspan-rotate-ref.svg # Bug 629718 for random failure on WinXP # bug 773482 skip-if(B2G) random-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) == tspan-rotate-06.svg tspan-rotate-ref.svg # Bug 629718 for random failure on WinXP # bug 773482
== tspan-rotate-07.svg tspan-rotate-07-ref.svg
== tspan-rotate-textPath-01.svg tspan-rotate-textPath-01-ref.svg == tspan-rotate-textPath-01.svg tspan-rotate-textPath-01-ref.svg
skip-if(B2G) == tspan-xy-01.svg tspan-xy-ref.svg # bug 773482 skip-if(B2G) == tspan-xy-01.svg tspan-xy-ref.svg # bug 773482
skip-if(B2G) == tspan-xy-02.svg tspan-xy-ref.svg # bug 773482 skip-if(B2G) == tspan-xy-02.svg tspan-xy-ref.svg # bug 773482

View File

@ -0,0 +1,11 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<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 x="50 100 150" y="20 40 80 60" rotate="90 90 90 90 90">abcdef</text>
<use xlink:href="tspan-xy-ref.svg#grid"/>
</svg>

After

Width:  |  Height:  |  Size: 485 B

View File

@ -0,0 +1,11 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<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 x="50 100 150" y="20 40 80 60" rotate="90 45 45 180 180 180">abcdef</text>
<use xlink:href="tspan-xy-ref.svg#grid"/>
</svg>

After

Width:  |  Height:  |  Size: 491 B

View File

@ -0,0 +1,8 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<svg xmlns="http://www.w3.org/2000/svg">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=862158 -->
<text x="100" y="100" style="font: 32px sans-serif" rotate="45 0">A B</text>
</svg>

After

Width:  |  Height:  |  Size: 313 B

View File

@ -0,0 +1,8 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<svg xmlns="http://www.w3.org/2000/svg">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=862158 -->
<text x="100" y="100" style="font: 32px sans-serif"><tspan rotate="45">A </tspan>B</text>
</svg>

After

Width:  |  Height:  |  Size: 326 B

View File

@ -4673,11 +4673,7 @@ nsSVGTextFrame2::DoGlyphPositioning()
} }
// Fill in unspecified rotation values. // Fill in unspecified rotation values.
if (!mPositions[i].IsAngleSpecified()) { if (!mPositions[i].IsAngleSpecified()) {
mPositions[i].mAngle = mPositions[i - 1].mAngle; mPositions[i].mAngle = 0.0f;
if (mPositions[i].mAngle != 0.0f) {
// Any non-zero rotation must begin a run boundary.
mPositions[i].mRunBoundary = true;
}
} }
} }