Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. |
| 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
| 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
| 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) | 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) |
| 8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. | 8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. |
| 9 * Copyright (C) 2012 Intel Corporation. All rights reserved. | 9 * Copyright (C) 2012 Intel Corporation. All rights reserved. |
| 10 * | 10 * |
| (...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 895 case CSSPropertyWebkitBoxLines: | 895 case CSSPropertyWebkitBoxLines: |
| 896 case CSSPropertyWebkitBoxOrient: | 896 case CSSPropertyWebkitBoxOrient: |
| 897 case CSSPropertyWebkitBoxPack: | 897 case CSSPropertyWebkitBoxPack: |
| 898 case CSSPropertyInternalCallback: | 898 case CSSPropertyInternalCallback: |
| 899 case CSSPropertyWebkitColumnBreakAfter: | 899 case CSSPropertyWebkitColumnBreakAfter: |
| 900 case CSSPropertyWebkitColumnBreakBefore: | 900 case CSSPropertyWebkitColumnBreakBefore: |
| 901 case CSSPropertyWebkitColumnBreakInside: | 901 case CSSPropertyWebkitColumnBreakInside: |
| 902 case CSSPropertyColumnFill: | 902 case CSSPropertyColumnFill: |
| 903 case CSSPropertyWebkitColumnRuleStyle: | 903 case CSSPropertyWebkitColumnRuleStyle: |
| 904 case CSSPropertyAlignContent: | 904 case CSSPropertyAlignContent: |
| 905 case CSSPropertyAlignItems: | |
| 906 case CSSPropertyAlignSelf: | |
| 907 case CSSPropertyFlexDirection: | 905 case CSSPropertyFlexDirection: |
| 908 case CSSPropertyFlexWrap: | 906 case CSSPropertyFlexWrap: |
| 909 case CSSPropertyJustifyContent: | 907 case CSSPropertyJustifyContent: |
| 910 case CSSPropertyFontKerning: | 908 case CSSPropertyFontKerning: |
| 911 case CSSPropertyWebkitFontSmoothing: | 909 case CSSPropertyWebkitFontSmoothing: |
| 912 case CSSPropertyGridAutoFlow: | 910 case CSSPropertyGridAutoFlow: |
| 913 case CSSPropertyWebkitLineAlign: | 911 case CSSPropertyWebkitLineAlign: |
| 914 case CSSPropertyWebkitLineBreak: | 912 case CSSPropertyWebkitLineBreak: |
| 915 case CSSPropertyWebkitLineSnap: | 913 case CSSPropertyWebkitLineSnap: |
| 916 case CSSPropertyWebkitMarginAfterCollapse: | 914 case CSSPropertyWebkitMarginAfterCollapse: |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 933 case CSSPropertyWebkitUserDrag: | 931 case CSSPropertyWebkitUserDrag: |
| 934 case CSSPropertyWebkitUserModify: | 932 case CSSPropertyWebkitUserModify: |
| 935 case CSSPropertyWebkitUserSelect: | 933 case CSSPropertyWebkitUserSelect: |
| 936 case CSSPropertyWebkitWrapFlow: | 934 case CSSPropertyWebkitWrapFlow: |
| 937 case CSSPropertyWebkitWrapThrough: | 935 case CSSPropertyWebkitWrapThrough: |
| 938 case CSSPropertyWebkitWritingMode: | 936 case CSSPropertyWebkitWritingMode: |
| 939 case CSSPropertyWhiteSpace: | 937 case CSSPropertyWhiteSpace: |
| 940 case CSSPropertyWordBreak: | 938 case CSSPropertyWordBreak: |
| 941 case CSSPropertyWordWrap: | 939 case CSSPropertyWordWrap: |
| 942 return true; | 940 return true; |
| 941 case CSSPropertyAlignItems: | |
| 942 case CSSPropertyAlignSelf: | |
| 943 return !RuntimeEnabledFeatures::cssGridLayoutEnabled(); | |
| 943 default: | 944 default: |
| 944 return false; | 945 return false; |
| 945 } | 946 } |
| 946 } | 947 } |
| 947 | 948 |
| 948 static bool parseKeywordValue(MutableStylePropertySet* declaration, CSSPropertyI D propertyId, const String& string, bool important, const CSSParserContext& pars erContext) | 949 static bool parseKeywordValue(MutableStylePropertySet* declaration, CSSPropertyI D propertyId, const String& string, bool important, const CSSParserContext& pars erContext) |
| 949 { | 950 { |
| 950 ASSERT(!string.isEmpty()); | 951 ASSERT(!string.isEmpty()); |
| 951 | 952 |
| 952 if (!isKeywordPropertyID(propertyId)) { | 953 if (!isKeywordPropertyID(propertyId)) { |
| (...skipping 1774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2727 validPrimitive = (RuntimeEnabledFeatures::cssShapesEnabled() && !id && v alidUnit(value, FLength | FNonNeg)); | 2728 validPrimitive = (RuntimeEnabledFeatures::cssShapesEnabled() && !id && v alidUnit(value, FLength | FNonNeg)); |
| 2728 break; | 2729 break; |
| 2729 case CSSPropertyShapeImageThreshold: | 2730 case CSSPropertyShapeImageThreshold: |
| 2730 validPrimitive = (RuntimeEnabledFeatures::cssShapesEnabled() && !id && v alidUnit(value, FNumber)); | 2731 validPrimitive = (RuntimeEnabledFeatures::cssShapesEnabled() && !id && v alidUnit(value, FNumber)); |
| 2731 break; | 2732 break; |
| 2732 | 2733 |
| 2733 case CSSPropertyTouchAction: | 2734 case CSSPropertyTouchAction: |
| 2734 // auto | none | [pan-x || pan-y] | 2735 // auto | none | [pan-x || pan-y] |
| 2735 return parseTouchAction(important); | 2736 return parseTouchAction(important); |
| 2736 | 2737 |
| 2738 case CSSPropertyAlignSelf: | |
| 2739 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); | |
|
ojan
2014/01/15 01:16:51
I'm confused, don't align-self and align-items als
Julien - ping for review
2014/01/15 19:10:23
You are totally right. This patch forks the parsin
| |
| 2740 return parseItemPositionOverflowPosition(propId, important); | |
| 2741 | |
| 2742 case CSSPropertyAlignItems: | |
| 2743 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); | |
| 2744 return parseItemPositionOverflowPosition(propId, important); | |
| 2745 | |
| 2737 case CSSPropertyBorderBottomStyle: | 2746 case CSSPropertyBorderBottomStyle: |
| 2738 case CSSPropertyBorderCollapse: | 2747 case CSSPropertyBorderCollapse: |
| 2739 case CSSPropertyBorderLeftStyle: | 2748 case CSSPropertyBorderLeftStyle: |
| 2740 case CSSPropertyBorderRightStyle: | 2749 case CSSPropertyBorderRightStyle: |
| 2741 case CSSPropertyBorderTopStyle: | 2750 case CSSPropertyBorderTopStyle: |
| 2742 case CSSPropertyBoxSizing: | 2751 case CSSPropertyBoxSizing: |
| 2743 case CSSPropertyCaptionSide: | 2752 case CSSPropertyCaptionSide: |
| 2744 case CSSPropertyClear: | 2753 case CSSPropertyClear: |
| 2745 case CSSPropertyDirection: | 2754 case CSSPropertyDirection: |
| 2746 case CSSPropertyDisplay: | 2755 case CSSPropertyDisplay: |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2790 case CSSPropertyWebkitBoxLines: | 2799 case CSSPropertyWebkitBoxLines: |
| 2791 case CSSPropertyWebkitBoxOrient: | 2800 case CSSPropertyWebkitBoxOrient: |
| 2792 case CSSPropertyWebkitBoxPack: | 2801 case CSSPropertyWebkitBoxPack: |
| 2793 case CSSPropertyInternalCallback: | 2802 case CSSPropertyInternalCallback: |
| 2794 case CSSPropertyWebkitColumnBreakAfter: | 2803 case CSSPropertyWebkitColumnBreakAfter: |
| 2795 case CSSPropertyWebkitColumnBreakBefore: | 2804 case CSSPropertyWebkitColumnBreakBefore: |
| 2796 case CSSPropertyWebkitColumnBreakInside: | 2805 case CSSPropertyWebkitColumnBreakInside: |
| 2797 case CSSPropertyColumnFill: | 2806 case CSSPropertyColumnFill: |
| 2798 case CSSPropertyWebkitColumnRuleStyle: | 2807 case CSSPropertyWebkitColumnRuleStyle: |
| 2799 case CSSPropertyAlignContent: | 2808 case CSSPropertyAlignContent: |
| 2800 case CSSPropertyAlignItems: | |
| 2801 case CSSPropertyAlignSelf: | |
| 2802 case CSSPropertyFlexDirection: | 2809 case CSSPropertyFlexDirection: |
| 2803 case CSSPropertyFlexWrap: | 2810 case CSSPropertyFlexWrap: |
| 2804 case CSSPropertyJustifyContent: | 2811 case CSSPropertyJustifyContent: |
| 2805 case CSSPropertyFontKerning: | 2812 case CSSPropertyFontKerning: |
| 2806 case CSSPropertyWebkitFontSmoothing: | 2813 case CSSPropertyWebkitFontSmoothing: |
| 2807 case CSSPropertyGridAutoFlow: | 2814 case CSSPropertyGridAutoFlow: |
| 2808 case CSSPropertyWebkitLineAlign: | 2815 case CSSPropertyWebkitLineAlign: |
| 2809 case CSSPropertyWebkitLineBreak: | 2816 case CSSPropertyWebkitLineBreak: |
| 2810 case CSSPropertyWebkitLineSnap: | 2817 case CSSPropertyWebkitLineSnap: |
| 2811 case CSSPropertyWebkitMarginAfterCollapse: | 2818 case CSSPropertyWebkitMarginAfterCollapse: |
| (...skipping 7349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 10161 { | 10168 { |
| 10162 // The tokenizer checks for the construct of an+b. | 10169 // The tokenizer checks for the construct of an+b. |
| 10163 // However, since the {ident} rule precedes the {nth} rule, some of those | 10170 // However, since the {ident} rule precedes the {nth} rule, some of those |
| 10164 // tokens are identified as string literal. Furthermore we need to accept | 10171 // tokens are identified as string literal. Furthermore we need to accept |
| 10165 // "odd" and "even" which does not match to an+b. | 10172 // "odd" and "even" which does not match to an+b. |
| 10166 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") | 10173 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") |
| 10167 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); | 10174 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); |
| 10168 } | 10175 } |
| 10169 | 10176 |
| 10170 } | 10177 } |
| OLD | NEW |