Index: Source/core/css/parser/CSSPropertyParser.cpp |
diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp |
index 8708db5e2f520e111c93f0c4bf08c7aaedfef9eb..7dda3a94a0d71fc0cfba34b14c3abcfa92c8a0df 100644 |
--- a/Source/core/css/parser/CSSPropertyParser.cpp |
+++ b/Source/core/css/parser/CSSPropertyParser.cpp |
@@ -561,6 +561,10 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import |
break; |
} |
/* nobreak */ |
+ case CSSPropertyColumnRuleColor: |
+ if (propId == CSSPropertyColumnRuleColor && unresolvedProperty != CSSPropertyAliasWebkitColumnRuleColor && !inShorthand() && !RuntimeEnabledFeatures::unprefixMulticolEnabled()) |
+ return false; |
+ /* nobreak */ |
case CSSPropertyBackgroundColor: // <color> | inherit |
case CSSPropertyBorderTopColor: // <color> | inherit |
case CSSPropertyBorderRightColor: |
@@ -572,7 +576,6 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import |
case CSSPropertyWebkitBorderAfterColor: |
case CSSPropertyColor: // <color> | inherit |
case CSSPropertyTextDecorationColor: // CSS3 text decoration colors |
- case CSSPropertyWebkitColumnRuleColor: |
case CSSPropertyWebkitTextEmphasisColor: |
case CSSPropertyWebkitTextFillColor: |
case CSSPropertyWebkitTextStrokeColor: |
@@ -769,13 +772,16 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import |
if (!inShorthand() || m_currentShorthand == CSSPropertyBorderWidth) |
unitless = FUnitlessQuirk; |
// fall through |
+ case CSSPropertyColumnRuleWidth: |
+ if (propId == CSSPropertyColumnRuleWidth && unresolvedProperty != CSSPropertyAliasWebkitColumnRuleWidth && !inShorthand() && !RuntimeEnabledFeatures::unprefixMulticolEnabled()) |
+ return false; |
+ // fall through |
case CSSPropertyWebkitTextStrokeWidth: |
case CSSPropertyOutlineWidth: // <border-width> | inherit |
case CSSPropertyWebkitBorderStartWidth: |
case CSSPropertyWebkitBorderEndWidth: |
case CSSPropertyWebkitBorderBeforeWidth: |
case CSSPropertyWebkitBorderAfterWidth: |
- case CSSPropertyWebkitColumnRuleWidth: |
if (id == CSSValueThin || id == CSSValueMedium || id == CSSValueThick) |
validPrimitive = true; |
else |
@@ -1256,19 +1262,33 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import |
} |
return false; |
} |
- case CSSPropertyWebkitColumnCount: |
+ case CSSPropertyColumnCount: |
+ if (unresolvedProperty != CSSPropertyAliasWebkitColumnCount && !inShorthand() && !RuntimeEnabledFeatures::unprefixMulticolEnabled()) |
+ return false; |
parsedValue = parseColumnCount(); |
break; |
- case CSSPropertyWebkitColumnGap: // normal | <length> |
+ case CSSPropertyColumnGap: // normal | <length> |
+ if (unresolvedProperty != CSSPropertyAliasWebkitColumnGap && !RuntimeEnabledFeatures::unprefixMulticolEnabled()) |
+ return false; |
if (id == CSSValueNormal) |
validPrimitive = true; |
else |
validPrimitive = validUnit(value, FLength | FNonNeg); |
break; |
- case CSSPropertyWebkitColumnSpan: // none | all | 1 (will be dropped in the unprefixed property) |
+ case CSSPropertyColumnSpan: // none | all | 1 (will be dropped in the unprefixed property) |
+ if (unresolvedProperty != CSSPropertyAliasWebkitColumnSpan && !RuntimeEnabledFeatures::unprefixMulticolEnabled()) |
+ return false; |
validPrimitive = id == CSSValueAll || id == CSSValueNone || (value->unit == CSSPrimitiveValue::CSS_NUMBER && value->fValue == 1); |
break; |
- case CSSPropertyWebkitColumnWidth: // auto | <length> |
+ case CSSPropertyColumnRuleStyle: |
+ // TODO(mstensho): move this back into CSSParserFastPaths once we have shipped unprefixed multicol. |
+ if (unresolvedProperty != CSSPropertyAliasWebkitColumnRuleStyle && !inShorthand() && !RuntimeEnabledFeatures::unprefixMulticolEnabled()) |
+ return false; |
+ validPrimitive = id >= CSSValueNone && id <= CSSValueDouble; |
+ break; |
+ case CSSPropertyColumnWidth: // auto | <length> |
+ if (unresolvedProperty != CSSPropertyAliasWebkitColumnWidth && !inShorthand() && !RuntimeEnabledFeatures::unprefixMulticolEnabled()) |
+ return false; |
parsedValue = parseColumnWidth(); |
break; |
case CSSPropertyWillChange: |
@@ -1400,10 +1420,14 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import |
return parseFont(important); |
case CSSPropertyListStyle: |
return parseShorthand(propId, listStyleShorthand(), important); |
- case CSSPropertyWebkitColumns: |
+ case CSSPropertyColumns: |
+ if (unresolvedProperty != CSSPropertyAliasWebkitColumns && !RuntimeEnabledFeatures::unprefixMulticolEnabled()) |
+ return false; |
return parseColumnsShorthand(important); |
- case CSSPropertyWebkitColumnRule: |
- return parseShorthand(propId, webkitColumnRuleShorthand(), important); |
+ case CSSPropertyColumnRule: |
+ if (unresolvedProperty != CSSPropertyAliasWebkitColumnRule && !RuntimeEnabledFeatures::unprefixMulticolEnabled()) |
+ return false; |
+ return parseShorthand(propId, columnRuleShorthand(), important); |
case CSSPropertyWebkitTextStroke: |
return parseShorthand(propId, webkitTextStrokeShorthand(), important); |
case CSSPropertyAnimation: |
@@ -1902,13 +1926,13 @@ bool CSSPropertyParser::parseColumnsShorthand(bool important) |
// Any unassigned property at this point will become implicit 'auto'. |
if (columnWidth) |
- addProperty(CSSPropertyWebkitColumnWidth, columnWidth, important); |
+ addProperty(CSSPropertyColumnWidth, columnWidth, important); |
else |
- addProperty(CSSPropertyWebkitColumnWidth, cssValuePool().createIdentifierValue(CSSValueAuto), important, true /* implicit */); |
+ addProperty(CSSPropertyColumnWidth, cssValuePool().createIdentifierValue(CSSValueAuto), important, true /* implicit */); |
if (columnCount) |
- addProperty(CSSPropertyWebkitColumnCount, columnCount, important); |
+ addProperty(CSSPropertyColumnCount, columnCount, important); |
else |
- addProperty(CSSPropertyWebkitColumnCount, cssValuePool().createIdentifierValue(CSSValueAuto), important, true /* implicit */); |
+ addProperty(CSSPropertyColumnCount, cssValuePool().createIdentifierValue(CSSValueAuto), important, true /* implicit */); |
return true; |
} |