Index: Source/core/css/parser/CSSPropertyParser.cpp |
diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp |
index 5c9b52f7811e4c1e275d6d5e3194d5da31e33be5..4158e67cdb5ee513c33fafc6c0a2d5a04107d372 100644 |
--- a/Source/core/css/parser/CSSPropertyParser.cpp |
+++ b/Source/core/css/parser/CSSPropertyParser.cpp |
@@ -103,7 +103,17 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import |
int parsedPropertiesSize = parsedProperties.size(); |
CSSPropertyParser parser(valueList, context, parsedProperties, ruleType); |
- bool parseSuccess = parser.parseValue(unresolvedProperty, important); |
+ CSSPropertyID resolvedProperty = resolveCSSPropertyID(unresolvedProperty); |
+ bool parseSuccess; |
+ |
+ if (ruleType == StyleRule::Viewport) { |
tkent
2015/05/29 05:41:03
Why do you need to move the code from parseValue(2
keishi
2015/05/29 07:30:51
Sorry, changes to this file got mixed in by mistak
|
+ parseSuccess = (RuntimeEnabledFeatures::cssViewportEnabled() || isUASheetBehavior(context.mode())) |
+ && parser.parseViewportProperty(resolvedProperty, important); |
+ } else if (ruleType == StyleRule::FontFace) { |
+ parseSuccess = !important && parser.parseFontFaceDescriptor(resolvedProperty); |
+ } else { |
+ parseSuccess = parser.parseValue(unresolvedProperty, important); |
+ } |
// This doesn't count UA style sheets |
if (parseSuccess && context.useCounter()) |
@@ -409,27 +419,8 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import |
{ |
CSSPropertyID propId = resolveCSSPropertyID(unresolvedProperty); |
- if (!m_valueList) |
- return false; |
- |
CSSParserValue* value = m_valueList->current(); |
- if (!value) |
- return false; |
- |
- if (m_ruleType == StyleRule::Viewport) { |
- // Allow @viewport rules from UA stylesheets even if the feature is disabled. |
- if (!RuntimeEnabledFeatures::cssViewportEnabled() && !isUASheetBehavior(m_context.mode())) |
- return false; |
- |
- return parseViewportProperty(propId, important); |
- } |
- if (m_ruleType == StyleRule::FontFace) { |
- if (important) |
- return false; |
- return parseFontFaceDescriptor(propId); |
- } |
- |
// Note: m_parsedCalculation is used to pass the calc value to validUnit and then cleared at the end of this function. |
// FIXME: This is to avoid having to pass parsedCalc to all validUnit callers. |
ASSERT(!m_parsedCalculation); |