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

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

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 3 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 | « Source/core/css/CSSStyleSheet.cpp ('k') | 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 void collectMatchingRulesForRegion(const MatchRequest&, RuleRange&, CascadeS cope = ignoreCascadeScope, CascadeOrder = ignoreCascadeOrder); 98 void collectMatchingRulesForRegion(const MatchRequest&, RuleRange&, CascadeS cope = ignoreCascadeScope, CascadeOrder = ignoreCascadeOrder);
99 void sortAndTransferMatchedRules(); 99 void sortAndTransferMatchedRules();
100 void clearMatchedRules(); 100 void clearMatchedRules();
101 void addElementStyleProperties(const StylePropertySet*, bool isCacheable = t rue); 101 void addElementStyleProperties(const StylePropertySet*, bool isCacheable = t rue);
102 102
103 unsigned lastMatchedRulesPosition() const { return m_matchedRules ? m_matche dRules->size() : 0; } 103 unsigned lastMatchedRulesPosition() const { return m_matchedRules ? m_matche dRules->size() : 0; }
104 void sortMatchedRulesFrom(unsigned position); 104 void sortMatchedRulesFrom(unsigned position);
105 void sortAndTransferMatchedRulesWithOnlySortBySpecificity(); 105 void sortAndTransferMatchedRulesWithOnlySortBySpecificity();
106 106
107 private: 107 private:
108 Document* document() { return m_context.document(); } 108 Document& document() { return m_context.document(); }
109 109
110 void collectRuleIfMatches(const RuleData&, CascadeScope, CascadeOrder, const MatchRequest&, RuleRange&); 110 void collectRuleIfMatches(const RuleData&, CascadeScope, CascadeOrder, const MatchRequest&, RuleRange&);
111 void collectMatchingRulesForList(const Vector<RuleData>*, CascadeScope, Casc adeOrder, const MatchRequest&, RuleRange&); 111 void collectMatchingRulesForList(const Vector<RuleData>*, CascadeScope, Casc adeOrder, const MatchRequest&, RuleRange&);
112 void collectMatchingRulesForList(const RuleData*, CascadeScope, CascadeOrder , const MatchRequest&, RuleRange&); 112 void collectMatchingRulesForList(const RuleData*, CascadeScope, CascadeOrder , const MatchRequest&, RuleRange&);
113 bool ruleMatches(const RuleData&, const ContainerNode* scope, PseudoId&); 113 bool ruleMatches(const RuleData&, const ContainerNode* scope, PseudoId&);
114 114
115 void sortMatchedRules(); 115 void sortMatchedRules();
116 void addMatchedRule(const RuleData*, CascadeScope, CascadeOrder); 116 void addMatchedRule(const RuleData*, CascadeScope, CascadeOrder);
117 117
118 StaticCSSRuleList* ensureRuleList(); 118 StaticCSSRuleList* ensureRuleList();
(...skipping 14 matching lines...) Expand all
133 OwnPtr<Vector<MatchedRule, 32> > m_matchedRules; 133 OwnPtr<Vector<MatchedRule, 32> > m_matchedRules;
134 134
135 // Output. 135 // Output.
136 RefPtr<StaticCSSRuleList> m_ruleList; 136 RefPtr<StaticCSSRuleList> m_ruleList;
137 MatchResult m_result; 137 MatchResult m_result;
138 }; 138 };
139 139
140 } // namespace WebCore 140 } // namespace WebCore
141 141
142 #endif // ElementRuleCollector_h 142 #endif // ElementRuleCollector_h
OLDNEW
« no previous file with comments | « Source/core/css/CSSStyleSheet.cpp ('k') | Source/core/css/ElementRuleCollector.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698