зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1430817: Serialize <overflow-position> before other align bits. r=mats
Otherwise the serialisation wouldn't roundtrip with the new syntax, which fixes the position of <overflow-position>. Also make Servo and Gecko agree on whether to serialize "unsafe". MozReview-Commit-ID: L3GSMk5pZ3F
This commit is contained in:
Родитель
7e6016a967
Коммит
a4b9221df0
|
@ -1265,7 +1265,11 @@ nsCSSValue::AppendAlignJustifyValueToString(int32_t aValue, nsAString& aResult)
|
|||
aValue &= ~legacy;
|
||||
aResult.AppendLiteral("legacy ");
|
||||
}
|
||||
// Don't serialize the 'unsafe' keyword; it's the default.
|
||||
auto overflowPos = aValue & (NS_STYLE_ALIGN_SAFE | NS_STYLE_ALIGN_UNSAFE);
|
||||
if (MOZ_UNLIKELY(overflowPos == NS_STYLE_ALIGN_SAFE)) {
|
||||
aResult.AppendLiteral("safe ");
|
||||
}
|
||||
aValue &= ~overflowPos;
|
||||
MOZ_ASSERT(!(aValue & NS_STYLE_ALIGN_FLAG_BITS),
|
||||
"unknown bits in align/justify value");
|
||||
|
@ -1283,12 +1287,6 @@ nsCSSValue::AppendAlignJustifyValueToString(int32_t aValue, nsAString& aResult)
|
|||
}
|
||||
const auto& kwtable(nsCSSProps::kAlignAllKeywords);
|
||||
AppendASCIItoUTF16(nsCSSProps::ValueToKeyword(aValue, kwtable), aResult);
|
||||
// Don't serialize the 'unsafe' keyword; it's the default.
|
||||
if (MOZ_UNLIKELY(overflowPos == NS_STYLE_ALIGN_SAFE)) {
|
||||
aResult.Append(' ');
|
||||
AppendASCIItoUTF16(nsCSSProps::ValueToKeyword(overflowPos, kwtable),
|
||||
aResult);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче