Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp

Issue 1429713004: Implement CSS font-display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 // auto | use-script | no-change | reset-size | ideographic | 519 // auto | use-script | no-change | reset-size | ideographic |
520 // alphabetic | hanging | mathematical | central | middle | 520 // alphabetic | hanging | mathematical | central | middle |
521 // text-after-edge | text-before-edge 521 // text-after-edge | text-before-edge
522 return valueID == CSSValueAuto || valueID == CSSValueMiddle 522 return valueID == CSSValueAuto || valueID == CSSValueMiddle
523 || (valueID >= CSSValueUseScript && valueID <= CSSValueResetSize) 523 || (valueID >= CSSValueUseScript && valueID <= CSSValueResetSize)
524 || (valueID >= CSSValueCentral && valueID <= CSSValueMathematical); 524 || (valueID >= CSSValueCentral && valueID <= CSSValueMathematical);
525 case CSSPropertyEmptyCells: // show | hide 525 case CSSPropertyEmptyCells: // show | hide
526 return valueID == CSSValueShow || valueID == CSSValueHide; 526 return valueID == CSSValueShow || valueID == CSSValueHide;
527 case CSSPropertyFloat: // left | right | none 527 case CSSPropertyFloat: // left | right | none
528 return valueID == CSSValueLeft || valueID == CSSValueRight || valueID == CSSValueNone; 528 return valueID == CSSValueLeft || valueID == CSSValueRight || valueID == CSSValueNone;
529 case CSSPropertyFontDisplay: // auto | block | swap | fallback | optional
530 return valueID == CSSValueAuto || valueID == CSSValueBlock || valueID == CSSValueSwap || valueID == CSSValueFallback || valueID == CSSValueOptional;
529 case CSSPropertyFontStyle: // normal | italic | oblique 531 case CSSPropertyFontStyle: // normal | italic | oblique
530 return valueID == CSSValueNormal || valueID == CSSValueItalic || valueID == CSSValueOblique; 532 return valueID == CSSValueNormal || valueID == CSSValueItalic || valueID == CSSValueOblique;
531 case CSSPropertyFontStretch: // normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra- expanded 533 case CSSPropertyFontStretch: // normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra- expanded
532 return valueID == CSSValueNormal || (valueID >= CSSValueUltraCondensed & & valueID <= CSSValueUltraExpanded); 534 return valueID == CSSValueNormal || (valueID >= CSSValueUltraCondensed & & valueID <= CSSValueUltraExpanded);
533 case CSSPropertyImageRendering: // auto | optimizeContrast | pixelated 535 case CSSPropertyImageRendering: // auto | optimizeContrast | pixelated
534 return valueID == CSSValueAuto || valueID == CSSValueWebkitOptimizeContr ast || (RuntimeEnabledFeatures::imageRenderingPixelatedEnabled() && valueID == C SSValuePixelated); 536 return valueID == CSSValueAuto || valueID == CSSValueWebkitOptimizeContr ast || (RuntimeEnabledFeatures::imageRenderingPixelatedEnabled() && valueID == C SSValuePixelated);
535 case CSSPropertyIsolation: // auto | isolate 537 case CSSPropertyIsolation: // auto | isolate
536 ASSERT(RuntimeEnabledFeatures::cssCompositingEnabled()); 538 ASSERT(RuntimeEnabledFeatures::cssCompositingEnabled());
537 return valueID == CSSValueAuto || valueID == CSSValueIsolate; 539 return valueID == CSSValueAuto || valueID == CSSValueIsolate;
538 case CSSPropertyListStylePosition: // inside | outside 540 case CSSPropertyListStylePosition: // inside | outside
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
1023 if (isColorPropertyID(propertyID)) 1025 if (isColorPropertyID(propertyID))
1024 return parseColor(string, parserMode); 1026 return parseColor(string, parserMode);
1025 if (RefPtrWillBeRawPtr<CSSValue> keyword = parseKeywordValue(propertyID, str ing)) 1027 if (RefPtrWillBeRawPtr<CSSValue> keyword = parseKeywordValue(propertyID, str ing))
1026 return keyword.release(); 1028 return keyword.release();
1027 if (RefPtrWillBeRawPtr<CSSValue> transform = parseSimpleTransform(propertyID , string)) 1029 if (RefPtrWillBeRawPtr<CSSValue> transform = parseSimpleTransform(propertyID , string))
1028 return transform.release(); 1030 return transform.release();
1029 return nullptr; 1031 return nullptr;
1030 } 1032 }
1031 1033
1032 } // namespace blink 1034 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698