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

Side by Side Diff: Source/core/dom/SelectorQuery.h

Issue 68173014: Have ElementTraversal::firstWithin() take a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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
« no previous file with comments | « Source/core/dom/LiveNodeList.h ('k') | Source/core/dom/SelectorQuery.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) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 const CSSSelector* selector; 55 const CSSSelector* selector;
56 bool isFastCheckable; 56 bool isFastCheckable;
57 }; 57 };
58 58
59 bool canUseFastQuery(const Node& rootNode) const; 59 bool canUseFastQuery(const Node& rootNode) const;
60 bool selectorMatches(const SelectorData&, Element&, const Node&) const; 60 bool selectorMatches(const SelectorData&, Element&, const Node&) const;
61 void collectElementsByClassName(Node& rootNode, const AtomicString& classNam e, Vector<RefPtr<Node> >&) const; 61 void collectElementsByClassName(Node& rootNode, const AtomicString& classNam e, Vector<RefPtr<Node> >&) const;
62 Element* findElementByClassName(Node& rootNode, const AtomicString& classNam e) const; 62 Element* findElementByClassName(Node& rootNode, const AtomicString& classNam e) const;
63 void collectElementsByTagName(Node& rootNode, const QualifiedName& tagName, Vector<RefPtr<Node> >&) const; 63 void collectElementsByTagName(Node& rootNode, const QualifiedName& tagName, Vector<RefPtr<Node> >&) const;
64 Element* findElementByTagName(Node& rootNode, const QualifiedName& tagName) const; 64 Element* findElementByTagName(Node& rootNode, const QualifiedName& tagName) const;
65 PassOwnPtr<SimpleNodeList> findTraverseRoots(Node* rootNode, bool& matchTrav erseRoots) const; 65 PassOwnPtr<SimpleNodeList> findTraverseRoots(Node& rootNode, bool& matchTrav erseRoots) const;
66 void executeSlowQueryAll(Node& rootNode, Vector<RefPtr<Node> >& matchedEleme nts) const; 66 void executeSlowQueryAll(Node& rootNode, Vector<RefPtr<Node> >& matchedEleme nts) const;
67 void executeQueryAll(Node& rootNode, Vector<RefPtr<Node> >& matchedElements) const; 67 void executeQueryAll(Node& rootNode, Vector<RefPtr<Node> >& matchedElements) const;
68 Node* findTraverseRoot(Node& rootNode, bool& matchTraverseRoot) const; 68 Node* findTraverseRoot(Node& rootNode, bool& matchTraverseRoot) const;
69 Element* executeSlowQueryFirst(Node& rootNode) const; 69 Element* executeSlowQueryFirst(Node& rootNode) const;
70 Element* executeQueryFirst(Node& rootNode) const; 70 Element* executeQueryFirst(Node& rootNode) const;
71 71
72 Vector<SelectorData> m_selectors; 72 Vector<SelectorData> m_selectors;
73 }; 73 };
74 74
75 class SelectorQuery { 75 class SelectorQuery {
(...skipping 15 matching lines...) Expand all
91 SelectorQuery* add(const AtomicString&, const Document&, ExceptionState&); 91 SelectorQuery* add(const AtomicString&, const Document&, ExceptionState&);
92 void invalidate(); 92 void invalidate();
93 93
94 private: 94 private:
95 HashMap<AtomicString, OwnPtr<SelectorQuery> > m_entries; 95 HashMap<AtomicString, OwnPtr<SelectorQuery> > m_entries;
96 }; 96 };
97 97
98 } 98 }
99 99
100 #endif 100 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/LiveNodeList.h ('k') | Source/core/dom/SelectorQuery.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698