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

Unified Diff: third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp

Issue 1450123006: Parse -webkit-column-rule shorthand in CSSPropertyParser with CSSParserTokens (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Patch for landing Created 5 years, 1 month 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 | « third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp b/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
index 20a1de1f19a7c095479f1750874387654ea74136..2ab31000827e61b529e98df302a21fc2dd53b1d7 100644
--- a/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
@@ -383,8 +383,7 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
case CSSPropertyBorderRightColor:
case CSSPropertyBorderBottomColor:
case CSSPropertyBorderLeftColor:
- case CSSPropertyWebkitColumnRuleColor:
- parsedValue = parseColor(m_valueList->current(), acceptQuirkyColors(propId));
+ parsedValue = parseColor(m_valueList->current(), inQuirksMode() && (!inShorthand() || m_currentShorthand == CSSPropertyBorderColor));
if (parsedValue)
m_valueList->next();
break;
@@ -551,8 +550,6 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
case CSSPropertyBorderLeftWidth:
if (!inShorthand() || m_currentShorthand == CSSPropertyBorderWidth)
unitless = FUnitlessQuirk;
- // fall through
- case CSSPropertyWebkitColumnRuleWidth:
if (id == CSSValueThin || id == CSSValueMedium || id == CSSValueThick)
validPrimitive = true;
else
@@ -904,8 +901,6 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
return parse4Values(propId, borderStyleShorthand().properties(), important);
case CSSPropertyListStyle:
return parseShorthand(propId, listStyleShorthand(), important);
- case CSSPropertyWebkitColumnRule:
- return parseShorthand(propId, webkitColumnRuleShorthand(), important);
case CSSPropertyInvalid:
return false;
case CSSPropertyWebkitClipPath:
@@ -1094,6 +1089,9 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
case CSSPropertyFlexShrink:
case CSSPropertyFlexFlow:
case CSSPropertyStrokeDasharray:
+ case CSSPropertyWebkitColumnRule:
+ case CSSPropertyWebkitColumnRuleColor:
+ case CSSPropertyWebkitColumnRuleWidth:
validPrimitive = false;
break;
@@ -1528,25 +1526,6 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseAttr(CSSParserValueList
return attrValue.release();
}
-bool CSSPropertyParser::acceptQuirkyColors(CSSPropertyID propertyId) const
-{
- if (!inQuirksMode())
- return false;
- switch (propertyId) {
- case CSSPropertyBackgroundColor:
- case CSSPropertyBorderBottomColor:
- case CSSPropertyBorderLeftColor:
- case CSSPropertyBorderRightColor:
- case CSSPropertyBorderTopColor:
- return !inShorthand() || m_currentShorthand == CSSPropertyBorderColor;
- case CSSPropertyColor:
- return true;
- default:
- break;
- }
- return false;
-}
-
bool CSSPropertyParser::isColorKeyword(CSSValueID id)
{
// Named colors and color keywords:
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698