Bug 1532122 - Make word-spacing, letter-spacing, and line-height use Rust lengths. r=boris
This also adopts the resolution from [1] while at it, making letter-spacing compute to a length, serializing 0 to normal rather than keeping normal in the computed value, which matches every other engine. This removes the SMIL tests for percentages from letter-spacing since letter-spacing does in fact not support percentages, so they were passing just by chance. [1]: https://github.com/w3c/csswg-drafts/issues/1484 Differential Revision: https://phabricator.services.mozilla.com/D21850
This commit is contained in:
@@ -201,12 +201,9 @@ LogicalSize nsTextControlFrame::CalcIntrinsicSize(
|
||||
|
||||
// Increment width with cols * letter-spacing.
|
||||
{
|
||||
const nsStyleCoord& lsCoord = StyleText()->mLetterSpacing;
|
||||
if (eStyleUnit_Coord == lsCoord.GetUnit()) {
|
||||
nscoord letterSpacing = lsCoord.GetCoordValue();
|
||||
if (letterSpacing != 0) {
|
||||
intrinsicSize.ISize(aWM) += cols * letterSpacing;
|
||||
}
|
||||
const StyleLength& letterSpacing = StyleText()->mLetterSpacing;
|
||||
if (!letterSpacing.IsZero()) {
|
||||
intrinsicSize.ISize(aWM) += cols * letterSpacing.ToAppUnits();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user