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

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: 2015->2016; Remove unnecessary explicit. 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 1916 matching lines...) Expand 10 before | Expand all | Expand 10 after
1927 return nullptr; 1927 return nullptr;
1928 1928
1929 // FIXME: Add support for <fill-rule>. 1929 // FIXME: Add support for <fill-rule>.
1930 CSSParserTokenRange functionRange = range; 1930 CSSParserTokenRange functionRange = range;
1931 CSSParserTokenRange functionArgs = consumeFunction(functionRange); 1931 CSSParserTokenRange functionArgs = consumeFunction(functionRange);
1932 1932
1933 if (functionArgs.peek().type() != StringToken) 1933 if (functionArgs.peek().type() != StringToken)
1934 return nullptr; 1934 return nullptr;
1935 String pathString = functionArgs.consumeIncludingWhitespace().value(); 1935 String pathString = functionArgs.consumeIncludingWhitespace().value();
1936 1936
1937 OwnPtr<SVGPathByteStream> byteStream = SVGPathByteStream::create(); 1937 RefPtr<SVGPathByteStream> byteStream = SVGPathByteStream::create();
1938 if (!buildByteStreamFromString(pathString, *byteStream) || !functionArgs.atE nd()) 1938 if (!buildByteStreamFromString(pathString, *byteStream) || !functionArgs.atE nd())
1939 return nullptr; 1939 return nullptr;
1940 1940
1941 range = functionRange; 1941 range = functionRange;
1942 return CSSPathValue::create(byteStream.release()); 1942 return CSSPathValue::create(byteStream.release());
1943 } 1943 }
1944 1944
1945 static PassRefPtrWillBeRawPtr<CSSValue> consumePathOrNone(CSSParserTokenRange& r ange) 1945 static PassRefPtrWillBeRawPtr<CSSValue> consumePathOrNone(CSSParserTokenRange& r ange)
1946 { 1946 {
1947 CSSValueID id = range.peek().id(); 1947 CSSValueID id = range.peek().id();
(...skipping 1782 matching lines...) Expand 10 before | Expand all | Expand 10 after
3730 return consumeShorthandGreedily(webkitColumnRuleShorthand(), important); 3730 return consumeShorthandGreedily(webkitColumnRuleShorthand(), important);
3731 case CSSPropertyListStyle: 3731 case CSSPropertyListStyle:
3732 return consumeShorthandGreedily(listStyleShorthand(), important); 3732 return consumeShorthandGreedily(listStyleShorthand(), important);
3733 default: 3733 default:
3734 m_currentShorthand = oldShorthand; 3734 m_currentShorthand = oldShorthand;
3735 return false; 3735 return false;
3736 } 3736 }
3737 } 3737 }
3738 3738
3739 } // namespace blink 3739 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698