| 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 "config.h" | 5 #include "config.h" |
| 6 #include "core/css/parser/CSSPropertyParser.h" | 6 #include "core/css/parser/CSSPropertyParser.h" |
| 7 | 7 |
| 8 #include "core/StylePropertyShorthand.h" | 8 #include "core/StylePropertyShorthand.h" |
| 9 #include "core/css/CSSCalculationValue.h" | 9 #include "core/css/CSSCalculationValue.h" |
| 10 #include "core/css/CSSCustomIdentValue.h" | 10 #include "core/css/CSSCustomIdentValue.h" |
| (...skipping 1675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1686 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> consumeBorderWidth(CSSParserTok
enRange& range, CSSParserMode cssParserMode) | 1686 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> consumeBorderWidth(CSSParserTok
enRange& range, CSSParserMode cssParserMode) |
| 1687 { | 1687 { |
| 1688 return consumeLineWidth(range, cssParserMode); | 1688 return consumeLineWidth(range, cssParserMode); |
| 1689 } | 1689 } |
| 1690 | 1690 |
| 1691 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> consumeTextStrokeWidth(CSSParse
rTokenRange& range, CSSParserMode cssParserMode) | 1691 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> consumeTextStrokeWidth(CSSParse
rTokenRange& range, CSSParserMode cssParserMode) |
| 1692 { | 1692 { |
| 1693 return consumeLineWidth(range, cssParserMode); | 1693 return consumeLineWidth(range, cssParserMode); |
| 1694 } | 1694 } |
| 1695 | 1695 |
| 1696 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> consumeColumnRuleWidth(CSSParse
rTokenRange& range, CSSParserMode cssParserMode) |
| 1697 { |
| 1698 return consumeLineWidth(range, cssParserMode); |
| 1699 } |
| 1700 |
| 1696 static bool consumeTranslate3d(CSSParserTokenRange& args, CSSParserMode cssParse
rMode, RefPtrWillBeRawPtr<CSSFunctionValue>& transformValue) | 1701 static bool consumeTranslate3d(CSSParserTokenRange& args, CSSParserMode cssParse
rMode, RefPtrWillBeRawPtr<CSSFunctionValue>& transformValue) |
| 1697 { | 1702 { |
| 1698 unsigned numberOfArguments = 2; | 1703 unsigned numberOfArguments = 2; |
| 1699 RefPtrWillBeRawPtr<CSSValue> parsedValue; | 1704 RefPtrWillBeRawPtr<CSSValue> parsedValue; |
| 1700 do { | 1705 do { |
| 1701 parsedValue = consumeLengthOrPercent(args, cssParserMode, ValueRangeAll)
; | 1706 parsedValue = consumeLengthOrPercent(args, cssParserMode, ValueRangeAll)
; |
| 1702 if (!parsedValue) | 1707 if (!parsedValue) |
| 1703 return false; | 1708 return false; |
| 1704 transformValue->append(parsedValue); | 1709 transformValue->append(parsedValue); |
| 1705 if (!consumeCommaIncludingWhitespace(args)) | 1710 if (!consumeCommaIncludingWhitespace(args)) |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2072 case CSSPropertyWebkitTapHighlightColor: | 2077 case CSSPropertyWebkitTapHighlightColor: |
| 2073 case CSSPropertyWebkitTextEmphasisColor: | 2078 case CSSPropertyWebkitTextEmphasisColor: |
| 2074 case CSSPropertyWebkitBorderStartColor: | 2079 case CSSPropertyWebkitBorderStartColor: |
| 2075 case CSSPropertyWebkitBorderEndColor: | 2080 case CSSPropertyWebkitBorderEndColor: |
| 2076 case CSSPropertyWebkitBorderBeforeColor: | 2081 case CSSPropertyWebkitBorderBeforeColor: |
| 2077 case CSSPropertyWebkitBorderAfterColor: | 2082 case CSSPropertyWebkitBorderAfterColor: |
| 2078 case CSSPropertyWebkitTextStrokeColor: | 2083 case CSSPropertyWebkitTextStrokeColor: |
| 2079 case CSSPropertyStopColor: | 2084 case CSSPropertyStopColor: |
| 2080 case CSSPropertyFloodColor: | 2085 case CSSPropertyFloodColor: |
| 2081 case CSSPropertyLightingColor: | 2086 case CSSPropertyLightingColor: |
| 2087 case CSSPropertyWebkitColumnRuleColor: |
| 2082 return consumeColor(m_range, m_context); | 2088 return consumeColor(m_range, m_context); |
| 2083 case CSSPropertyColor: | 2089 case CSSPropertyColor: |
| 2084 return consumeColor(m_range, m_context, inQuirksMode()); | 2090 return consumeColor(m_range, m_context, inQuirksMode()); |
| 2085 case CSSPropertyWebkitBorderStartWidth: | 2091 case CSSPropertyWebkitBorderStartWidth: |
| 2086 case CSSPropertyWebkitBorderEndWidth: | 2092 case CSSPropertyWebkitBorderEndWidth: |
| 2087 case CSSPropertyWebkitBorderBeforeWidth: | 2093 case CSSPropertyWebkitBorderBeforeWidth: |
| 2088 case CSSPropertyWebkitBorderAfterWidth: | 2094 case CSSPropertyWebkitBorderAfterWidth: |
| 2089 return consumeBorderWidth(m_range, m_context.mode()); | 2095 return consumeBorderWidth(m_range, m_context.mode()); |
| 2090 case CSSPropertyZIndex: | 2096 case CSSPropertyZIndex: |
| 2091 return consumeZIndex(m_range); | 2097 return consumeZIndex(m_range); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2123 case CSSPropertyMarkerMid: | 2129 case CSSPropertyMarkerMid: |
| 2124 case CSSPropertyMarkerEnd: | 2130 case CSSPropertyMarkerEnd: |
| 2125 return consumeNoneOrURI(m_range); | 2131 return consumeNoneOrURI(m_range); |
| 2126 case CSSPropertyFlexBasis: | 2132 case CSSPropertyFlexBasis: |
| 2127 return consumeFlexBasis(m_range, m_context.mode()); | 2133 return consumeFlexBasis(m_range, m_context.mode()); |
| 2128 case CSSPropertyFlexGrow: | 2134 case CSSPropertyFlexGrow: |
| 2129 case CSSPropertyFlexShrink: | 2135 case CSSPropertyFlexShrink: |
| 2130 return consumeNumber(m_range, ValueRangeNonNegative); | 2136 return consumeNumber(m_range, ValueRangeNonNegative); |
| 2131 case CSSPropertyStrokeDasharray: | 2137 case CSSPropertyStrokeDasharray: |
| 2132 return consumeStrokeDasharray(m_range); | 2138 return consumeStrokeDasharray(m_range); |
| 2139 case CSSPropertyWebkitColumnRuleWidth: |
| 2140 return consumeColumnRuleWidth(m_range, m_context.mode()); |
| 2133 default: | 2141 default: |
| 2134 return nullptr; | 2142 return nullptr; |
| 2135 } | 2143 } |
| 2136 } | 2144 } |
| 2137 | 2145 |
| 2138 static PassRefPtrWillBeRawPtr<CSSValueList> consumeFontFaceUnicodeRange(CSSParse
rTokenRange& range) | 2146 static PassRefPtrWillBeRawPtr<CSSValueList> consumeFontFaceUnicodeRange(CSSParse
rTokenRange& range) |
| 2139 { | 2147 { |
| 2140 RefPtrWillBeRawPtr<CSSValueList> values = CSSValueList::createCommaSeparated
(); | 2148 RefPtrWillBeRawPtr<CSSValueList> values = CSSValueList::createCommaSeparated
(); |
| 2141 | 2149 |
| 2142 do { | 2150 do { |
| (...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2711 return false; | 2719 return false; |
| 2712 addProperty(CSSPropertyMarkerStart, marker, important); | 2720 addProperty(CSSPropertyMarkerStart, marker, important); |
| 2713 addProperty(CSSPropertyMarkerMid, marker, important); | 2721 addProperty(CSSPropertyMarkerMid, marker, important); |
| 2714 addProperty(CSSPropertyMarkerEnd, marker.release(), important); | 2722 addProperty(CSSPropertyMarkerEnd, marker.release(), important); |
| 2715 return true; | 2723 return true; |
| 2716 } | 2724 } |
| 2717 case CSSPropertyFlex: | 2725 case CSSPropertyFlex: |
| 2718 return consumeFlex(important); | 2726 return consumeFlex(important); |
| 2719 case CSSPropertyFlexFlow: | 2727 case CSSPropertyFlexFlow: |
| 2720 return consumeShorthandGreedily(flexFlowShorthand(), important); | 2728 return consumeShorthandGreedily(flexFlowShorthand(), important); |
| 2729 case CSSPropertyWebkitColumnRule: |
| 2730 return consumeShorthandGreedily(webkitColumnRuleShorthand(), important); |
| 2721 default: | 2731 default: |
| 2722 m_currentShorthand = oldShorthand; | 2732 m_currentShorthand = oldShorthand; |
| 2723 return false; | 2733 return false; |
| 2724 } | 2734 } |
| 2725 } | 2735 } |
| 2726 | 2736 |
| 2727 } // namespace blink | 2737 } // namespace blink |
| OLD | NEW |