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 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 // auto | use-script | no-change | reset-size | ideographic | | 523 // auto | use-script | no-change | reset-size | ideographic | |
524 // alphabetic | hanging | mathematical | central | middle | | 524 // alphabetic | hanging | mathematical | central | middle | |
525 // text-after-edge | text-before-edge | 525 // text-after-edge | text-before-edge |
526 return valueID == CSSValueAuto || valueID == CSSValueMiddle | 526 return valueID == CSSValueAuto || valueID == CSSValueMiddle |
527 || (valueID >= CSSValueUseScript && valueID <= CSSValueResetSize) | 527 || (valueID >= CSSValueUseScript && valueID <= CSSValueResetSize) |
528 || (valueID >= CSSValueCentral && valueID <= CSSValueMathematical); | 528 || (valueID >= CSSValueCentral && valueID <= CSSValueMathematical); |
529 case CSSPropertyEmptyCells: // show | hide | 529 case CSSPropertyEmptyCells: // show | hide |
530 return valueID == CSSValueShow || valueID == CSSValueHide; | 530 return valueID == CSSValueShow || valueID == CSSValueHide; |
531 case CSSPropertyFloat: // left | right | none | 531 case CSSPropertyFloat: // left | right | none |
532 return valueID == CSSValueLeft || valueID == CSSValueRight || valueID ==
CSSValueNone; | 532 return valueID == CSSValueLeft || valueID == CSSValueRight || valueID ==
CSSValueNone; |
| 533 case CSSPropertyFontDisplay: // auto | block | swap | fallback | optional |
| 534 return valueID == CSSValueAuto || valueID == CSSValueBlock || valueID ==
CSSValueSwap || valueID == CSSValueFallback || valueID == CSSValueOptional; |
533 case CSSPropertyFontStyle: // normal | italic | oblique | 535 case CSSPropertyFontStyle: // normal | italic | oblique |
534 return valueID == CSSValueNormal || valueID == CSSValueItalic || valueID
== CSSValueOblique; | 536 return valueID == CSSValueNormal || valueID == CSSValueItalic || valueID
== CSSValueOblique; |
535 case CSSPropertyFontStretch: // normal | ultra-condensed | extra-condensed |
condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-
expanded | 537 case CSSPropertyFontStretch: // normal | ultra-condensed | extra-condensed |
condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-
expanded |
536 return valueID == CSSValueNormal || (valueID >= CSSValueUltraCondensed &
& valueID <= CSSValueUltraExpanded); | 538 return valueID == CSSValueNormal || (valueID >= CSSValueUltraCondensed &
& valueID <= CSSValueUltraExpanded); |
537 case CSSPropertyImageRendering: // auto | optimizeContrast | pixelated | 539 case CSSPropertyImageRendering: // auto | optimizeContrast | pixelated |
538 return valueID == CSSValueAuto || valueID == CSSValueWebkitOptimizeContr
ast || (RuntimeEnabledFeatures::imageRenderingPixelatedEnabled() && valueID == C
SSValuePixelated); | 540 return valueID == CSSValueAuto || valueID == CSSValueWebkitOptimizeContr
ast || (RuntimeEnabledFeatures::imageRenderingPixelatedEnabled() && valueID == C
SSValuePixelated); |
539 case CSSPropertyIsolation: // auto | isolate | 541 case CSSPropertyIsolation: // auto | isolate |
540 ASSERT(RuntimeEnabledFeatures::cssCompositingEnabled()); | 542 ASSERT(RuntimeEnabledFeatures::cssCompositingEnabled()); |
541 return valueID == CSSValueAuto || valueID == CSSValueIsolate; | 543 return valueID == CSSValueAuto || valueID == CSSValueIsolate; |
542 case CSSPropertyListStylePosition: // inside | outside | 544 case CSSPropertyListStylePosition: // inside | outside |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1027 if (isColorPropertyID(propertyID)) | 1029 if (isColorPropertyID(propertyID)) |
1028 return parseColor(string, parserMode); | 1030 return parseColor(string, parserMode); |
1029 if (RefPtrWillBeRawPtr<CSSValue> keyword = parseKeywordValue(propertyID, str
ing)) | 1031 if (RefPtrWillBeRawPtr<CSSValue> keyword = parseKeywordValue(propertyID, str
ing)) |
1030 return keyword.release(); | 1032 return keyword.release(); |
1031 if (RefPtrWillBeRawPtr<CSSValue> transform = parseSimpleTransform(propertyID
, string)) | 1033 if (RefPtrWillBeRawPtr<CSSValue> transform = parseSimpleTransform(propertyID
, string)) |
1032 return transform.release(); | 1034 return transform.release(); |
1033 return nullptr; | 1035 return nullptr; |
1034 } | 1036 } |
1035 | 1037 |
1036 } // namespace blink | 1038 } // namespace blink |
OLD | NEW |