OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/CSSParserFastPaths.h" | 6 #include "core/css/parser/CSSParserFastPaths.h" |
7 | 7 |
8 #include "core/StylePropertyShorthand.h" | 8 #include "core/StylePropertyShorthand.h" |
9 #include "core/css/CSSFunctionValue.h" | 9 #include "core/css/CSSFunctionValue.h" |
10 #include "core/css/CSSValuePool.h" | 10 #include "core/css/CSSValuePool.h" |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
203 return valueID == CSSValueLtr || valueID == CSSValueRtl; | 203 return valueID == CSSValueLtr || valueID == CSSValueRtl; |
204 case CSSPropertyDisplay: | 204 case CSSPropertyDisplay: |
205 // inline | block | list-item | inline-block | table | | 205 // inline | block | list-item | inline-block | table | |
206 // inline-table | table-row-group | table-header-group | table-footer-gr oup | table-row | | 206 // inline-table | table-row-group | table-header-group | table-footer-gr oup | table-row | |
207 // table-column-group | table-column | table-cell | table-caption | -web kit-box | -webkit-inline-box | none | 207 // table-column-group | table-column | table-cell | table-caption | -web kit-box | -webkit-inline-box | none |
208 // flex | inline-flex | -webkit-flex | -webkit-inline-flex | grid | inli ne-grid | 208 // flex | inline-flex | -webkit-flex | -webkit-inline-flex | grid | inli ne-grid |
209 return (valueID >= CSSValueInline && valueID <= CSSValueInlineFlex) || v alueID == CSSValueWebkitFlex || valueID == CSSValueWebkitInlineFlex || valueID = = CSSValueNone | 209 return (valueID >= CSSValueInline && valueID <= CSSValueInlineFlex) || v alueID == CSSValueWebkitFlex || valueID == CSSValueWebkitInlineFlex || valueID = = CSSValueNone |
210 || (RuntimeEnabledFeatures::cssGridLayoutEnabled() && (valueID == CS SValueGrid || valueID == CSSValueInlineGrid)); | 210 || (RuntimeEnabledFeatures::cssGridLayoutEnabled() && (valueID == CS SValueGrid || valueID == CSSValueInlineGrid)); |
211 case CSSPropertyEmptyCells: // show | hide | 211 case CSSPropertyEmptyCells: // show | hide |
212 return valueID == CSSValueShow || valueID == CSSValueHide; | 212 return valueID == CSSValueShow || valueID == CSSValueHide; |
213 case CSSPropertyFloat: // left | right | none | center (for buggy CSS, maps to none) | 213 case CSSPropertyFloat: // left | right | none | center (for buggy CSS, maps to none) |
davve
2015/03/30 16:19:25
I suppose it makes sense to update the comment too
Abhijeet Kandalkar Slow
2015/03/31 05:04:19
Done.
| |
214 return valueID == CSSValueLeft || valueID == CSSValueRight || valueID == CSSValueNone || valueID == CSSValueCenter; | 214 return valueID == CSSValueLeft || valueID == CSSValueRight || valueID == CSSValueNone; |
215 case CSSPropertyFontStyle: // normal | italic | oblique | 215 case CSSPropertyFontStyle: // normal | italic | oblique |
216 return valueID == CSSValueNormal || valueID == CSSValueItalic || valueID == CSSValueOblique; | 216 return valueID == CSSValueNormal || valueID == CSSValueItalic || valueID == CSSValueOblique; |
217 case CSSPropertyFontStretch: // normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra- expanded | 217 case CSSPropertyFontStretch: // normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra- expanded |
218 return valueID == CSSValueNormal || (valueID >= CSSValueUltraCondensed & & valueID <= CSSValueUltraExpanded); | 218 return valueID == CSSValueNormal || (valueID >= CSSValueUltraCondensed & & valueID <= CSSValueUltraExpanded); |
219 case CSSPropertyImageRendering: // auto | optimizeContrast | pixelated | 219 case CSSPropertyImageRendering: // auto | optimizeContrast | pixelated |
220 return valueID == CSSValueAuto || valueID == CSSValueWebkitOptimizeContr ast || (RuntimeEnabledFeatures::imageRenderingPixelatedEnabled() && valueID == C SSValuePixelated); | 220 return valueID == CSSValueAuto || valueID == CSSValueWebkitOptimizeContr ast || (RuntimeEnabledFeatures::imageRenderingPixelatedEnabled() && valueID == C SSValuePixelated); |
221 case CSSPropertyIsolation: // auto | isolate | 221 case CSSPropertyIsolation: // auto | isolate |
222 ASSERT(RuntimeEnabledFeatures::cssCompositingEnabled()); | 222 ASSERT(RuntimeEnabledFeatures::cssCompositingEnabled()); |
223 return valueID == CSSValueAuto || valueID == CSSValueIsolate; | 223 return valueID == CSSValueAuto || valueID == CSSValueIsolate; |
224 case CSSPropertyListStylePosition: // inside | outside | 224 case CSSPropertyListStylePosition: // inside | outside |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
663 if (RefPtrWillBeRawPtr<CSSValue> color = parseColorValue(propertyID, string, parserMode)) | 663 if (RefPtrWillBeRawPtr<CSSValue> color = parseColorValue(propertyID, string, parserMode)) |
664 return color.release(); | 664 return color.release(); |
665 if (RefPtrWillBeRawPtr<CSSValue> keyword = parseKeywordValue(propertyID, str ing)) | 665 if (RefPtrWillBeRawPtr<CSSValue> keyword = parseKeywordValue(propertyID, str ing)) |
666 return keyword.release(); | 666 return keyword.release(); |
667 if (RefPtrWillBeRawPtr<CSSValue> transform = parseSimpleTransform(propertyID , string)) | 667 if (RefPtrWillBeRawPtr<CSSValue> transform = parseSimpleTransform(propertyID , string)) |
668 return transform.release(); | 668 return transform.release(); |
669 return nullptr; | 669 return nullptr; |
670 } | 670 } |
671 | 671 |
672 } // namespace blink | 672 } // namespace blink |
OLD | NEW |