Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(662)

Unified Diff: Source/core/css/parser/CSSPropertyParser.cpp

Issue 1150313002: *** NOT FOR LANDING *** Unprefix multicol behind a flag (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/parser/CSSParserFastPaths.cpp ('k') | Source/core/css/resolver/AnimatedStyleBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « Source/core/css/parser/CSSParserFastPaths.cpp ('k') | Source/core/css/resolver/AnimatedStyleBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698