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 2100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2111 validPrimitive = true; | 2111 validPrimitive = true; |
2112 break; | 2112 break; |
2113 case CSSPropertyFontFamily: | 2113 case CSSPropertyFontFamily: |
2114 // [[ <family-name> | <generic-family> ],]* [<family-name> | <generic-fa mily>] | inherit | 2114 // [[ <family-name> | <generic-family> ],]* [<family-name> | <generic-fa mily>] | inherit |
2115 { | 2115 { |
2116 parsedValue = parseFontFamily(); | 2116 parsedValue = parseFontFamily(); |
2117 break; | 2117 break; |
2118 } | 2118 } |
2119 | 2119 |
2120 case CSSPropertyTextDecoration: | 2120 case CSSPropertyTextDecoration: |
2121 // Fall through to CSS2.1 implementation if runtime feature is disabled. | |
2122 if (RuntimeEnabledFeatures::css3TextDecorationsEnabled()) { | |
2123 // [ <text-decoration-line> || <text-decoration-style> || <text-deco ration-color> ] | inherit | |
2124 return parseShorthand(CSSPropertyTextDecoration, textDecorationShort hand(), important); | |
2125 } | |
2121 case CSSPropertyWebkitTextDecorationsInEffect: | 2126 case CSSPropertyWebkitTextDecorationsInEffect: |
2122 case CSSPropertyTextDecorationLine: | 2127 case CSSPropertyTextDecorationLine: |
2123 // none | [ underline || overline || line-through || blink ] | inherit | 2128 // none | [ underline || overline || line-through || blink ] | inherit |
2124 return parseTextDecoration(propId, important); | 2129 return parseTextDecoration(propId, important); |
2125 | 2130 |
2126 case CSSPropertyTextDecorationStyle: | 2131 case CSSPropertyTextDecorationStyle: |
2127 // solid | double | dotted | dashed | wavy | 2132 // solid | double | dotted | dashed | wavy |
2128 if (RuntimeEnabledFeatures::css3TextDecorationsEnabled() | 2133 if (RuntimeEnabledFeatures::css3TextDecorationsEnabled() |
2129 && (id == CSSValueSolid || id == CSSValueDouble || id == CSSValueDot ted || id == CSSValueDashed || id == CSSValueWavy)) | 2134 && (id == CSSValueSolid || id == CSSValueDouble || id == CSSValueDot ted || id == CSSValueDashed || id == CSSValueWavy)) |
2130 validPrimitive = true; | 2135 validPrimitive = true; |
(...skipping 6675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
8806 list->append(cssValuePool().createIdentifierValue(value->id)); | 8811 list->append(cssValuePool().createIdentifierValue(value->id)); |
8807 break; | 8812 break; |
8808 default: | 8813 default: |
8809 isValid = false; | 8814 isValid = false; |
8810 break; | 8815 break; |
8811 } | 8816 } |
8812 if (isValid) | 8817 if (isValid) |
8813 value = m_valueList->next(); | 8818 value = m_valueList->next(); |
8814 } | 8819 } |
8815 | 8820 |
8816 if (list->length() && isValid) { | 8821 // Values are either valid or in shorthand scope. |
8822 if (list->length() && (isValid || inShorthand())) { | |
Julien - ping for review
2013/07/27 01:46:35
Is it totally right to allow an empty list of keyw
abinader
2013/07/28 04:21:52
If I understood your question correctly, you are q
Julien - ping for review
2013/07/29 18:53:11
Ah, that's not really what I meant (sorry for bein
abinader
2013/07/29 21:15:32
Ah, I see your point now :) no, this function is n
| |
8817 addTextDecorationProperty(propId, list.release(), important); | 8823 addTextDecorationProperty(propId, list.release(), important); |
8818 return true; | 8824 return true; |
8819 } | 8825 } |
8820 | 8826 |
8821 return false; | 8827 return false; |
8822 } | 8828 } |
8823 | 8829 |
8824 #if ENABLE(CSS3_TEXT) | 8830 #if ENABLE(CSS3_TEXT) |
8825 bool CSSParser::parseTextUnderlinePosition(bool important) | 8831 bool CSSParser::parseTextUnderlinePosition(bool important) |
8826 { | 8832 { |
(...skipping 2846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
11673 { | 11679 { |
11674 // The tokenizer checks for the construct of an+b. | 11680 // The tokenizer checks for the construct of an+b. |
11675 // However, since the {ident} rule precedes the {nth} rule, some of those | 11681 // However, since the {ident} rule precedes the {nth} rule, some of those |
11676 // tokens are identified as string literal. Furthermore we need to accept | 11682 // tokens are identified as string literal. Furthermore we need to accept |
11677 // "odd" and "even" which does not match to an+b. | 11683 // "odd" and "even" which does not match to an+b. |
11678 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") | 11684 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") |
11679 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); | 11685 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); |
11680 } | 11686 } |
11681 | 11687 |
11682 } | 11688 } |
OLD | NEW |