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 10200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10211 m_token = TOPLEFTCORNER_SYM; | 10211 m_token = TOPLEFTCORNER_SYM; |
10212 return; | 10212 return; |
10213 | 10213 |
10214 case 17: | 10214 case 17: |
10215 if (isEqualToCSSIdentifier(name + 2, "op-right-corner")) | 10215 if (isEqualToCSSIdentifier(name + 2, "op-right-corner")) |
10216 m_token = TOPRIGHTCORNER_SYM; | 10216 m_token = TOPRIGHTCORNER_SYM; |
10217 return; | 10217 return; |
10218 } | 10218 } |
10219 return; | 10219 return; |
10220 | 10220 |
| 10221 case 'v': |
| 10222 if (length == 9 && isEqualToCSSIdentifier(name + 2, "iewport")) |
| 10223 m_token = VIEWPORT_RULE_SYM; |
| 10224 return; |
| 10225 |
10221 case '-': | 10226 case '-': |
10222 switch (length) { | 10227 switch (length) { |
10223 case 15: | 10228 case 15: |
10224 if (hasEscape) | 10229 if (hasEscape) |
10225 return; | 10230 return; |
10226 | 10231 |
10227 if (isEqualToCSSIdentifier(name + 2, "internal-rule")) { | 10232 if (isEqualToCSSIdentifier(name + 2, "internal-rule")) { |
10228 m_token = INTERNAL_RULE_SYM; | 10233 m_token = INTERNAL_RULE_SYM; |
10229 return; | 10234 return; |
10230 } | 10235 } |
(...skipping 13 matching lines...) Expand all Loading... |
10244 if (hasEscape) | 10249 if (hasEscape) |
10245 return; | 10250 return; |
10246 | 10251 |
10247 // Checking the last character first could further reduce the possib
ile cases. | 10252 // Checking the last character first could further reduce the possib
ile cases. |
10248 if (isASCIIAlphaCaselessEqual(name[15], 's') && isEqualToCSSIdentifi
er(name + 2, "internal-decl")) | 10253 if (isASCIIAlphaCaselessEqual(name[15], 's') && isEqualToCSSIdentifi
er(name + 2, "internal-decl")) |
10249 m_token = INTERNAL_DECLS_SYM; | 10254 m_token = INTERNAL_DECLS_SYM; |
10250 else if (isASCIIAlphaCaselessEqual(name[15], 'e') && isEqualToCSSIde
ntifier(name + 2, "internal-valu")) | 10255 else if (isASCIIAlphaCaselessEqual(name[15], 'e') && isEqualToCSSIde
ntifier(name + 2, "internal-valu")) |
10251 m_token = INTERNAL_VALUE_SYM; | 10256 m_token = INTERNAL_VALUE_SYM; |
10252 return; | 10257 return; |
10253 | 10258 |
10254 case 17: | |
10255 if (hasEscape) | |
10256 return; | |
10257 | |
10258 else if (isASCIIAlphaCaselessEqual(name[16], 't') && isEqualToCSSIde
ntifier(name + 2, "webkit-viewpor")) | |
10259 m_token = WEBKIT_VIEWPORT_RULE_SYM; | |
10260 return; | |
10261 | |
10262 case 18: | 10259 case 18: |
10263 if (isEqualToCSSIdentifier(name + 2, "webkit-keyframes")) | 10260 if (isEqualToCSSIdentifier(name + 2, "webkit-keyframes")) |
10264 m_token = WEBKIT_KEYFRAMES_SYM; | 10261 m_token = WEBKIT_KEYFRAMES_SYM; |
10265 return; | 10262 return; |
10266 | 10263 |
10267 case 19: | 10264 case 19: |
10268 if (!hasEscape && isASCIIAlphaCaselessEqual(name[18], 'r') && isEqua
lToCSSIdentifier(name + 2, "internal-selecto")) { | 10265 if (!hasEscape && isASCIIAlphaCaselessEqual(name[18], 'r') && isEqua
lToCSSIdentifier(name + 2, "internal-selecto")) { |
10269 m_token = INTERNAL_SELECTOR_SYM; | 10266 m_token = INTERNAL_SELECTOR_SYM; |
10270 return; | 10267 return; |
10271 } | 10268 } |
(...skipping 1532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11804 { | 11801 { |
11805 // The tokenizer checks for the construct of an+b. | 11802 // The tokenizer checks for the construct of an+b. |
11806 // However, since the {ident} rule precedes the {nth} rule, some of those | 11803 // However, since the {ident} rule precedes the {nth} rule, some of those |
11807 // tokens are identified as string literal. Furthermore we need to accept | 11804 // tokens are identified as string literal. Furthermore we need to accept |
11808 // "odd" and "even" which does not match to an+b. | 11805 // "odd" and "even" which does not match to an+b. |
11809 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") | 11806 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") |
11810 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); | 11807 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); |
11811 } | 11808 } |
11812 | 11809 |
11813 } | 11810 } |
OLD | NEW |