| 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 5699293aa7e0a0b411da7347ea41060f60caf947..41fc5a985bd8028d2567546cc057b5c911ff4f82 100644
|
| --- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
|
| +++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
|
| @@ -1605,6 +1605,36 @@ CSSValue* consumeOffsetPosition(CSSParserTokenRange& range,
|
| return consumePosition(range, cssParserMode, UnitlessQuirk::Forbid);
|
| }
|
|
|
| +// offset: <offset-path> [ <offset-distance>? && <offset-rotation>? ]
|
| +bool CSSPropertyParser::consumeOffsetShorthand(bool important) {
|
| + const CSSValue* offsetPath = consumePathOrNone(m_range);
|
| + if (!offsetPath)
|
| + return false;
|
| +
|
| + const CSSValue* offsetRotation = consumeOffsetRotation(m_range);
|
| + const CSSValue* offsetDistance =
|
| + consumeLengthOrPercent(m_range, m_context.mode(), ValueRangeAll);
|
| + if (offsetDistance && !offsetRotation)
|
| + offsetRotation = consumeOffsetRotation(m_range);
|
| +
|
| + addProperty(CSSPropertyOffsetPath, CSSPropertyOffset, *offsetPath, important);
|
| + addProperty(CSSPropertyOffsetDistance, CSSPropertyOffset,
|
| + offsetDistance ? *offsetDistance
|
| + : *CSSPrimitiveValue::create(
|
| + 0, CSSPrimitiveValue::UnitType::Pixels),
|
| + important);
|
| +
|
| + if (!offsetRotation) {
|
| + CSSValueList* list = CSSValueList::createSpaceSeparated();
|
| + list->append(*CSSIdentifierValue::create(CSSValueAuto));
|
| + offsetRotation = list;
|
| + }
|
| + addProperty(CSSPropertyOffsetRotation, CSSPropertyOffset, *offsetRotation,
|
| + important);
|
| +
|
| + return m_range.atEnd();
|
| +}
|
| +
|
| static CSSValue* consumeTextEmphasisStyle(CSSParserTokenRange& range) {
|
| CSSValueID id = range.peek().id();
|
| if (id == CSSValueNone)
|
| @@ -5067,7 +5097,7 @@ bool CSSPropertyParser::parseShorthand(CSSPropertyID unresolvedProperty,
|
| case CSSPropertyMotion:
|
| return consumeShorthandGreedily(motionShorthand(), important);
|
| case CSSPropertyOffset:
|
| - return consumeShorthandGreedily(offsetShorthand(), important);
|
| + return consumeOffsetShorthand(important);
|
| case CSSPropertyWebkitTextEmphasis:
|
| return consumeShorthandGreedily(webkitTextEmphasisShorthand(), important);
|
| case CSSPropertyOutline:
|
|
|