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

Unified Diff: Source/core/css/SelectorCheckerFastPath.h

Issue 149513011: Pass around CSSSelector by reference instead of pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/SelectorChecker.cpp ('k') | Source/core/css/SelectorCheckerFastPath.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/SelectorCheckerFastPath.h
diff --git a/Source/core/css/SelectorCheckerFastPath.h b/Source/core/css/SelectorCheckerFastPath.h
index 1a37b9ac35ae7946bef531123f596ebf7a57c884..3e0d9464e9e999bb98e198bd2a2c25d8573e0468 100644
--- a/Source/core/css/SelectorCheckerFastPath.h
+++ b/Source/core/css/SelectorCheckerFastPath.h
@@ -36,26 +36,26 @@ namespace WebCore {
class SelectorCheckerFastPath {
public:
- SelectorCheckerFastPath(const CSSSelector*, const Element&);
+ SelectorCheckerFastPath(const CSSSelector&, const Element&);
bool matches() const;
bool matchesRightmostSelector(SelectorChecker::VisitedMatchType) const;
bool matchesRightmostAttributeSelector() const;
- static bool canUse(const CSSSelector*);
+ static bool canUse(const CSSSelector&);
private:
bool commonPseudoClassSelectorMatches(SelectorChecker::VisitedMatchType) const;
- const CSSSelector* m_selector;
+ const CSSSelector& m_selector;
const Element& m_element;
};
inline bool SelectorCheckerFastPath::matchesRightmostAttributeSelector() const
{
- if (m_selector->m_match == CSSSelector::Exact || m_selector->m_match == CSSSelector::Set)
- return SelectorChecker::checkExactAttribute(m_element, m_selector->attribute(), m_selector->value().impl());
- ASSERT(!m_selector->isAttributeSelector());
+ if (m_selector.m_match == CSSSelector::Exact || m_selector.m_match == CSSSelector::Set)
+ return SelectorChecker::checkExactAttribute(m_element, m_selector.attribute(), m_selector.value().impl());
+ ASSERT(!m_selector.isAttributeSelector());
return true;
}
« no previous file with comments | « Source/core/css/SelectorChecker.cpp ('k') | Source/core/css/SelectorCheckerFastPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698