Bug 1082017 - Add writing-mode to prerequisites for line-height and font (shorthand) tests, because vertical vs horizontal mode may result in different line metrics. r=dbaron

This commit is contained in:
Jonathan Kew 2015-02-17 22:34:25 +00:00
parent c1b64d0113
commit 07c9eae66b

View File

@ -5255,6 +5255,19 @@ if (SpecialPowers.getBoolPref("layout.css.vertical-text.enabled")) {
for (var prop in verticalTextProperties) {
gCSSProperties[prop] = verticalTextProperties[prop];
}
/*
* Vertical vs horizontal writing-mode can affect line-height
* because font metrics may not be symmetrical,
* so we require writing-mode:initial to ensure consistency
* in font shorthand and line-height tests.
*/
["font", "line-height"].forEach(function(prop) {
var p = gCSSProperties[prop];
if (p.prerequisites === undefined) {
p.prerequisites = {};
}
p.prerequisites["writing-mode"] = "initial";
});
}
if (SpecialPowers.getBoolPref("layout.css.masking.enabled")) {