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 2165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2176 return parseTextDecoration(propId, important); | 2176 return parseTextDecoration(propId, important); |
2177 | 2177 |
2178 case CSSPropertyTextDecorationStyle: | 2178 case CSSPropertyTextDecorationStyle: |
2179 // solid | double | dotted | dashed | wavy | 2179 // solid | double | dotted | dashed | wavy |
2180 if (RuntimeEnabledFeatures::css3TextDecorationsEnabled() | 2180 if (RuntimeEnabledFeatures::css3TextDecorationsEnabled() |
2181 && (id == CSSValueSolid || id == CSSValueDouble || id == CSSValueDot
ted || id == CSSValueDashed || id == CSSValueWavy)) | 2181 && (id == CSSValueSolid || id == CSSValueDouble || id == CSSValueDot
ted || id == CSSValueDashed || id == CSSValueWavy)) |
2182 validPrimitive = true; | 2182 validPrimitive = true; |
2183 break; | 2183 break; |
2184 | 2184 |
2185 case CSSPropertyTextUnderlinePosition: | 2185 case CSSPropertyTextUnderlinePosition: |
2186 // auto | alphabetic | under | 2186 // auto | under | inherit |
2187 if (RuntimeEnabledFeatures::css3TextDecorationsEnabled()) | 2187 if (RuntimeEnabledFeatures::css3TextDecorationsEnabled()) |
2188 return parseTextUnderlinePosition(important); | 2188 return parseTextUnderlinePosition(important); |
2189 return false; | 2189 return false; |
2190 | 2190 |
2191 case CSSPropertyZoom: // normal | reset | document | <number> | <pe
rcentage> | inherit | 2191 case CSSPropertyZoom: // normal | reset | document | <number> | <pe
rcentage> | inherit |
2192 if (id == CSSValueNormal || id == CSSValueReset || id == CSSValueDocumen
t) | 2192 if (id == CSSValueNormal || id == CSSValueReset || id == CSSValueDocumen
t) |
2193 validPrimitive = true; | 2193 validPrimitive = true; |
2194 else | 2194 else |
2195 validPrimitive = (!id && validUnit(value, FNumber | FPercent | FNonN
eg, HTMLStandardMode)); | 2195 validPrimitive = (!id && validUnit(value, FNumber | FPercent | FNonN
eg, HTMLStandardMode)); |
2196 break; | 2196 break; |
(...skipping 6931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9128 if (list->length() && (isValid || inShorthand())) { | 9128 if (list->length() && (isValid || inShorthand())) { |
9129 addTextDecorationProperty(propId, list.release(), important); | 9129 addTextDecorationProperty(propId, list.release(), important); |
9130 return true; | 9130 return true; |
9131 } | 9131 } |
9132 | 9132 |
9133 return false; | 9133 return false; |
9134 } | 9134 } |
9135 | 9135 |
9136 bool CSSParser::parseTextUnderlinePosition(bool important) | 9136 bool CSSParser::parseTextUnderlinePosition(bool important) |
9137 { | 9137 { |
9138 // The text-underline-position property has sintax "auto | alphabetic | [ un
der || [ left | right ] ]". | 9138 // The text-underline-position property has syntax "auto | [ under || [ left
| right ] ]". |
9139 // However, values 'left' and 'right' are not implemented yet, so we will pa
rse sintax | 9139 // However, values 'left' and 'right' are not implemented yet, so we will pa
rse syntax |
9140 // "auto | alphabetic | under" for now. | 9140 // "auto | under" for now. |
9141 CSSParserValue* value = m_valueList->current(); | 9141 CSSParserValue* value = m_valueList->current(); |
9142 switch (value->id) { | 9142 switch (value->id) { |
9143 case CSSValueAuto: | 9143 case CSSValueAuto: |
9144 case CSSValueAlphabetic: | |
9145 case CSSValueUnder: | 9144 case CSSValueUnder: |
9146 if (m_valueList->next()) | 9145 if (m_valueList->next()) |
9147 return false; | 9146 return false; |
9148 addProperty(CSSPropertyTextUnderlinePosition, cssValuePool().createIdent
ifierValue(value->id), important); | 9147 addProperty(CSSPropertyTextUnderlinePosition, cssValuePool().createIdent
ifierValue(value->id), important); |
9149 return true; | 9148 return true; |
9150 default: | 9149 default: |
9151 return false; | 9150 return false; |
9152 } | 9151 } |
9153 } | 9152 } |
9154 | 9153 |
(...skipping 2799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11954 { | 11953 { |
11955 // The tokenizer checks for the construct of an+b. | 11954 // The tokenizer checks for the construct of an+b. |
11956 // However, since the {ident} rule precedes the {nth} rule, some of those | 11955 // However, since the {ident} rule precedes the {nth} rule, some of those |
11957 // tokens are identified as string literal. Furthermore we need to accept | 11956 // tokens are identified as string literal. Furthermore we need to accept |
11958 // "odd" and "even" which does not match to an+b. | 11957 // "odd" and "even" which does not match to an+b. |
11959 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") | 11958 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") |
11960 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); | 11959 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); |
11961 } | 11960 } |
11962 | 11961 |
11963 } | 11962 } |
OLD | NEW |