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 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1280 | 1280 |
1281 // can't use { because tokenizer state switches from mediaquery to initial s
tate when it sees { token. | 1281 // can't use { because tokenizer state switches from mediaquery to initial s
tate when it sees { token. |
1282 // instead insert one " " (which is caught by maybe_space in CSSGrammar.y) | 1282 // instead insert one " " (which is caught by maybe_space in CSSGrammar.y) |
1283 setupParser("@-internal-medialist ", string, ""); | 1283 setupParser("@-internal-medialist ", string, ""); |
1284 cssyyparse(this); | 1284 cssyyparse(this); |
1285 | 1285 |
1286 ASSERT(m_mediaList); | 1286 ASSERT(m_mediaList); |
1287 return m_mediaList.release(); | 1287 return m_mediaList.release(); |
1288 } | 1288 } |
1289 | 1289 |
| 1290 bool BisonCSSParser::parseAttributeFlags(unsigned& flags, const String& string) |
| 1291 { |
| 1292 if (!RuntimeEnabledFeatures::cssAttributeCaseSensitivityEnabled() && !isUASh
eetBehavior(m_context.mode())) |
| 1293 return false; |
| 1294 if (string == "i") { |
| 1295 flags = CSSSelector::CaseInsensitive; |
| 1296 return true; |
| 1297 } |
| 1298 return false; |
| 1299 } |
| 1300 |
1290 static inline void filterProperties(bool important, const WillBeHeapVector<CSSPr
operty, 256>& input, WillBeHeapVector<CSSProperty, 256>& output, size_t& unusedE
ntries, BitArray<numCSSProperties>& seenProperties) | 1301 static inline void filterProperties(bool important, const WillBeHeapVector<CSSPr
operty, 256>& input, WillBeHeapVector<CSSProperty, 256>& output, size_t& unusedE
ntries, BitArray<numCSSProperties>& seenProperties) |
1291 { | 1302 { |
1292 // Add properties in reverse order so that highest priority definitions are
reached first. Duplicate definitions can then be ignored when found. | 1303 // Add properties in reverse order so that highest priority definitions are
reached first. Duplicate definitions can then be ignored when found. |
1293 for (int i = input.size() - 1; i >= 0; --i) { | 1304 for (int i = input.size() - 1; i >= 0; --i) { |
1294 const CSSProperty& property = input[i]; | 1305 const CSSProperty& property = input[i]; |
1295 if (property.isImportant() != important) | 1306 if (property.isImportant() != important) |
1296 continue; | 1307 continue; |
1297 const unsigned propertyIDIndex = property.id() - firstCSSProperty; | 1308 const unsigned propertyIDIndex = property.id() - firstCSSProperty; |
1298 if (seenProperties.get(propertyIDIndex)) | 1309 if (seenProperties.get(propertyIDIndex)) |
1299 continue; | 1310 continue; |
(...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2249 rule->setProperties(createStylePropertySet()); | 2260 rule->setProperties(createStylePropertySet()); |
2250 clearProperties(); | 2261 clearProperties(); |
2251 | 2262 |
2252 StyleRuleViewport* result = rule.get(); | 2263 StyleRuleViewport* result = rule.get(); |
2253 m_parsedRules.append(rule.release()); | 2264 m_parsedRules.append(rule.release()); |
2254 | 2265 |
2255 return result; | 2266 return result; |
2256 } | 2267 } |
2257 | 2268 |
2258 } | 2269 } |
OLD | NEW |