Chromium Code Reviews| Index: third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp |
| diff --git a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp |
| index 87ef0bb52b4f6327970b20f195a3f4d42d2566f3..b2012c47602bd3870b1bde42eb0858d32cfbe5ae 100644 |
| --- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp |
| +++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp |
| @@ -42,6 +42,7 @@ |
| #include "core/css/parser/CSSVariableParser.h" |
| #include "core/css/parser/FontVariantLigaturesParser.h" |
| #include "core/css/parser/FontVariantNumericParser.h" |
| +#include "core/css/properties/CSSPropertyAPI.h" |
| #include "core/css/properties/CSSPropertyAlignmentUtils.h" |
| #include "core/css/properties/CSSPropertyColumnUtils.h" |
| #include "core/css/properties/CSSPropertyDescriptor.h" |
| @@ -2079,8 +2080,10 @@ const CSSValue* CSSPropertyParser::parseSingleValue( |
| // statement. |
| const CSSPropertyDescriptor& cssPropertyDesc = |
| CSSPropertyDescriptor::get(property); |
| - if (cssPropertyDesc.temporaryCanReadValue) |
| + if (FUNCTION_IMPLEMENTED_FOR_PROPERTY(parseSingleValue, cssPropertyDesc) && |
|
sashab
2017/01/31 22:58:14
Sorry to do this, but this should really be in a s
|
| + cssPropertyDesc.parseSingleValue) { |
| return cssPropertyDesc.parseSingleValue(m_range, m_context); |
| + } |
| switch (property) { |
| case CSSPropertyWebkitHighlight: |
| @@ -3575,6 +3578,17 @@ bool CSSPropertyParser::parseShorthand(CSSPropertyID unresolvedProperty, |
| bool important) { |
| CSSPropertyID property = resolveCSSPropertyID(unresolvedProperty); |
| + // Gets the parsing function for our current property from the property API. |
|
sashab
2017/01/31 22:58:14
function -> method (keep naming consistent)
|
| + // If it has been implemented, we call this function, otherwise we manually |
|
sashab
2017/01/31 22:58:14
function -> method
aazzam
2017/02/01 00:30:05
fixed, also fixed in comment near parseSingleValue
|
| + // parse this value in the switch statement below. As we implement APIs for |
| + // other properties, those properties will be taken out of the switch |
| + // statement. |
| + const CSSPropertyDescriptor& cssPropertyDesc = |
| + CSSPropertyDescriptor::get(property); |
| + if (FUNCTION_IMPLEMENTED_FOR_PROPERTY(parseShorthand, cssPropertyDesc) && |
| + cssPropertyDesc.parseShorthand) { |
| + return cssPropertyDesc.parseShorthand(important, m_range, m_context); |
| + } |
| switch (property) { |
| case CSSPropertyWebkitMarginCollapse: { |
| CSSValueID id = m_range.consumeIncludingWhitespace().id(); |