| 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 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1080 | 1080 |
| 1081 declaration->addParsedProperty(CSSProperty(propertyId, value.release(), impo
rtant)); | 1081 declaration->addParsedProperty(CSSProperty(propertyId, value.release(), impo
rtant)); |
| 1082 return true; | 1082 return true; |
| 1083 } | 1083 } |
| 1084 | 1084 |
| 1085 template <typename CharacterType> | 1085 template <typename CharacterType> |
| 1086 static bool parseTransformArguments(CSSTransformValue* transformValue, Character
Type* characters, unsigned length, unsigned start, unsigned expectedCount) | 1086 static bool parseTransformArguments(CSSTransformValue* transformValue, Character
Type* characters, unsigned length, unsigned start, unsigned expectedCount) |
| 1087 { | 1087 { |
| 1088 while (expectedCount) { | 1088 while (expectedCount) { |
| 1089 size_t end = WTF::find(characters, length, expectedCount == 1 ? ')' : ',
', start); | 1089 size_t end = WTF::find(characters, length, expectedCount == 1 ? ')' : ',
', start); |
| 1090 if (end == notFound || (expectedCount == 1 && end != length - 1)) | 1090 if (end == kNotFound || (expectedCount == 1 && end != length - 1)) |
| 1091 return false; | 1091 return false; |
| 1092 unsigned argumentLength = end - start; | 1092 unsigned argumentLength = end - start; |
| 1093 CSSPrimitiveValue::UnitTypes unit = CSSPrimitiveValue::CSS_NUMBER; | 1093 CSSPrimitiveValue::UnitTypes unit = CSSPrimitiveValue::CSS_NUMBER; |
| 1094 double number; | 1094 double number; |
| 1095 if (!parseSimpleLength(characters + start, argumentLength, unit, number)
) | 1095 if (!parseSimpleLength(characters + start, argumentLength, unit, number)
) |
| 1096 return false; | 1096 return false; |
| 1097 if (unit != CSSPrimitiveValue::CSS_PX && (number || unit != CSSPrimitive
Value::CSS_NUMBER)) | 1097 if (unit != CSSPrimitiveValue::CSS_PX && (number || unit != CSSPrimitive
Value::CSS_NUMBER)) |
| 1098 return false; | 1098 return false; |
| 1099 transformValue->append(cssValuePool().createValue(number, unit)); | 1099 transformValue->append(cssValuePool().createValue(number, unit)); |
| 1100 start = end + 1; | 1100 start = end + 1; |
| (...skipping 10900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12001 { | 12001 { |
| 12002 // The tokenizer checks for the construct of an+b. | 12002 // The tokenizer checks for the construct of an+b. |
| 12003 // However, since the {ident} rule precedes the {nth} rule, some of those | 12003 // However, since the {ident} rule precedes the {nth} rule, some of those |
| 12004 // tokens are identified as string literal. Furthermore we need to accept | 12004 // tokens are identified as string literal. Furthermore we need to accept |
| 12005 // "odd" and "even" which does not match to an+b. | 12005 // "odd" and "even" which does not match to an+b. |
| 12006 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") | 12006 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") |
| 12007 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); | 12007 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); |
| 12008 } | 12008 } |
| 12009 | 12009 |
| 12010 } | 12010 } |
| OLD | NEW |