mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 897342 - Don't try to adjust text for textLength="" when there is no opportunity to do so. r=jwatt
This commit is contained in:
parent
2c280a433a
commit
1954a52d54
1
layout/svg/crashtests/897342-1.svg
Normal file
1
layout/svg/crashtests/897342-1.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg"><text textLength="50" lengthAdjust="spacingAndGlyphs">‍</text></svg>
|
After Width: | Height: | Size: 116 B |
@ -173,3 +173,4 @@ load 890782-1.svg
|
||||
load 890783-1.svg
|
||||
load 893510-1.svg
|
||||
load 895311-1.svg
|
||||
load 897342-1.svg
|
||||
|
@ -4820,7 +4820,9 @@ nsSVGTextFrame2::DoGlyphPositioning()
|
||||
switch (lengthAdjust) {
|
||||
case SVG_LENGTHADJUST_SPACINGANDGLYPHS:
|
||||
// Scale the glyphs and their positions.
|
||||
mLengthAdjustScaleFactor = expectedTextLength / actualTextLength;
|
||||
if (actualTextLength > 0) {
|
||||
mLengthAdjustScaleFactor = expectedTextLength / actualTextLength;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -4832,7 +4834,9 @@ nsSVGTextFrame2::DoGlyphPositioning()
|
||||
adjustableSpaces++;
|
||||
}
|
||||
}
|
||||
adjustment = (expectedTextLength - actualTextLength) / adjustableSpaces;
|
||||
if (adjustableSpaces) {
|
||||
adjustment = (expectedTextLength - actualTextLength) / adjustableSpaces;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user