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 "core/css/parser/CSSParserFastPaths.h" | 5 #include "core/css/parser/CSSParserFastPaths.h" |
6 | 6 |
7 #include "core/StylePropertyShorthand.h" | 7 #include "core/StylePropertyShorthand.h" |
8 #include "core/css/CSSColorValue.h" | 8 #include "core/css/CSSColorValue.h" |
9 #include "core/css/CSSFunctionValue.h" | 9 #include "core/css/CSSFunctionValue.h" |
10 #include "core/css/CSSIdentifierValue.h" | 10 #include "core/css/CSSIdentifierValue.h" |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
503 return valueID == CSSValueAuto || valueID == CSSValueAlphabetic || | 503 return valueID == CSSValueAuto || valueID == CSSValueAlphabetic || |
504 valueID == CSSValueBaseline || valueID == CSSValueMiddle || | 504 valueID == CSSValueBaseline || valueID == CSSValueMiddle || |
505 (valueID >= CSSValueBeforeEdge && valueID <= CSSValueMathematical); | 505 (valueID >= CSSValueBeforeEdge && valueID <= CSSValueMathematical); |
506 case CSSPropertyAll: | 506 case CSSPropertyAll: |
507 return false; // Only accepts css-wide keywords | 507 return false; // Only accepts css-wide keywords |
508 case CSSPropertyBackgroundRepeatX: // repeat | no-repeat | 508 case CSSPropertyBackgroundRepeatX: // repeat | no-repeat |
509 case CSSPropertyBackgroundRepeatY: // repeat | no-repeat | 509 case CSSPropertyBackgroundRepeatY: // repeat | no-repeat |
510 return valueID == CSSValueRepeat || valueID == CSSValueNoRepeat; | 510 return valueID == CSSValueRepeat || valueID == CSSValueNoRepeat; |
511 case CSSPropertyBorderCollapse: // collapse | separate | 511 case CSSPropertyBorderCollapse: // collapse | separate |
512 return valueID == CSSValueCollapse || valueID == CSSValueSeparate; | 512 return valueID == CSSValueCollapse || valueID == CSSValueSeparate; |
513 case CSSPropertyBorderTopStyle: // <border-style> | 513 case CSSPropertyBorderTopStyle: // <border-style> |
Timothy Loh
2016/10/06 07:21:01
This one is weird, maybe move it to before the ret
rune
2016/10/06 07:36:06
I just removed it completely.
| |
514 case CSSPropertyBorderRightStyle: // Defined as: none | hidden | dotted | d ashed | | 514 case CSSPropertyBorderRightStyle: // Defined as: none | hidden | dotted | |
515 case CSSPropertyBorderBottomStyle: // solid | double | groove | ridge | ins et | outset | 515 // dashed | |
516 case CSSPropertyBorderBottomStyle: // solid | double | groove | ridge | | |
517 // inset | outset | |
516 case CSSPropertyBorderLeftStyle: | 518 case CSSPropertyBorderLeftStyle: |
517 case CSSPropertyWebkitBorderAfterStyle: | 519 case CSSPropertyWebkitBorderAfterStyle: |
518 case CSSPropertyWebkitBorderBeforeStyle: | 520 case CSSPropertyWebkitBorderBeforeStyle: |
519 case CSSPropertyWebkitBorderEndStyle: | 521 case CSSPropertyWebkitBorderEndStyle: |
520 case CSSPropertyWebkitBorderStartStyle: | 522 case CSSPropertyWebkitBorderStartStyle: |
521 case CSSPropertyColumnRuleStyle: | 523 case CSSPropertyColumnRuleStyle: |
522 return valueID >= CSSValueNone && valueID <= CSSValueDouble; | 524 return valueID >= CSSValueNone && valueID <= CSSValueDouble; |
523 case CSSPropertyBoxSizing: | 525 case CSSPropertyBoxSizing: |
524 return valueID == CSSValueBorderBox || valueID == CSSValueContentBox; | 526 return valueID == CSSValueBorderBox || valueID == CSSValueContentBox; |
525 case CSSPropertyBufferedRendering: | 527 case CSSPropertyBufferedRendering: |
(...skipping 11 matching lines...) Expand all Loading... | |
537 case CSSPropertyColorInterpolation: | 539 case CSSPropertyColorInterpolation: |
538 case CSSPropertyColorInterpolationFilters: | 540 case CSSPropertyColorInterpolationFilters: |
539 return valueID == CSSValueAuto || valueID == CSSValueSRGB || | 541 return valueID == CSSValueAuto || valueID == CSSValueSRGB || |
540 valueID == CSSValueLinearRGB; | 542 valueID == CSSValueLinearRGB; |
541 case CSSPropertyColorRendering: | 543 case CSSPropertyColorRendering: |
542 return valueID == CSSValueAuto || valueID == CSSValueOptimizeSpeed || | 544 return valueID == CSSValueAuto || valueID == CSSValueOptimizeSpeed || |
543 valueID == CSSValueOptimizeQuality; | 545 valueID == CSSValueOptimizeQuality; |
544 case CSSPropertyDirection: // ltr | rtl | 546 case CSSPropertyDirection: // ltr | rtl |
545 return valueID == CSSValueLtr || valueID == CSSValueRtl; | 547 return valueID == CSSValueLtr || valueID == CSSValueRtl; |
546 case CSSPropertyDisplay: | 548 case CSSPropertyDisplay: |
547 // inline | block | list-item | inline-block | table | | 549 // inline | block | list-item | inline-block | table | inline-table | |
548 // inline-table | table-row-group | table-header-group | table-footer-grou p | table-row | | 550 // table-row-group | table-header-group | table-footer-group | table-row | |
549 // table-column-group | table-column | table-cell | table-caption | -webki t-box | -webkit-inline-box | none | 551 // table-column-group | table-column | table-cell | table-caption | |
550 // flex | inline-flex | -webkit-flex | -webkit-inline-flex | grid | inline -grid | 552 // -webkit-box | -webkit-inline-box | none | flex | inline-flex | |
553 // -webkit-flex | -webkit-inline-flex | grid | inline-grid | |
551 return (valueID >= CSSValueInline && valueID <= CSSValueInlineFlex) || | 554 return (valueID >= CSSValueInline && valueID <= CSSValueInlineFlex) || |
552 valueID == CSSValueWebkitFlex || | 555 valueID == CSSValueWebkitFlex || |
553 valueID == CSSValueWebkitInlineFlex || valueID == CSSValueNone || | 556 valueID == CSSValueWebkitInlineFlex || valueID == CSSValueNone || |
554 (RuntimeEnabledFeatures::cssGridLayoutEnabled() && | 557 (RuntimeEnabledFeatures::cssGridLayoutEnabled() && |
555 (valueID == CSSValueGrid || valueID == CSSValueInlineGrid)); | 558 (valueID == CSSValueGrid || valueID == CSSValueInlineGrid)); |
556 case CSSPropertyDominantBaseline: | 559 case CSSPropertyDominantBaseline: |
557 // auto | use-script | no-change | reset-size | ideographic | | 560 // auto | use-script | no-change | reset-size | ideographic | alphabetic | |
558 // alphabetic | hanging | mathematical | central | middle | | 561 // hanging | mathematical | central | middle | text-after-edge | |
559 // text-after-edge | text-before-edge | 562 // text-before-edge |
560 return valueID == CSSValueAuto || valueID == CSSValueAlphabetic || | 563 return valueID == CSSValueAuto || valueID == CSSValueAlphabetic || |
561 valueID == CSSValueMiddle || | 564 valueID == CSSValueMiddle || |
562 (valueID >= CSSValueUseScript && valueID <= CSSValueResetSize) || | 565 (valueID >= CSSValueUseScript && valueID <= CSSValueResetSize) || |
563 (valueID >= CSSValueCentral && valueID <= CSSValueMathematical); | 566 (valueID >= CSSValueCentral && valueID <= CSSValueMathematical); |
564 case CSSPropertyEmptyCells: // show | hide | 567 case CSSPropertyEmptyCells: // show | hide |
565 return valueID == CSSValueShow || valueID == CSSValueHide; | 568 return valueID == CSSValueShow || valueID == CSSValueHide; |
566 case CSSPropertyFloat: // left | right | none | 569 case CSSPropertyFloat: // left | right | none |
567 return valueID == CSSValueLeft || valueID == CSSValueRight || | 570 return valueID == CSSValueLeft || valueID == CSSValueRight || |
568 valueID == CSSValueNone; | 571 valueID == CSSValueNone; |
569 case CSSPropertyFontStyle: // normal | italic | oblique | 572 case CSSPropertyFontStyle: // normal | italic | oblique |
570 return valueID == CSSValueNormal || valueID == CSSValueItalic || | 573 return valueID == CSSValueNormal || valueID == CSSValueItalic || |
571 valueID == CSSValueOblique; | 574 valueID == CSSValueOblique; |
572 case CSSPropertyFontStretch: // normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra -expanded | 575 case CSSPropertyFontStretch: // normal | ultra-condensed | extra-condensed |
576 // | condensed | semi-condensed | | |
577 // semi-expanded | expanded | extra-expanded | | |
578 // ultra-expanded | |
573 return valueID == CSSValueNormal || (valueID >= CSSValueUltraCondensed && | 579 return valueID == CSSValueNormal || (valueID >= CSSValueUltraCondensed && |
574 valueID <= CSSValueUltraExpanded); | 580 valueID <= CSSValueUltraExpanded); |
575 case CSSPropertyImageRendering: // auto | optimizeContrast | pixelated | 581 case CSSPropertyImageRendering: // auto | optimizeContrast | pixelated |
576 return valueID == CSSValueAuto || | 582 return valueID == CSSValueAuto || |
577 valueID == CSSValueWebkitOptimizeContrast || | 583 valueID == CSSValueWebkitOptimizeContrast || |
578 valueID == CSSValuePixelated; | 584 valueID == CSSValuePixelated; |
579 case CSSPropertyIsolation: // auto | isolate | 585 case CSSPropertyIsolation: // auto | isolate |
580 return valueID == CSSValueAuto || valueID == CSSValueIsolate; | 586 return valueID == CSSValueAuto || valueID == CSSValueIsolate; |
581 case CSSPropertyListStylePosition: // inside | outside | 587 case CSSPropertyListStylePosition: // inside | outside |
582 return valueID == CSSValueInside || valueID == CSSValueOutside; | 588 return valueID == CSSValueInside || valueID == CSSValueOutside; |
(...skipping 14 matching lines...) Expand all Loading... | |
597 case CSSPropertyOverflowAnchor: | 603 case CSSPropertyOverflowAnchor: |
598 return valueID == CSSValueVisible || valueID == CSSValueNone || | 604 return valueID == CSSValueVisible || valueID == CSSValueNone || |
599 valueID == CSSValueAuto; | 605 valueID == CSSValueAuto; |
600 case CSSPropertyOverflowWrap: // normal | break-word | 606 case CSSPropertyOverflowWrap: // normal | break-word |
601 case CSSPropertyWordWrap: | 607 case CSSPropertyWordWrap: |
602 return valueID == CSSValueNormal || valueID == CSSValueBreakWord; | 608 return valueID == CSSValueNormal || valueID == CSSValueBreakWord; |
603 case CSSPropertyOverflowX: // visible | hidden | scroll | auto | overlay | 609 case CSSPropertyOverflowX: // visible | hidden | scroll | auto | overlay |
604 return valueID == CSSValueVisible || valueID == CSSValueHidden || | 610 return valueID == CSSValueVisible || valueID == CSSValueHidden || |
605 valueID == CSSValueScroll || valueID == CSSValueAuto || | 611 valueID == CSSValueScroll || valueID == CSSValueAuto || |
606 valueID == CSSValueOverlay; | 612 valueID == CSSValueOverlay; |
607 case CSSPropertyOverflowY: // visible | hidden | scroll | auto | overlay | -webkit-paged-x | -webkit-paged-y | 613 case CSSPropertyOverflowY: // visible | hidden | scroll | auto | overlay | |
Timothy Loh
2016/10/06 07:21:01
We should really just delete the completely redund
| |
614 // -webkit-paged-x | -webkit-paged-y | |
608 return valueID == CSSValueVisible || valueID == CSSValueHidden || | 615 return valueID == CSSValueVisible || valueID == CSSValueHidden || |
609 valueID == CSSValueScroll || valueID == CSSValueAuto || | 616 valueID == CSSValueScroll || valueID == CSSValueAuto || |
610 valueID == CSSValueOverlay || valueID == CSSValueWebkitPagedX || | 617 valueID == CSSValueOverlay || valueID == CSSValueWebkitPagedX || |
611 valueID == CSSValueWebkitPagedY; | 618 valueID == CSSValueWebkitPagedY; |
612 case CSSPropertyBreakAfter: | 619 case CSSPropertyBreakAfter: |
613 case CSSPropertyBreakBefore: | 620 case CSSPropertyBreakBefore: |
614 return valueID == CSSValueAuto || valueID == CSSValueAvoid || | 621 return valueID == CSSValueAuto || valueID == CSSValueAvoid || |
615 valueID == CSSValueAvoidPage || valueID == CSSValuePage || | 622 valueID == CSSValueAvoidPage || valueID == CSSValuePage || |
616 valueID == CSSValueLeft || valueID == CSSValueRight || | 623 valueID == CSSValueLeft || valueID == CSSValueRight || |
617 valueID == CSSValueRecto || valueID == CSSValueVerso || | 624 valueID == CSSValueRecto || valueID == CSSValueVerso || |
(...skipping 17 matching lines...) Expand all Loading... | |
635 return valueID == CSSValueNone || valueID == CSSValueBoth || | 642 return valueID == CSSValueNone || valueID == CSSValueBoth || |
636 valueID == CSSValueHorizontal || valueID == CSSValueVertical || | 643 valueID == CSSValueHorizontal || valueID == CSSValueVertical || |
637 valueID == CSSValueAuto; | 644 valueID == CSSValueAuto; |
638 case CSSPropertyScrollBehavior: // auto | smooth | 645 case CSSPropertyScrollBehavior: // auto | smooth |
639 ASSERT(RuntimeEnabledFeatures::cssomSmoothScrollEnabled()); | 646 ASSERT(RuntimeEnabledFeatures::cssomSmoothScrollEnabled()); |
640 return valueID == CSSValueAuto || valueID == CSSValueSmooth; | 647 return valueID == CSSValueAuto || valueID == CSSValueSmooth; |
641 case CSSPropertyShapeRendering: | 648 case CSSPropertyShapeRendering: |
642 return valueID == CSSValueAuto || valueID == CSSValueOptimizeSpeed || | 649 return valueID == CSSValueAuto || valueID == CSSValueOptimizeSpeed || |
643 valueID == CSSValueCrispEdges || | 650 valueID == CSSValueCrispEdges || |
644 valueID == CSSValueGeometricPrecision; | 651 valueID == CSSValueGeometricPrecision; |
645 case CSSPropertySpeak: // none | normal | spell-out | digits | literal-punc tuation | no-punctuation | 652 case CSSPropertySpeak: // none | normal | spell-out | digits | |
653 // literal-punctuation | no-punctuation | |
646 return valueID == CSSValueNone || valueID == CSSValueNormal || | 654 return valueID == CSSValueNone || valueID == CSSValueNormal || |
647 valueID == CSSValueSpellOut || valueID == CSSValueDigits || | 655 valueID == CSSValueSpellOut || valueID == CSSValueDigits || |
648 valueID == CSSValueLiteralPunctuation || | 656 valueID == CSSValueLiteralPunctuation || |
649 valueID == CSSValueNoPunctuation; | 657 valueID == CSSValueNoPunctuation; |
650 case CSSPropertyStrokeLinejoin: | 658 case CSSPropertyStrokeLinejoin: |
651 return valueID == CSSValueMiter || valueID == CSSValueRound || | 659 return valueID == CSSValueMiter || valueID == CSSValueRound || |
652 valueID == CSSValueBevel; | 660 valueID == CSSValueBevel; |
653 case CSSPropertyStrokeLinecap: | 661 case CSSPropertyStrokeLinecap: |
654 return valueID == CSSValueButt || valueID == CSSValueRound || | 662 return valueID == CSSValueButt || valueID == CSSValueRound || |
655 valueID == CSSValueSquare; | 663 valueID == CSSValueSquare; |
(...skipping 17 matching lines...) Expand all Loading... | |
673 // solid | double | dotted | dashed | wavy | 681 // solid | double | dotted | dashed | wavy |
674 ASSERT(RuntimeEnabledFeatures::css3TextDecorationsEnabled()); | 682 ASSERT(RuntimeEnabledFeatures::css3TextDecorationsEnabled()); |
675 return valueID == CSSValueSolid || valueID == CSSValueDouble || | 683 return valueID == CSSValueSolid || valueID == CSSValueDouble || |
676 valueID == CSSValueDotted || valueID == CSSValueDashed || | 684 valueID == CSSValueDotted || valueID == CSSValueDashed || |
677 valueID == CSSValueWavy; | 685 valueID == CSSValueWavy; |
678 case CSSPropertyTextJustify: | 686 case CSSPropertyTextJustify: |
679 // auto | none | inter-word | distribute | 687 // auto | none | inter-word | distribute |
680 ASSERT(RuntimeEnabledFeatures::css3TextEnabled()); | 688 ASSERT(RuntimeEnabledFeatures::css3TextEnabled()); |
681 return valueID == CSSValueInterWord || valueID == CSSValueDistribute || | 689 return valueID == CSSValueInterWord || valueID == CSSValueDistribute || |
682 valueID == CSSValueAuto || valueID == CSSValueNone; | 690 valueID == CSSValueAuto || valueID == CSSValueNone; |
683 case CSSPropertyTextOrientation: // mixed | upright | sideways | sideways-r ight | 691 case CSSPropertyTextOrientation: // mixed | upright | sideways | |
692 // sideways-right | |
684 return valueID == CSSValueMixed || valueID == CSSValueUpright || | 693 return valueID == CSSValueMixed || valueID == CSSValueUpright || |
685 valueID == CSSValueSideways || valueID == CSSValueSidewaysRight; | 694 valueID == CSSValueSideways || valueID == CSSValueSidewaysRight; |
686 case CSSPropertyWebkitTextOrientation: | 695 case CSSPropertyWebkitTextOrientation: |
687 return valueID == CSSValueSideways || valueID == CSSValueSidewaysRight || | 696 return valueID == CSSValueSideways || valueID == CSSValueSidewaysRight || |
688 valueID == CSSValueVerticalRight || valueID == CSSValueUpright; | 697 valueID == CSSValueVerticalRight || valueID == CSSValueUpright; |
689 case CSSPropertyTextOverflow: // clip | ellipsis | 698 case CSSPropertyTextOverflow: // clip | ellipsis |
690 return valueID == CSSValueClip || valueID == CSSValueEllipsis; | 699 return valueID == CSSValueClip || valueID == CSSValueEllipsis; |
691 case CSSPropertyTextRendering: // auto | optimizeSpeed | optimizeLegibility | geometricPrecision | 700 case CSSPropertyTextRendering: // auto | optimizeSpeed | optimizeLegibility |
701 // | geometricPrecision | |
692 return valueID == CSSValueAuto || valueID == CSSValueOptimizeSpeed || | 702 return valueID == CSSValueAuto || valueID == CSSValueOptimizeSpeed || |
693 valueID == CSSValueOptimizeLegibility || | 703 valueID == CSSValueOptimizeLegibility || |
694 valueID == CSSValueGeometricPrecision; | 704 valueID == CSSValueGeometricPrecision; |
695 case CSSPropertyTextTransform: // capitalize | uppercase | lowercase | none | 705 case CSSPropertyTextTransform: // capitalize | uppercase | lowercase | none |
696 return (valueID >= CSSValueCapitalize && valueID <= CSSValueLowercase) || | 706 return (valueID >= CSSValueCapitalize && valueID <= CSSValueLowercase) || |
697 valueID == CSSValueNone; | 707 valueID == CSSValueNone; |
698 case CSSPropertyUnicodeBidi: | 708 case CSSPropertyUnicodeBidi: |
699 return valueID == CSSValueNormal || valueID == CSSValueEmbed || | 709 return valueID == CSSValueNormal || valueID == CSSValueEmbed || |
700 valueID == CSSValueBidiOverride || | 710 valueID == CSSValueBidiOverride || |
701 valueID == CSSValueWebkitIsolate || | 711 valueID == CSSValueWebkitIsolate || |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
735 return valueID == CSSValueSingle || valueID == CSSValueMultiple; | 745 return valueID == CSSValueSingle || valueID == CSSValueMultiple; |
736 case CSSPropertyWebkitBoxOrient: | 746 case CSSPropertyWebkitBoxOrient: |
737 return valueID == CSSValueHorizontal || valueID == CSSValueVertical || | 747 return valueID == CSSValueHorizontal || valueID == CSSValueVertical || |
738 valueID == CSSValueInlineAxis || valueID == CSSValueBlockAxis; | 748 valueID == CSSValueInlineAxis || valueID == CSSValueBlockAxis; |
739 case CSSPropertyWebkitBoxPack: | 749 case CSSPropertyWebkitBoxPack: |
740 return valueID == CSSValueStart || valueID == CSSValueEnd || | 750 return valueID == CSSValueStart || valueID == CSSValueEnd || |
741 valueID == CSSValueCenter || valueID == CSSValueJustify; | 751 valueID == CSSValueCenter || valueID == CSSValueJustify; |
742 case CSSPropertyColumnFill: | 752 case CSSPropertyColumnFill: |
743 return valueID == CSSValueAuto || valueID == CSSValueBalance; | 753 return valueID == CSSValueAuto || valueID == CSSValueBalance; |
744 case CSSPropertyAlignContent: | 754 case CSSPropertyAlignContent: |
745 // FIXME: Per CSS alignment, this property should accept an optional <over flow-position>. We should share this parsing code with 'justify-self'. | 755 // FIXME: Per CSS alignment, this property should accept an optional |
756 // <overflow-position>. We should share this parsing code with | |
757 // 'justify-self'. | |
746 return valueID == CSSValueFlexStart || valueID == CSSValueFlexEnd || | 758 return valueID == CSSValueFlexStart || valueID == CSSValueFlexEnd || |
747 valueID == CSSValueCenter || valueID == CSSValueSpaceBetween || | 759 valueID == CSSValueCenter || valueID == CSSValueSpaceBetween || |
748 valueID == CSSValueSpaceAround || valueID == CSSValueStretch; | 760 valueID == CSSValueSpaceAround || valueID == CSSValueStretch; |
749 case CSSPropertyAlignItems: | 761 case CSSPropertyAlignItems: |
750 // FIXME: Per CSS alignment, this property should accept the same argument s as 'justify-self' so we should share its parsing code. | 762 // FIXME: Per CSS alignment, this property should accept the same |
763 // arguments as 'justify-self' so we should share its parsing code. | |
751 return valueID == CSSValueFlexStart || valueID == CSSValueFlexEnd || | 764 return valueID == CSSValueFlexStart || valueID == CSSValueFlexEnd || |
752 valueID == CSSValueCenter || valueID == CSSValueBaseline || | 765 valueID == CSSValueCenter || valueID == CSSValueBaseline || |
753 valueID == CSSValueStretch; | 766 valueID == CSSValueStretch; |
754 case CSSPropertyAlignSelf: | 767 case CSSPropertyAlignSelf: |
755 // FIXME: Per CSS alignment, this property should accept the same argument s as 'justify-self' so we should share its parsing code. | 768 // FIXME: Per CSS alignment, this property should accept the same |
769 // arguments as 'justify-self' so we should share its parsing code. | |
756 return valueID == CSSValueAuto || valueID == CSSValueFlexStart || | 770 return valueID == CSSValueAuto || valueID == CSSValueFlexStart || |
757 valueID == CSSValueFlexEnd || valueID == CSSValueCenter || | 771 valueID == CSSValueFlexEnd || valueID == CSSValueCenter || |
758 valueID == CSSValueBaseline || valueID == CSSValueStretch; | 772 valueID == CSSValueBaseline || valueID == CSSValueStretch; |
759 case CSSPropertyFlexDirection: | 773 case CSSPropertyFlexDirection: |
760 return valueID == CSSValueRow || valueID == CSSValueRowReverse || | 774 return valueID == CSSValueRow || valueID == CSSValueRowReverse || |
761 valueID == CSSValueColumn || valueID == CSSValueColumnReverse; | 775 valueID == CSSValueColumn || valueID == CSSValueColumnReverse; |
762 case CSSPropertyFlexWrap: | 776 case CSSPropertyFlexWrap: |
763 return valueID == CSSValueNowrap || valueID == CSSValueWrap || | 777 return valueID == CSSValueNowrap || valueID == CSSValueWrap || |
764 valueID == CSSValueWrapReverse; | 778 valueID == CSSValueWrapReverse; |
765 case CSSPropertyHyphens: | 779 case CSSPropertyHyphens: |
766 #if OS(ANDROID) || OS(MACOSX) | 780 #if OS(ANDROID) || OS(MACOSX) |
767 return valueID == CSSValueAuto || valueID == CSSValueNone || | 781 return valueID == CSSValueAuto || valueID == CSSValueNone || |
768 valueID == CSSValueManual; | 782 valueID == CSSValueManual; |
769 #else | 783 #else |
770 return valueID == CSSValueNone || valueID == CSSValueManual; | 784 return valueID == CSSValueNone || valueID == CSSValueManual; |
771 #endif | 785 #endif |
772 case CSSPropertyJustifyContent: | 786 case CSSPropertyJustifyContent: |
773 // FIXME: Per CSS alignment, this property should accept an optional <over flow-position>. We should share this parsing code with 'justify-self'. | 787 // FIXME: Per CSS alignment, this property should accept an optional |
788 // <overflow-position>. We should share this parsing code with | |
789 // 'justify-self'. | |
774 return valueID == CSSValueFlexStart || valueID == CSSValueFlexEnd || | 790 return valueID == CSSValueFlexStart || valueID == CSSValueFlexEnd || |
775 valueID == CSSValueCenter || valueID == CSSValueSpaceBetween || | 791 valueID == CSSValueCenter || valueID == CSSValueSpaceBetween || |
776 valueID == CSSValueSpaceAround; | 792 valueID == CSSValueSpaceAround; |
777 case CSSPropertyFontKerning: | 793 case CSSPropertyFontKerning: |
778 return valueID == CSSValueAuto || valueID == CSSValueNormal || | 794 return valueID == CSSValueAuto || valueID == CSSValueNormal || |
779 valueID == CSSValueNone; | 795 valueID == CSSValueNone; |
780 case CSSPropertyWebkitFontSmoothing: | 796 case CSSPropertyWebkitFontSmoothing: |
781 return valueID == CSSValueAuto || valueID == CSSValueNone || | 797 return valueID == CSSValueAuto || valueID == CSSValueNone || |
782 valueID == CSSValueAntialiased || | 798 valueID == CSSValueAntialiased || |
783 valueID == CSSValueSubpixelAntialiased; | 799 valueID == CSSValueSubpixelAntialiased; |
784 case CSSPropertyWebkitLineBreak: // auto | loose | normal | strict | after- white-space | 800 case CSSPropertyWebkitLineBreak: // auto | loose | normal | strict | |
801 // after-white-space | |
785 return valueID == CSSValueAuto || valueID == CSSValueLoose || | 802 return valueID == CSSValueAuto || valueID == CSSValueLoose || |
786 valueID == CSSValueNormal || valueID == CSSValueStrict || | 803 valueID == CSSValueNormal || valueID == CSSValueStrict || |
787 valueID == CSSValueAfterWhiteSpace; | 804 valueID == CSSValueAfterWhiteSpace; |
788 case CSSPropertyWebkitMarginAfterCollapse: | 805 case CSSPropertyWebkitMarginAfterCollapse: |
789 case CSSPropertyWebkitMarginBeforeCollapse: | 806 case CSSPropertyWebkitMarginBeforeCollapse: |
790 case CSSPropertyWebkitMarginBottomCollapse: | 807 case CSSPropertyWebkitMarginBottomCollapse: |
791 case CSSPropertyWebkitMarginTopCollapse: | 808 case CSSPropertyWebkitMarginTopCollapse: |
792 return valueID == CSSValueCollapse || valueID == CSSValueSeparate || | 809 return valueID == CSSValueCollapse || valueID == CSSValueSeparate || |
793 valueID == CSSValueDiscard; | 810 valueID == CSSValueDiscard; |
794 case CSSPropertyWebkitPrintColorAdjust: | 811 case CSSPropertyWebkitPrintColorAdjust: |
(...skipping 25 matching lines...) Expand all Loading... | |
820 case CSSPropertyWritingMode: | 837 case CSSPropertyWritingMode: |
821 return valueID == CSSValueHorizontalTb || valueID == CSSValueVerticalRl || | 838 return valueID == CSSValueHorizontalTb || valueID == CSSValueVerticalRl || |
822 valueID == CSSValueVerticalLr || valueID == CSSValueLrTb || | 839 valueID == CSSValueVerticalLr || valueID == CSSValueLrTb || |
823 valueID == CSSValueRlTb || valueID == CSSValueTbRl || | 840 valueID == CSSValueRlTb || valueID == CSSValueTbRl || |
824 valueID == CSSValueLr || valueID == CSSValueRl || | 841 valueID == CSSValueLr || valueID == CSSValueRl || |
825 valueID == CSSValueTb; | 842 valueID == CSSValueTb; |
826 case CSSPropertyWhiteSpace: // normal | pre | nowrap | 843 case CSSPropertyWhiteSpace: // normal | pre | nowrap |
827 return valueID == CSSValueNormal || valueID == CSSValuePre || | 844 return valueID == CSSValueNormal || valueID == CSSValuePre || |
828 valueID == CSSValuePreWrap || valueID == CSSValuePreLine || | 845 valueID == CSSValuePreWrap || valueID == CSSValuePreLine || |
829 valueID == CSSValueNowrap; | 846 valueID == CSSValueNowrap; |
830 case CSSPropertyWordBreak: // normal | break-all | keep-all | break-word (t his is a custom extension) | 847 case CSSPropertyWordBreak: // normal | break-all | keep-all | break-word |
848 // (this is a custom extension) | |
831 return valueID == CSSValueNormal || valueID == CSSValueBreakAll || | 849 return valueID == CSSValueNormal || valueID == CSSValueBreakAll || |
832 valueID == CSSValueKeepAll || valueID == CSSValueBreakWord; | 850 valueID == CSSValueKeepAll || valueID == CSSValueBreakWord; |
833 case CSSPropertyScrollSnapType: // none | mandatory | proximity | 851 case CSSPropertyScrollSnapType: // none | mandatory | proximity |
834 ASSERT(RuntimeEnabledFeatures::cssScrollSnapPointsEnabled()); | 852 ASSERT(RuntimeEnabledFeatures::cssScrollSnapPointsEnabled()); |
835 return valueID == CSSValueNone || valueID == CSSValueMandatory || | 853 return valueID == CSSValueNone || valueID == CSSValueMandatory || |
836 valueID == CSSValueProximity; | 854 valueID == CSSValueProximity; |
837 default: | 855 default: |
838 ASSERT_NOT_REACHED(); | 856 ASSERT_NOT_REACHED(); |
839 return false; | 857 return false; |
840 } | 858 } |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1208 if (isColorPropertyID(propertyID)) | 1226 if (isColorPropertyID(propertyID)) |
1209 return parseColor(string, parserMode); | 1227 return parseColor(string, parserMode); |
1210 if (CSSValue* keyword = parseKeywordValue(propertyID, string, parserMode)) | 1228 if (CSSValue* keyword = parseKeywordValue(propertyID, string, parserMode)) |
1211 return keyword; | 1229 return keyword; |
1212 if (CSSValue* transform = parseSimpleTransform(propertyID, string)) | 1230 if (CSSValue* transform = parseSimpleTransform(propertyID, string)) |
1213 return transform; | 1231 return transform; |
1214 return nullptr; | 1232 return nullptr; |
1215 } | 1233 } |
1216 | 1234 |
1217 } // namespace blink | 1235 } // namespace blink |
OLD | NEW |