| 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 6880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9006 list->append(cssValuePool().createIdentifierValue(value->id)); | 9012 list->append(cssValuePool().createIdentifierValue(value->id)); |
| 9007 break; | 9013 break; |
| 9008 default: | 9014 default: |
| 9009 isValid = false; | 9015 isValid = false; |
| 9010 break; | 9016 break; |
| 9011 } | 9017 } |
| 9012 if (isValid) | 9018 if (isValid) |
| 9013 value = m_valueList->next(); | 9019 value = m_valueList->next(); |
| 9014 } | 9020 } |
| 9015 | 9021 |
| 9016 if (list->length() && isValid) { | 9022 // Values are either valid or in shorthand scope. |
| 9023 if (list->length() && (isValid || inShorthand())) { |
| 9017 addTextDecorationProperty(propId, list.release(), important); | 9024 addTextDecorationProperty(propId, list.release(), important); |
| 9018 return true; | 9025 return true; |
| 9019 } | 9026 } |
| 9020 | 9027 |
| 9021 return false; | 9028 return false; |
| 9022 } | 9029 } |
| 9023 | 9030 |
| 9024 #if ENABLE(CSS3_TEXT) | 9031 #if ENABLE(CSS3_TEXT) |
| 9025 bool CSSParser::parseTextUnderlinePosition(bool important) | 9032 bool CSSParser::parseTextUnderlinePosition(bool important) |
| 9026 { | 9033 { |
| (...skipping 2890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11917 { | 11924 { |
| 11918 // The tokenizer checks for the construct of an+b. | 11925 // The tokenizer checks for the construct of an+b. |
| 11919 // However, since the {ident} rule precedes the {nth} rule, some of those | 11926 // However, since the {ident} rule precedes the {nth} rule, some of those |
| 11920 // tokens are identified as string literal. Furthermore we need to accept | 11927 // tokens are identified as string literal. Furthermore we need to accept |
| 11921 // "odd" and "even" which does not match to an+b. | 11928 // "odd" and "even" which does not match to an+b. |
| 11922 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") | 11929 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") |
| 11923 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); | 11930 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); |
| 11924 } | 11931 } |
| 11925 | 11932 |
| 11926 } | 11933 } |
| OLD | NEW |