OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r
ights reserved. |
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 } | 266 } |
267 } else if (!foundSiblingSelector && selector->isSiblingSelector()) | 267 } else if (!foundSiblingSelector && selector->isSiblingSelector()) |
268 foundSiblingSelector = true; | 268 foundSiblingSelector = true; |
269 } | 269 } |
270 if (foundSiblingSelector) | 270 if (foundSiblingSelector) |
271 features.siblingRules.append(RuleFeature(ruleData.rule(), ruleData.selec
torIndex(), ruleData.hasDocumentSecurityOrigin())); | 271 features.siblingRules.append(RuleFeature(ruleData.rule(), ruleData.selec
torIndex(), ruleData.hasDocumentSecurityOrigin())); |
272 if (ruleData.containsUncommonAttributeSelector()) | 272 if (ruleData.containsUncommonAttributeSelector()) |
273 features.uncommonAttributeRules.append(RuleFeature(ruleData.rule(), rule
Data.selectorIndex(), ruleData.hasDocumentSecurityOrigin())); | 273 features.uncommonAttributeRules.append(RuleFeature(ruleData.rule(), rule
Data.selectorIndex(), ruleData.hasDocumentSecurityOrigin())); |
274 } | 274 } |
275 | 275 |
276 void RuleSet::addToRuleSet(AtomicStringImpl* key, PendingRuleMap& map, const Rul
eData& ruleData) | 276 void RuleSet::addToRuleSet(StringImpl* key, PendingRuleMap& map, const RuleData&
ruleData) |
277 { | 277 { |
278 if (!key) | 278 if (!key) |
279 return; | 279 return; |
280 OwnPtr<LinkedStack<RuleData> >& rules = map.add(key, nullptr).iterator->valu
e; | 280 OwnPtr<LinkedStack<RuleData> >& rules = map.add(key, nullptr).iterator->valu
e; |
281 if (!rules) | 281 if (!rules) |
282 rules = adoptPtr(new LinkedStack<RuleData>); | 282 rules = adoptPtr(new LinkedStack<RuleData>); |
283 rules->push(ruleData); | 283 rules->push(ruleData); |
284 } | 284 } |
285 | 285 |
286 bool RuleSet::findBestRuleSetAndAdd(const CSSSelector* component, RuleData& rule
Data) | 286 bool RuleSet::findBestRuleSetAndAdd(const CSSSelector* component, RuleData& rule
Data) |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 compactPendingRules(pendingRules->tagRules, m_tagRules); | 482 compactPendingRules(pendingRules->tagRules, m_tagRules); |
483 compactPendingRules(pendingRules->shadowPseudoElementRules, m_shadowPseudoEl
ementRules); | 483 compactPendingRules(pendingRules->shadowPseudoElementRules, m_shadowPseudoEl
ementRules); |
484 m_linkPseudoClassRules.shrinkToFit(); | 484 m_linkPseudoClassRules.shrinkToFit(); |
485 m_cuePseudoRules.shrinkToFit(); | 485 m_cuePseudoRules.shrinkToFit(); |
486 m_focusPseudoClassRules.shrinkToFit(); | 486 m_focusPseudoClassRules.shrinkToFit(); |
487 m_universalRules.shrinkToFit(); | 487 m_universalRules.shrinkToFit(); |
488 m_pageRules.shrinkToFit(); | 488 m_pageRules.shrinkToFit(); |
489 } | 489 } |
490 | 490 |
491 } // namespace WebCore | 491 } // namespace WebCore |
OLD | NEW |