Chromium Code Reviews| 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 6e2b2211d22e2763058d7ae3233c3358c86d817f..56ca97b4ce703d1c71d90315b9e3be4f9c399bab 100644 |
| --- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp |
| +++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp |
| @@ -1925,10 +1925,10 @@ static PassRefPtrWillBeRawPtr<CSSValue> consumeContain(CSSParserTokenRange& rang |
| return list.release(); |
| } |
| -static PassRefPtrWillBeRawPtr<CSSValue> consumeMotionPath(CSSParserTokenRange& range) |
| +static PassRefPtrWillBeRawPtr<CSSValue> consumePath(CSSParserTokenRange& range, CSSPropertyID property) |
| { |
| CSSValueID id = range.peek().id(); |
| - if (id == CSSValueNone) |
| + if (id == CSSValueNone && property == CSSPropertyMotionPath) |
|
fs
2015/12/11 13:01:58
Suggestion: Could also do the trivial split - cons
|
| return consumeIdent(range); |
| // FIXME: Add support for <url>, <basic-shape>, <geometry-box>. |
| if (range.peek().functionId() != CSSValuePath) |
| @@ -1941,12 +1941,13 @@ static PassRefPtrWillBeRawPtr<CSSValue> consumeMotionPath(CSSParserTokenRange& r |
| if (functionArgs.peek().type() != StringToken) |
| return nullptr; |
| String pathString = functionArgs.consumeIncludingWhitespace().value(); |
| - Path path; |
| - if (!buildPathFromString(pathString, path) || !functionArgs.atEnd()) |
| + |
| + OwnPtr<SVGPathByteStream> byteStream = SVGPathByteStream::create(); |
| + if (!buildByteStreamFromString(pathString, *byteStream) || !functionArgs.atEnd()) |
| return nullptr; |
| range = functionRange; |
| - return CSSPathValue::create(pathString); |
| + return CSSPathValue::create(byteStream.release()); |
| } |
| static PassRefPtrWillBeRawPtr<CSSValue> consumeMotionRotation(CSSParserTokenRange& range, CSSParserMode cssParserMode) |
| @@ -2574,8 +2575,9 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseSingleValue(CSSProperty |
| case CSSPropertyWebkitTextDecorationsInEffect: |
| case CSSPropertyTextDecorationLine: |
| return consumeTextDecorationLine(m_range); |
| + case CSSPropertyD: |
| case CSSPropertyMotionPath: |
| - return consumeMotionPath(m_range); |
| + return consumePath(m_range, property); |
| case CSSPropertyMotionOffset: |
| return consumeLengthOrPercent(m_range, m_context.mode(), ValueRangeAll); |
| case CSSPropertyMotionRotation: |