Issue #1370 - Part 3: Implement content keyword for flex-basis property

Partially based on https://bugzilla.mozilla.org/show_bug.cgi?id=1105111
This commit is contained in:
FranklinDM 2022-04-06 23:59:01 +08:00 committed by roytam1
commit 9dc59c43f1
9 changed files with 63 additions and 8 deletions

View file

@ -8592,7 +8592,7 @@ CSSParserImpl::ParseFlex()
// "a unitless zero that is not already preceded by two flex factors must be
// interpreted as a flex factor.
if (ParseNonNegativeVariant(tmpVal, flexBasisVariantMask | VARIANT_NUMBER,
nsCSSProps::kWidthKTable) != CSSParseResult::Ok) {
nsCSSProps::kFlexBasisKTable) != CSSParseResult::Ok) {
// First component was not a valid flex-basis or flex-grow value. Fail.
return false;
}
@ -8641,7 +8641,7 @@ CSSParserImpl::ParseFlex()
if (!wasFirstComponentFlexBasis) {
CSSParseResult result =
ParseNonNegativeVariant(tmpVal, flexBasisVariantMask,
nsCSSProps::kWidthKTable);
nsCSSProps::kFlexBasisKTable);
if (result == CSSParseResult::Error) {
return false;
} else if (result == CSSParseResult::Ok) {