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 2095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2106 validPrimitive = true; | 2106 validPrimitive = true; |
2107 break; | 2107 break; |
2108 case CSSPropertyFontFamily: | 2108 case CSSPropertyFontFamily: |
2109 // [[ <family-name> | <generic-family> ],]* [<family-name> | <generic-fa
mily>] | inherit | 2109 // [[ <family-name> | <generic-family> ],]* [<family-name> | <generic-fa
mily>] | inherit |
2110 { | 2110 { |
2111 parsedValue = parseFontFamily(); | 2111 parsedValue = parseFontFamily(); |
2112 break; | 2112 break; |
2113 } | 2113 } |
2114 | 2114 |
2115 case CSSPropertyTextDecoration: | 2115 case CSSPropertyTextDecoration: |
| 2116 // Fall through 'text-decoration-line' parsing if CSS 3 Text Decoration |
| 2117 // is disabled to match CSS 2.1 rules for parsing 'text-decoration'. |
| 2118 if (RuntimeEnabledFeatures::css3TextDecorationsEnabled()) { |
| 2119 // [ <text-decoration-line> || <text-decoration-style> || <text-deco
ration-color> ] | inherit |
| 2120 return parseShorthand(CSSPropertyTextDecoration, textDecorationShort
hand(), important); |
| 2121 } |
2116 case CSSPropertyWebkitTextDecorationsInEffect: | 2122 case CSSPropertyWebkitTextDecorationsInEffect: |
2117 case CSSPropertyTextDecorationLine: | 2123 case CSSPropertyTextDecorationLine: |
2118 // none | [ underline || overline || line-through || blink ] | inherit | 2124 // none | [ underline || overline || line-through || blink ] | inherit |
2119 return parseTextDecoration(propId, important); | 2125 return parseTextDecoration(propId, important); |
2120 | 2126 |
2121 case CSSPropertyTextDecorationStyle: | 2127 case CSSPropertyTextDecorationStyle: |
2122 // solid | double | dotted | dashed | wavy | 2128 // solid | double | dotted | dashed | wavy |
2123 if (RuntimeEnabledFeatures::css3TextDecorationsEnabled() | 2129 if (RuntimeEnabledFeatures::css3TextDecorationsEnabled() |
2124 && (id == CSSValueSolid || id == CSSValueDouble || id == CSSValueDot
ted || id == CSSValueDashed || id == CSSValueWavy)) | 2130 && (id == CSSValueSolid || id == CSSValueDouble || id == CSSValueDot
ted || id == CSSValueDashed || id == CSSValueWavy)) |
2125 validPrimitive = true; | 2131 validPrimitive = true; |
(...skipping 6814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8940 list->append(cssValuePool().createIdentifierValue(value->id)); | 8946 list->append(cssValuePool().createIdentifierValue(value->id)); |
8941 break; | 8947 break; |
8942 default: | 8948 default: |
8943 isValid = false; | 8949 isValid = false; |
8944 break; | 8950 break; |
8945 } | 8951 } |
8946 if (isValid) | 8952 if (isValid) |
8947 value = m_valueList->next(); | 8953 value = m_valueList->next(); |
8948 } | 8954 } |
8949 | 8955 |
8950 if (list->length() && isValid) { | 8956 // Values are either valid or in shorthand scope. |
| 8957 if (list->length() && (isValid || inShorthand())) { |
8951 addTextDecorationProperty(propId, list.release(), important); | 8958 addTextDecorationProperty(propId, list.release(), important); |
8952 return true; | 8959 return true; |
8953 } | 8960 } |
8954 | 8961 |
8955 return false; | 8962 return false; |
8956 } | 8963 } |
8957 | 8964 |
8958 #if ENABLE(CSS3_TEXT) | 8965 #if ENABLE(CSS3_TEXT) |
8959 bool CSSParser::parseTextUnderlinePosition(bool important) | 8966 bool CSSParser::parseTextUnderlinePosition(bool important) |
8960 { | 8967 { |
(...skipping 2841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11802 { | 11809 { |
11803 // The tokenizer checks for the construct of an+b. | 11810 // The tokenizer checks for the construct of an+b. |
11804 // However, since the {ident} rule precedes the {nth} rule, some of those | 11811 // However, since the {ident} rule precedes the {nth} rule, some of those |
11805 // tokens are identified as string literal. Furthermore we need to accept | 11812 // tokens are identified as string literal. Furthermore we need to accept |
11806 // "odd" and "even" which does not match to an+b. | 11813 // "odd" and "even" which does not match to an+b. |
11807 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") | 11814 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") |
11808 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); | 11815 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); |
11809 } | 11816 } |
11810 | 11817 |
11811 } | 11818 } |
OLD | NEW |