mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bug 729996 - trailing spaces in text not properly ignored. r=dholbert
This commit is contained in:
parent
4a150c91d1
commit
067cabc632
@ -251,6 +251,7 @@ fails-if(Android) random-if(gtk2Widget) != text-language-01.xhtml text-language-
|
||||
== text-layout-04.svg text-layout-04-ref.svg
|
||||
== text-layout-05.svg text-layout-05-ref.svg
|
||||
== text-layout-06.svg text-layout-06-ref.svg
|
||||
== text-layout-07.svg text-layout-07-ref.svg
|
||||
== text-scale-01.svg text-scale-01-ref.svg
|
||||
== text-stroke-scaling-01.svg text-stroke-scaling-01-ref.svg
|
||||
== stroke-dasharray-and-pathLength-01.svg pass.svg
|
||||
|
8
layout/reftests/svg/text-layout-07-ref.svg
Normal file
8
layout/reftests/svg/text-layout-07-ref.svg
Normal 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">
|
||||
<text transform="translate(0, 31)" font-size="120" text-anchor="middle">
|
||||
<tspan y="122.3" x="273">ABC</tspan></text>
|
||||
</svg>
|
After Width: | Height: | Size: 289 B |
9
layout/reftests/svg/text-layout-07.svg
Normal file
9
layout/reftests/svg/text-layout-07.svg
Normal file
@ -0,0 +1,9 @@
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<text transform="translate(0, 31)" font-size="120" text-anchor="middle">
|
||||
<tspan y="122.3" x="273">ABC</tspan>
|
||||
</text>
|
||||
</svg>
|
After Width: | Height: | Size: 292 B |
@ -325,7 +325,13 @@ nsSVGTextFrame::SetWhitespaceHandling(nsSVGGlyphFrame *aFrame)
|
||||
aFrame = aFrame->GetNextGlyphFrame();
|
||||
}
|
||||
|
||||
lastNonWhitespaceFrame->SetTrimTrailingWhitespace(true);
|
||||
// We're at the last non-whitespace frame so trim off the end
|
||||
// and make sure we set one of the trim bits so that any
|
||||
// further whitespace is compressed to nothing
|
||||
while (aFrame) {
|
||||
aFrame->SetTrimTrailingWhitespace(true);
|
||||
aFrame = aFrame->GetNextGlyphFrame();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user