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 1583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1594 if (id == CSSValueThin || id == CSSValueMedium || id == CSSValueThick) | 1594 if (id == CSSValueThin || id == CSSValueMedium || id == CSSValueThick) |
1595 return consumeIdent(range); | 1595 return consumeIdent(range); |
1596 return consumeLength(range, cssParserMode, ValueRangeNonNegative); | 1596 return consumeLength(range, cssParserMode, ValueRangeNonNegative); |
1597 } | 1597 } |
1598 | 1598 |
1599 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> consumeBorderWidth(CSSParserTok
enRange& range, CSSParserMode cssParserMode) | 1599 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> consumeBorderWidth(CSSParserTok
enRange& range, CSSParserMode cssParserMode) |
1600 { | 1600 { |
1601 return consumeLineWidth(range, cssParserMode); | 1601 return consumeLineWidth(range, cssParserMode); |
1602 } | 1602 } |
1603 | 1603 |
| 1604 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> consumeTextStrokeWidth(CSSParse
rTokenRange& range, CSSParserMode cssParserMode) |
| 1605 { |
| 1606 return consumeLineWidth(range, cssParserMode); |
| 1607 } |
| 1608 |
1604 PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseSingleValue(CSSProperty
ID unresolvedProperty) | 1609 PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseSingleValue(CSSProperty
ID unresolvedProperty) |
1605 { | 1610 { |
1606 CSSPropertyID property = resolveCSSPropertyID(unresolvedProperty); | 1611 CSSPropertyID property = resolveCSSPropertyID(unresolvedProperty); |
1607 m_range.consumeWhitespace(); | 1612 m_range.consumeWhitespace(); |
1608 switch (property) { | 1613 switch (property) { |
1609 case CSSPropertyWillChange: | 1614 case CSSPropertyWillChange: |
1610 return consumeWillChange(m_range); | 1615 return consumeWillChange(m_range); |
1611 case CSSPropertyPage: | 1616 case CSSPropertyPage: |
1612 return consumePage(m_range); | 1617 return consumePage(m_range); |
1613 case CSSPropertyQuotes: | 1618 case CSSPropertyQuotes: |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1694 case CSSPropertyTransitionProperty: | 1699 case CSSPropertyTransitionProperty: |
1695 case CSSPropertyAnimationTimingFunction: | 1700 case CSSPropertyAnimationTimingFunction: |
1696 case CSSPropertyTransitionTimingFunction: | 1701 case CSSPropertyTransitionTimingFunction: |
1697 return consumeAnimationPropertyList(property, m_range, m_context, unreso
lvedProperty == CSSPropertyAliasWebkitAnimationName); | 1702 return consumeAnimationPropertyList(property, m_range, m_context, unreso
lvedProperty == CSSPropertyAliasWebkitAnimationName); |
1698 case CSSPropertyOrphans: | 1703 case CSSPropertyOrphans: |
1699 case CSSPropertyWidows: | 1704 case CSSPropertyWidows: |
1700 return consumeWidowsOrOrphans(m_range); | 1705 return consumeWidowsOrOrphans(m_range); |
1701 case CSSPropertyTextDecorationColor: | 1706 case CSSPropertyTextDecorationColor: |
1702 ASSERT(RuntimeEnabledFeatures::css3TextDecorationsEnabled()); | 1707 ASSERT(RuntimeEnabledFeatures::css3TextDecorationsEnabled()); |
1703 return consumeColor(m_range, m_context); | 1708 return consumeColor(m_range, m_context); |
| 1709 case CSSPropertyWebkitTextStrokeWidth: |
| 1710 return consumeTextStrokeWidth(m_range, m_context.mode()); |
1704 case CSSPropertyWebkitTextFillColor: | 1711 case CSSPropertyWebkitTextFillColor: |
1705 case CSSPropertyWebkitTapHighlightColor: | 1712 case CSSPropertyWebkitTapHighlightColor: |
1706 case CSSPropertyWebkitTextEmphasisColor: | 1713 case CSSPropertyWebkitTextEmphasisColor: |
1707 case CSSPropertyWebkitBorderStartColor: | 1714 case CSSPropertyWebkitBorderStartColor: |
1708 case CSSPropertyWebkitBorderEndColor: | 1715 case CSSPropertyWebkitBorderEndColor: |
1709 case CSSPropertyWebkitBorderBeforeColor: | 1716 case CSSPropertyWebkitBorderBeforeColor: |
1710 case CSSPropertyWebkitBorderAfterColor: | 1717 case CSSPropertyWebkitBorderAfterColor: |
| 1718 case CSSPropertyWebkitTextStrokeColor: |
1711 return consumeColor(m_range, m_context); | 1719 return consumeColor(m_range, m_context); |
1712 case CSSPropertyColor: | 1720 case CSSPropertyColor: |
1713 return consumeColor(m_range, m_context, inQuirksMode()); | 1721 return consumeColor(m_range, m_context, inQuirksMode()); |
1714 case CSSPropertyWebkitBorderStartWidth: | 1722 case CSSPropertyWebkitBorderStartWidth: |
1715 case CSSPropertyWebkitBorderEndWidth: | 1723 case CSSPropertyWebkitBorderEndWidth: |
1716 case CSSPropertyWebkitBorderBeforeWidth: | 1724 case CSSPropertyWebkitBorderBeforeWidth: |
1717 case CSSPropertyWebkitBorderAfterWidth: | 1725 case CSSPropertyWebkitBorderAfterWidth: |
1718 return consumeBorderWidth(m_range, m_context.mode()); | 1726 return consumeBorderWidth(m_range, m_context.mode()); |
1719 case CSSPropertyZIndex: | 1727 case CSSPropertyZIndex: |
1720 return consumeZIndex(m_range); | 1728 return consumeZIndex(m_range); |
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2225 case CSSPropertyOutline: | 2233 case CSSPropertyOutline: |
2226 return consumeShorthandGreedily(outlineShorthand(), important); | 2234 return consumeShorthandGreedily(outlineShorthand(), important); |
2227 case CSSPropertyWebkitBorderStart: | 2235 case CSSPropertyWebkitBorderStart: |
2228 return consumeShorthandGreedily(webkitBorderStartShorthand(), important)
; | 2236 return consumeShorthandGreedily(webkitBorderStartShorthand(), important)
; |
2229 case CSSPropertyWebkitBorderEnd: | 2237 case CSSPropertyWebkitBorderEnd: |
2230 return consumeShorthandGreedily(webkitBorderEndShorthand(), important); | 2238 return consumeShorthandGreedily(webkitBorderEndShorthand(), important); |
2231 case CSSPropertyWebkitBorderBefore: | 2239 case CSSPropertyWebkitBorderBefore: |
2232 return consumeShorthandGreedily(webkitBorderBeforeShorthand(), important
); | 2240 return consumeShorthandGreedily(webkitBorderBeforeShorthand(), important
); |
2233 case CSSPropertyWebkitBorderAfter: | 2241 case CSSPropertyWebkitBorderAfter: |
2234 return consumeShorthandGreedily(webkitBorderAfterShorthand(), important)
; | 2242 return consumeShorthandGreedily(webkitBorderAfterShorthand(), important)
; |
| 2243 case CSSPropertyWebkitTextStroke: |
| 2244 return consumeShorthandGreedily(webkitTextStrokeShorthand(), important); |
2235 default: | 2245 default: |
2236 m_currentShorthand = oldShorthand; | 2246 m_currentShorthand = oldShorthand; |
2237 return false; | 2247 return false; |
2238 } | 2248 } |
2239 } | 2249 } |
2240 | 2250 |
2241 } // namespace blink | 2251 } // namespace blink |
OLD | NEW |