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 9224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9235 return false; | 9235 return false; |
9236 if (value->string.length() != tagNameLength) | 9236 if (value->string.length() != tagNameLength) |
9237 return false; | 9237 return false; |
9238 for (unsigned i = 0; i < tagNameLength; ++i) { | 9238 for (unsigned i = 0; i < tagNameLength; ++i) { |
9239 // Limits the range of characters to 0x20-0x7E, following the tag name r
ules defiend in the OpenType specification. | 9239 // Limits the range of characters to 0x20-0x7E, following the tag name r
ules defiend in the OpenType specification. |
9240 UChar character = value->string[i]; | 9240 UChar character = value->string[i]; |
9241 if (character < 0x20 || character > 0x7E) | 9241 if (character < 0x20 || character > 0x7E) |
9242 return false; | 9242 return false; |
9243 } | 9243 } |
9244 | 9244 |
9245 String tag = value->string; | 9245 AtomicString tag = value->string; |
9246 int tagValue = 1; | 9246 int tagValue = 1; |
9247 // Feature tag values could follow: <integer> | on | off | 9247 // Feature tag values could follow: <integer> | on | off |
9248 value = m_valueList->next(); | 9248 value = m_valueList->next(); |
9249 if (value) { | 9249 if (value) { |
9250 if (value->unit == CSSPrimitiveValue::CSS_NUMBER && value->isInt && valu
e->fValue >= 0) { | 9250 if (value->unit == CSSPrimitiveValue::CSS_NUMBER && value->isInt && valu
e->fValue >= 0) { |
9251 tagValue = clampToInteger(value->fValue); | 9251 tagValue = clampToInteger(value->fValue); |
9252 if (tagValue < 0) | 9252 if (tagValue < 0) |
9253 return false; | 9253 return false; |
9254 m_valueList->next(); | 9254 m_valueList->next(); |
9255 } else if (value->id == CSSValueOn || value->id == CSSValueOff) { | 9255 } else if (value->id == CSSValueOn || value->id == CSSValueOff) { |
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10407 { | 10407 { |
10408 // The tokenizer checks for the construct of an+b. | 10408 // The tokenizer checks for the construct of an+b. |
10409 // However, since the {ident} rule precedes the {nth} rule, some of those | 10409 // However, since the {ident} rule precedes the {nth} rule, some of those |
10410 // tokens are identified as string literal. Furthermore we need to accept | 10410 // tokens are identified as string literal. Furthermore we need to accept |
10411 // "odd" and "even" which does not match to an+b. | 10411 // "odd" and "even" which does not match to an+b. |
10412 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") | 10412 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") |
10413 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); | 10413 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); |
10414 } | 10414 } |
10415 | 10415 |
10416 } | 10416 } |
OLD | NEW |