| 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 e8bc1109bacc95323ef25ba5327d0b43672b4a7e..87d5f4d6d695b9e5d5b3cc5d2e83f372350d127b 100644
|
| --- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
|
| +++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
|
| @@ -2877,6 +2877,22 @@ static PassRefPtrWillBeRawPtr<CSSValueList> consumeContent(CSSParserTokenRange&
|
| return values.release();
|
| }
|
|
|
| +static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> consumePerspective(CSSParserTokenRange& range, CSSParserMode cssParserMode, CSSPropertyID unresolvedProperty)
|
| +{
|
| + if (range.peek().id() == CSSValueNone)
|
| + return consumeIdent(range);
|
| + RefPtrWillBeRawPtr<CSSPrimitiveValue> parsedValue = consumeLength(range, cssParserMode, ValueRangeAll);
|
| + if (!parsedValue && (unresolvedProperty == CSSPropertyAliasWebkitPerspective)) {
|
| + double perspective;
|
| + if (!consumeNumberRaw(range, perspective))
|
| + return nullptr;
|
| + parsedValue = cssValuePool().createValue(perspective, CSSPrimitiveValue::UnitType::Pixels);
|
| + }
|
| + if (parsedValue && (parsedValue->isCalculated() || parsedValue->getDoubleValue() > 0))
|
| + return parsedValue.release();
|
| + return nullptr;
|
| +}
|
| +
|
| PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseSingleValue(CSSPropertyID unresolvedProperty)
|
| {
|
| CSSPropertyID property = resolveCSSPropertyID(unresolvedProperty);
|
| @@ -3122,6 +3138,8 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseSingleValue(CSSProperty
|
| return consumeContent(m_range, m_context);
|
| case CSSPropertyListStyleImage:
|
| return consumeImage(m_range, m_context);
|
| + case CSSPropertyPerspective:
|
| + return consumePerspective(m_range, m_context.mode(), unresolvedProperty);
|
| default:
|
| return nullptr;
|
| }
|
|
|