OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |