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

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

Issue 2455943003: Backend for css rule tracking (Closed)
Patch Set: Backend for CSS Rule tracking. Created 4 years, 1 month 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
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. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 22 matching lines...) Expand all
33 #include "wtf/Vector.h" 33 #include "wtf/Vector.h"
34 34
35 namespace blink { 35 namespace blink {
36 36
37 class CSSStyleSheet; 37 class CSSStyleSheet;
38 class CSSRuleList; 38 class CSSRuleList;
39 class RuleData; 39 class RuleData;
40 class RuleSet; 40 class RuleSet;
41 class SelectorFilter; 41 class SelectorFilter;
42 class StaticCSSRuleList; 42 class StaticCSSRuleList;
43 class StyleRuleUsageTracker;
43 44
44 // TODO(kochi): CascadeOrder is used only for Shadow DOM V0 bug-compatible 45 // TODO(kochi): CascadeOrder is used only for Shadow DOM V0 bug-compatible
45 // cascading order. Once Shadow DOM V0 implementation is gone, remove this 46 // cascading order. Once Shadow DOM V0 implementation is gone, remove this
46 // completely. 47 // completely.
47 using CascadeOrder = unsigned; 48 using CascadeOrder = unsigned;
48 const CascadeOrder ignoreCascadeOrder = 0; 49 const CascadeOrder ignoreCascadeOrder = 0;
49 50
50 class MatchedRule { 51 class MatchedRule {
51 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); 52 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
52 53
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 void finishAddingUARules() { m_result.finishAddingUARules(); } 137 void finishAddingUARules() { m_result.finishAddingUARules(); }
137 void finishAddingAuthorRulesForTreeScope() { 138 void finishAddingAuthorRulesForTreeScope() {
138 m_result.finishAddingAuthorRulesForTreeScope(); 139 m_result.finishAddingAuthorRulesForTreeScope();
139 } 140 }
140 void setIncludeEmptyRules(bool include) { m_includeEmptyRules = include; } 141 void setIncludeEmptyRules(bool include) { m_includeEmptyRules = include; }
141 bool includeEmptyRules() const { return m_includeEmptyRules; } 142 bool includeEmptyRules() const { return m_includeEmptyRules; }
142 bool isCollectingForPseudoElement() const { 143 bool isCollectingForPseudoElement() const {
143 return m_pseudoStyleRequest.pseudoId != PseudoIdNone; 144 return m_pseudoStyleRequest.pseudoId != PseudoIdNone;
144 } 145 }
145 146
147 void addMatchedRulesToTracker(StyleRuleUsageTracker*) const;
148
146 private: 149 private:
147 template <typename RuleDataListType> 150 template <typename RuleDataListType>
148 void collectMatchingRulesForList(const RuleDataListType*, 151 void collectMatchingRulesForList(const RuleDataListType*,
149 CascadeOrder, 152 CascadeOrder,
150 const MatchRequest&); 153 const MatchRequest&);
151 154
152 void didMatchRule(const RuleData&, 155 void didMatchRule(const RuleData&,
153 const SelectorChecker::MatchResult&, 156 const SelectorChecker::MatchResult&,
154 CascadeOrder, 157 CascadeOrder,
155 const MatchRequest&); 158 const MatchRequest&);
(...skipping 23 matching lines...) Expand all
179 182
180 // Output. 183 // Output.
181 Member<StaticCSSRuleList> m_cssRuleList; 184 Member<StaticCSSRuleList> m_cssRuleList;
182 Member<StyleRuleList> m_styleRuleList; 185 Member<StyleRuleList> m_styleRuleList;
183 MatchResult m_result; 186 MatchResult m_result;
184 }; 187 };
185 188
186 } // namespace blink 189 } // namespace blink
187 190
188 #endif // ElementRuleCollector_h 191 #endif // ElementRuleCollector_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/BUILD.gn ('k') | third_party/WebKit/Source/core/css/ElementRuleCollector.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698