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 1919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |