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/CSSBasicShapeValues.h" | 8 #include "core/css/CSSBasicShapeValues.h" |
9 #include "core/css/CSSBorderImage.h" | 9 #include "core/css/CSSBorderImage.h" |
10 #include "core/css/CSSCalculationValue.h" | 10 #include "core/css/CSSCalculationValue.h" |
(...skipping 2727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2738 } | 2738 } |
2739 | 2739 |
2740 static PassRefPtrWillBeRawPtr<CSSValue> consumeGeneratedImage(CSSParserTokenRang
e& range, CSSParserContext context) | 2740 static PassRefPtrWillBeRawPtr<CSSValue> consumeGeneratedImage(CSSParserTokenRang
e& range, CSSParserContext context) |
2741 { | 2741 { |
2742 CSSValueID id = range.peek().functionId(); | 2742 CSSValueID id = range.peek().functionId(); |
2743 CSSParserTokenRange rangeCopy = range; | 2743 CSSParserTokenRange rangeCopy = range; |
2744 CSSParserTokenRange args = consumeFunction(rangeCopy); | 2744 CSSParserTokenRange args = consumeFunction(rangeCopy); |
2745 RefPtrWillBeRawPtr<CSSValue> result = nullptr; | 2745 RefPtrWillBeRawPtr<CSSValue> result = nullptr; |
2746 if (id == CSSValueRadialGradient) { | 2746 if (id == CSSValueRadialGradient) { |
2747 result = consumeRadialGradient(args, context.mode(), NonRepeating); | 2747 result = consumeRadialGradient(args, context.mode(), NonRepeating); |
| 2748 } else if (id == CSSValueRepeatingRadialGradient) { |
| 2749 result = consumeRadialGradient(args, context.mode(), Repeating); |
2748 } else if (id == CSSValueWebkitLinearGradient) { | 2750 } else if (id == CSSValueWebkitLinearGradient) { |
2749 // FIXME: This should send a deprecation message. | 2751 // FIXME: This should send a deprecation message. |
2750 if (context.useCounter()) | 2752 if (context.useCounter()) |
2751 context.useCounter()->count(UseCounter::DeprecatedWebKitLinearGradie
nt); | 2753 context.useCounter()->count(UseCounter::DeprecatedWebKitLinearGradie
nt); |
2752 result = consumeLinearGradient(args, context.mode(), NonRepeating, CSSPr
efixedLinearGradient); | 2754 result = consumeLinearGradient(args, context.mode(), NonRepeating, CSSPr
efixedLinearGradient); |
2753 } else if (id == CSSValueWebkitRepeatingLinearGradient) { | 2755 } else if (id == CSSValueWebkitRepeatingLinearGradient) { |
2754 // FIXME: This should send a deprecation message. | 2756 // FIXME: This should send a deprecation message. |
2755 if (context.useCounter()) | 2757 if (context.useCounter()) |
2756 context.useCounter()->count(UseCounter::DeprecatedWebKitRepeatingLin
earGradient); | 2758 context.useCounter()->count(UseCounter::DeprecatedWebKitRepeatingLin
earGradient); |
2757 result = consumeLinearGradient(args, context.mode(), Repeating, CSSPrefi
xedLinearGradient); | 2759 result = consumeLinearGradient(args, context.mode(), Repeating, CSSPrefi
xedLinearGradient); |
(...skipping 1632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4390 m_currentShorthand = oldShorthand; | 4392 m_currentShorthand = oldShorthand; |
4391 CSSParserValueList valueList(m_range); | 4393 CSSParserValueList valueList(m_range); |
4392 if (!valueList.size()) | 4394 if (!valueList.size()) |
4393 return false; | 4395 return false; |
4394 m_valueList = &valueList; | 4396 m_valueList = &valueList; |
4395 return legacyParseShorthand(unresolvedProperty, important); | 4397 return legacyParseShorthand(unresolvedProperty, important); |
4396 } | 4398 } |
4397 } | 4399 } |
4398 | 4400 |
4399 } // namespace blink | 4401 } // namespace blink |
OLD | NEW |