Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1714)

Unified Diff: third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp

Issue 2375343002: CSS Motion Path: offset-shorthand requires path before distance rotation (Closed)
Patch Set: path distance rotation all required Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSPropertyParser.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4d55b33fde228e893ba15a7c6e7ed7d581338ca9 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
@@ -1605,6 +1605,24 @@ 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);
+ const CSSValue* offsetDistance =
+ consumeLengthOrPercent(m_range, m_context.mode(), ValueRangeAll);
+ const CSSValue* offsetRotation = consumeOffsetRotation(m_range);
+ if (!offsetPath || !offsetDistance || !offsetRotation || !m_range.atEnd())
+ return false;
+
+ addProperty(CSSPropertyOffsetPath, CSSPropertyOffset, *offsetPath, important);
+ addProperty(CSSPropertyOffsetDistance, CSSPropertyOffset, *offsetDistance,
+ important);
+ addProperty(CSSPropertyOffsetRotation, CSSPropertyOffset, *offsetRotation,
+ important);
+
+ return true;
+}
+
static CSSValue* consumeTextEmphasisStyle(CSSParserTokenRange& range) {
CSSValueID id = range.peek().id();
if (id == CSSValueNone)
@@ -5067,7 +5085,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:
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSPropertyParser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698