Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Side by Side Diff: Source/core/css/ElementRuleCollector.h

Issue 17616009: RuleSet should use malloc rather than Vector (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address reviewer feedback Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/css/ElementRuleCollector.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 void collectMatchingRules(const MatchRequest&, StyleResolver::RuleRange&); 71 void collectMatchingRules(const MatchRequest&, StyleResolver::RuleRange&);
72 void collectMatchingRulesForRegion(const MatchRequest&, StyleResolver::RuleR ange&); 72 void collectMatchingRulesForRegion(const MatchRequest&, StyleResolver::RuleR ange&);
73 void sortAndTransferMatchedRules(); 73 void sortAndTransferMatchedRules();
74 void clearMatchedRules(); 74 void clearMatchedRules();
75 void addElementStyleProperties(const StylePropertySet*, bool isCacheable = t rue); 75 void addElementStyleProperties(const StylePropertySet*, bool isCacheable = t rue);
76 76
77 private: 77 private:
78 Document* document() { return m_state.document(); } 78 Document* document() { return m_state.document(); }
79 79
80 void collectRuleIfMatches(const RuleData&, const MatchRequest&, StyleResolve r::RuleRange&);
80 void collectMatchingRulesForList(const Vector<RuleData>*, const MatchRequest &, StyleResolver::RuleRange&); 81 void collectMatchingRulesForList(const Vector<RuleData>*, const MatchRequest &, StyleResolver::RuleRange&);
82 void collectMatchingRulesForList(const RuleData*, const MatchRequest&, Style Resolver::RuleRange&);
81 bool ruleMatches(const RuleData&, const ContainerNode* scope, PseudoId&); 83 bool ruleMatches(const RuleData&, const ContainerNode* scope, PseudoId&);
82 84
83 void sortMatchedRules(); 85 void sortMatchedRules();
84 86
85 void addMatchedRule(const RuleData*); 87 void addMatchedRule(const RuleData*);
86 88
87 StaticCSSRuleList* ensureRuleList(); 89 StaticCSSRuleList* ensureRuleList();
88 90
89 private: 91 private:
90 const StyleResolverState& m_state; 92 const StyleResolverState& m_state;
(...skipping 11 matching lines...) Expand all
102 OwnPtr<Vector<const RuleData*, 32> > m_matchedRules; 104 OwnPtr<Vector<const RuleData*, 32> > m_matchedRules;
103 105
104 // Output. 106 // Output.
105 RefPtr<StaticCSSRuleList> m_ruleList; 107 RefPtr<StaticCSSRuleList> m_ruleList;
106 StyleResolver::MatchResult m_result; 108 StyleResolver::MatchResult m_result;
107 }; 109 };
108 110
109 } // namespace WebCore 111 } // namespace WebCore
110 112
111 #endif // ElementRuleCollector_h 113 #endif // ElementRuleCollector_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/ElementRuleCollector.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698