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

Side by Side Diff: sky/engine/core/css/ElementRuleCollector.h

Issue 796583002: Use the HashSet of attribute names in SharedStyleFinder. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Use C++11 loops. Created 6 years 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
« no previous file with comments | « no previous file | sky/engine/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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 class ElementRuleCollector { 93 class ElementRuleCollector {
94 STACK_ALLOCATED(); 94 STACK_ALLOCATED();
95 WTF_MAKE_NONCOPYABLE(ElementRuleCollector); 95 WTF_MAKE_NONCOPYABLE(ElementRuleCollector);
96 public: 96 public:
97 ElementRuleCollector(const ElementResolveContext&, RenderStyle* = 0); 97 ElementRuleCollector(const ElementResolveContext&, RenderStyle* = 0);
98 ~ElementRuleCollector(); 98 ~ElementRuleCollector();
99 99
100 void setMode(SelectorChecker::Mode mode) { m_mode = mode; } 100 void setMode(SelectorChecker::Mode mode) { m_mode = mode; }
101 101
102 void setMatchingUARules(bool matchingUARules) { m_matchingUARules = matching UARules; } 102 void setMatchingUARules(bool matchingUARules) { m_matchingUARules = matching UARules; }
103 bool hasAnyMatchingRules(RuleSet*);
104 103
105 MatchResult& matchedResult(); 104 MatchResult& matchedResult();
106 105
107 void collectMatchingRules(const MatchRequest&, RuleRange&, SelectorChecker:: ContextFlags = SelectorChecker::DefaultBehavior, CascadeScope = ignoreCascadeSco pe, CascadeOrder = ignoreCascadeOrder); 106 void collectMatchingRules(const MatchRequest&, RuleRange&, SelectorChecker:: ContextFlags = SelectorChecker::DefaultBehavior, CascadeScope = ignoreCascadeSco pe, CascadeOrder = ignoreCascadeOrder);
108 void sortAndTransferMatchedRules(); 107 void sortAndTransferMatchedRules();
109 void clearMatchedRules(); 108 void clearMatchedRules();
110 void addElementStyleProperties(const StylePropertySet*, bool isCacheable = t rue); 109 void addElementStyleProperties(const StylePropertySet*, bool isCacheable = t rue);
111 110
112 private: 111 private:
113 void collectRuleIfMatches(const RuleData&, SelectorChecker::ContextFlags, Ca scadeScope, CascadeOrder, const MatchRequest&, RuleRange&); 112 void collectRuleIfMatches(const RuleData&, SelectorChecker::ContextFlags, Ca scadeScope, CascadeOrder, const MatchRequest&, RuleRange&);
(...skipping 22 matching lines...) Expand all
136 135
137 OwnPtr<Vector<MatchedRule, 32> > m_matchedRules; 136 OwnPtr<Vector<MatchedRule, 32> > m_matchedRules;
138 137
139 // Output. 138 // Output.
140 MatchResult m_result; 139 MatchResult m_result;
141 }; 140 };
142 141
143 } // namespace blink 142 } // namespace blink
144 143
145 #endif // SKY_ENGINE_CORE_CSS_ELEMENTRULECOLLECTOR_H_ 144 #endif // SKY_ENGINE_CORE_CSS_ELEMENTRULECOLLECTOR_H_
OLDNEW
« no previous file with comments | « no previous file | sky/engine/core/css/ElementRuleCollector.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698