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 45ffcb58c7501647e7497c3f7466e4822a37651c..5f348d6286e92209ca958c4d4c6be7b3bf26c39b 100644 |
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp |
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp |
@@ -3354,6 +3354,27 @@ static PassRefPtrWillBeRawPtr<CSSValue> consumeReflect(CSSParserTokenRange& rang |
return CSSReflectValue::create(direction.release(), offset.release(), mask.release()); |
} |
+static PassRefPtrWillBeRawPtr<CSSValue> consumeFontSizeAdjust(CSSParserTokenRange& range) |
+{ |
+ if (range.peek().id() == CSSValueNone) |
+ return consumeIdent(range); |
+ return consumeNumber(range, ValueRangeNonNegative); |
+} |
+ |
+static PassRefPtrWillBeRawPtr<CSSValue> consumeImageOrientation(CSSParserTokenRange& range, CSSParserMode cssParserMode) |
+{ |
+ if (!RuntimeEnabledFeatures::imageOrientationEnabled()) |
Timothy Loh
2016/02/11 02:53:01
more consistent with other runtime-enabled propert
rwlbuis
2016/02/11 20:47:54
Not sure why I implemented it that way... Just an
|
+ return nullptr; |
+ if (range.peek().id() == CSSValueFromImage) |
+ return consumeIdent(range); |
+ if (range.peek().type() != NumberToken) { |
+ RefPtrWillBeRawPtr<CSSPrimitiveValue> angle = consumeAngle(range, cssParserMode); |
+ if (angle && angle->getIntValue() == 0) |
Timothy Loh
2016/02/11 02:53:01
getDoubleValue might be better
rwlbuis
2016/02/11 20:47:54
Done.
|
+ return angle; |
+ } |
+ return nullptr; |
+} |
+ |
PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseSingleValue(CSSPropertyID unresolvedProperty) |
{ |
CSSPropertyID property = resolveCSSPropertyID(unresolvedProperty); |
@@ -3426,6 +3447,10 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseSingleValue(CSSProperty |
case CSSPropertyMarginRight: |
case CSSPropertyMarginBottom: |
case CSSPropertyMarginLeft: |
+ case CSSPropertyBottom: |
+ case CSSPropertyLeft: |
+ case CSSPropertyRight: |
+ case CSSPropertyTop: |
return consumeMarginWidth(m_range, m_context.mode(), UnitlessQuirk::Allow); |
Timothy Loh
2016/02/11 02:53:01
These aren't really margins though (I guess they'r
rwlbuis
2016/02/11 20:47:54
True, I hope you like the new method name better,
|
case CSSPropertyWebkitMarginStart: |
case CSSPropertyWebkitMarginEnd: |
@@ -3674,6 +3699,11 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseSingleValue(CSSProperty |
return consumeWebkitBorderImage(property, m_range, m_context); |
case CSSPropertyWebkitBoxReflect: |
return consumeReflect(m_range, m_context); |
+ case CSSPropertyFontSizeAdjust: |
+ ASSERT(RuntimeEnabledFeatures::cssFontSizeAdjustEnabled()); |
+ return consumeFontSizeAdjust(m_range); |
+ case CSSPropertyImageOrientation: |
+ return consumeImageOrientation(m_range, m_context.mode()); |
default: |
CSSParserValueList valueList(m_range); |
if (valueList.size()) { |