mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 14:25:52 +00:00
Bug 1434724: Fix computed value serialization of font-feature-settings. r=dholbert
This should make us agree with other browsers re the serialization of `"vert" 0`, and with servo after https://github.com/servo/servo/pull/19918 Left try running, may need some test adjustments that I'll send for review if they're non-trivial. Differential Revision: https://phabricator.services.mozilla.com/D539 MozReview-Commit-ID: LgIPfn4lfrF
This commit is contained in:
parent
3ecd324bdc
commit
f85c8218d8
@ -380,15 +380,11 @@ nsStyleUtil::AppendFontFeatureSettings(const nsTArray<gfxFontFeature>& aFeatures
|
||||
|
||||
AppendFontTagAsString(feat.mTag, aResult);
|
||||
|
||||
// output value, if necessary
|
||||
if (feat.mValue == 0) {
|
||||
// 0 ==> off
|
||||
aResult.AppendLiteral(" off");
|
||||
} else if (feat.mValue > 1) {
|
||||
// omit value if it's 1, implied by default
|
||||
if (feat.mValue != 1) {
|
||||
aResult.Append(' ');
|
||||
aResult.AppendInt(feat.mValue);
|
||||
}
|
||||
// else, omit value if 1, implied by default
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user