| 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 1338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1349 } | 1349 } |
| 1350 | 1350 |
| 1351 static inline void filterProperties(bool important, const CSSParser::ParsedPrope
rtyVector& input, Vector<CSSProperty, 256>& output, size_t& unusedEntries, BitAr
ray<numCSSProperties>& seenProperties, HashSet<AtomicString>& seenVariables) | 1351 static inline void filterProperties(bool important, const CSSParser::ParsedPrope
rtyVector& input, Vector<CSSProperty, 256>& output, size_t& unusedEntries, BitAr
ray<numCSSProperties>& seenProperties, HashSet<AtomicString>& seenVariables) |
| 1352 { | 1352 { |
| 1353 // Add properties in reverse order so that highest priority definitions are
reached first. Duplicate definitions can then be ignored when found. | 1353 // Add properties in reverse order so that highest priority definitions are
reached first. Duplicate definitions can then be ignored when found. |
| 1354 for (int i = input.size() - 1; i >= 0; --i) { | 1354 for (int i = input.size() - 1; i >= 0; --i) { |
| 1355 const CSSProperty& property = input[i]; | 1355 const CSSProperty& property = input[i]; |
| 1356 if (property.isImportant() != important) | 1356 if (property.isImportant() != important) |
| 1357 continue; | 1357 continue; |
| 1358 if (property.id() == CSSPropertyVariable) { | 1358 if (property.id() == CSSPropertyVariable) { |
| 1359 const AtomicString& name = static_cast<CSSVariableValue*>(property.v
alue())->name(); | 1359 const AtomicString& name = toCSSVariableValue(property.value())->nam
e(); |
| 1360 if (!seenVariables.add(name).isNewEntry) | 1360 if (!seenVariables.add(name).isNewEntry) |
| 1361 continue; | 1361 continue; |
| 1362 output[--unusedEntries] = property; | 1362 output[--unusedEntries] = property; |
| 1363 continue; | 1363 continue; |
| 1364 } | 1364 } |
| 1365 const unsigned propertyIDIndex = property.id() - firstCSSProperty; | 1365 const unsigned propertyIDIndex = property.id() - firstCSSProperty; |
| 1366 if (seenProperties.get(propertyIDIndex)) | 1366 if (seenProperties.get(propertyIDIndex)) |
| 1367 continue; | 1367 continue; |
| 1368 seenProperties.set(propertyIDIndex); | 1368 seenProperties.set(propertyIDIndex); |
| 1369 output[--unusedEntries] = property; | 1369 output[--unusedEntries] = property; |
| (...skipping 10373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11743 { | 11743 { |
| 11744 // The tokenizer checks for the construct of an+b. | 11744 // The tokenizer checks for the construct of an+b. |
| 11745 // However, since the {ident} rule precedes the {nth} rule, some of those | 11745 // However, since the {ident} rule precedes the {nth} rule, some of those |
| 11746 // tokens are identified as string literal. Furthermore we need to accept | 11746 // tokens are identified as string literal. Furthermore we need to accept |
| 11747 // "odd" and "even" which does not match to an+b. | 11747 // "odd" and "even" which does not match to an+b. |
| 11748 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") | 11748 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") |
| 11749 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); | 11749 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); |
| 11750 } | 11750 } |
| 11751 | 11751 |
| 11752 } | 11752 } |
| OLD | NEW |