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

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

Issue 1545713003: Add StylePath and use it to store 'd' in ComputedStyle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restore CSSPathValue::equals. Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/css/parser/CSSPropertyParser.h" 5 #include "core/css/parser/CSSPropertyParser.h"
6 6
7 #include "core/StylePropertyShorthand.h" 7 #include "core/StylePropertyShorthand.h"
8 #include "core/css/CSSCalculationValue.h" 8 #include "core/css/CSSCalculationValue.h"
9 #include "core/css/CSSCounterValue.h" 9 #include "core/css/CSSCounterValue.h"
10 #include "core/css/CSSCrossfadeValue.h" 10 #include "core/css/CSSCrossfadeValue.h"
(...skipping 1919 matching lines...) Expand 10 before | Expand all | Expand 10 after
1930 return nullptr; 1930 return nullptr;
1931 1931
1932 // FIXME: Add support for <fill-rule>. 1932 // FIXME: Add support for <fill-rule>.
1933 CSSParserTokenRange functionRange = range; 1933 CSSParserTokenRange functionRange = range;
1934 CSSParserTokenRange functionArgs = consumeFunction(functionRange); 1934 CSSParserTokenRange functionArgs = consumeFunction(functionRange);
1935 1935
1936 if (functionArgs.peek().type() != StringToken) 1936 if (functionArgs.peek().type() != StringToken)
1937 return nullptr; 1937 return nullptr;
1938 String pathString = functionArgs.consumeIncludingWhitespace().value(); 1938 String pathString = functionArgs.consumeIncludingWhitespace().value();
1939 1939
1940 OwnPtr<SVGPathByteStream> byteStream = SVGPathByteStream::create(); 1940 RefPtr<SVGPathByteStream> byteStream = SVGPathByteStream::create();
1941 if (!buildByteStreamFromString(pathString, *byteStream) || !functionArgs.atE nd()) 1941 if (!buildByteStreamFromString(pathString, *byteStream) || !functionArgs.atE nd())
1942 return nullptr; 1942 return nullptr;
1943 1943
1944 range = functionRange; 1944 range = functionRange;
1945 return CSSPathValue::create(byteStream.release()); 1945 return CSSPathValue::create(byteStream.release());
1946 } 1946 }
1947 1947
1948 static PassRefPtrWillBeRawPtr<CSSValue> consumePathOrNone(CSSParserTokenRange& r ange) 1948 static PassRefPtrWillBeRawPtr<CSSValue> consumePathOrNone(CSSParserTokenRange& r ange)
1949 { 1949 {
1950 CSSValueID id = range.peek().id(); 1950 CSSValueID id = range.peek().id();
(...skipping 1782 matching lines...) Expand 10 before | Expand all | Expand 10 after
3733 return consumeShorthandGreedily(webkitColumnRuleShorthand(), important); 3733 return consumeShorthandGreedily(webkitColumnRuleShorthand(), important);
3734 case CSSPropertyListStyle: 3734 case CSSPropertyListStyle:
3735 return consumeShorthandGreedily(listStyleShorthand(), important); 3735 return consumeShorthandGreedily(listStyleShorthand(), important);
3736 default: 3736 default:
3737 m_currentShorthand = oldShorthand; 3737 m_currentShorthand = oldShorthand;
3738 return false; 3738 return false;
3739 } 3739 }
3740 } 3740 }
3741 3741
3742 } // namespace blink 3742 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698