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

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

Issue 2767113003: Simplify some arguments inside SelectorQuery. (Closed)
Patch Set: Created 3 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
3 * Copyright (C) 2014 Samsung Electronics. All rights reserved. 3 * Copyright (C) 2014 Samsung Electronics. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 template <typename SelectorQueryTrait> 72 template <typename SelectorQueryTrait>
73 void findTraverseRootsAndExecute( 73 void findTraverseRootsAndExecute(
74 ContainerNode& rootNode, 74 ContainerNode& rootNode,
75 typename SelectorQueryTrait::OutputType&) const; 75 typename SelectorQueryTrait::OutputType&) const;
76 76
77 enum MatchTraverseRootState { 77 enum MatchTraverseRootState {
78 DoesNotMatchTraverseRoots, 78 DoesNotMatchTraverseRoots,
79 MatchesTraverseRoots 79 MatchesTraverseRoots
80 }; 80 };
81 template <typename SelectorQueryTrait> 81 template <typename SelectorQueryTrait>
82 void executeForTraverseRoot(const CSSSelector&, 82 void executeForTraverseRoot(ContainerNode* traverseRoot,
83 ContainerNode* traverseRoot,
84 MatchTraverseRootState,
85 ContainerNode& rootNode, 83 ContainerNode& rootNode,
86 typename SelectorQueryTrait::OutputType&) const; 84 typename SelectorQueryTrait::OutputType&) const;
87 template <typename SelectorQueryTrait, typename SimpleElementListType> 85 template <typename SelectorQueryTrait, typename SimpleElementListType>
88 void executeForTraverseRoots(const CSSSelector&, 86 void executeForTraverseRoots(SimpleElementListType& traverseRoots,
89 SimpleElementListType& traverseRoots,
90 MatchTraverseRootState, 87 MatchTraverseRootState,
91 ContainerNode& rootNode, 88 ContainerNode& rootNode,
92 typename SelectorQueryTrait::OutputType&) const; 89 typename SelectorQueryTrait::OutputType&) const;
93 90
94 template <typename SelectorQueryTrait> 91 template <typename SelectorQueryTrait>
95 bool selectorListMatches(ContainerNode& rootNode, 92 bool selectorListMatches(ContainerNode& rootNode,
96 Element&, 93 Element&,
97 typename SelectorQueryTrait::OutputType&) const; 94 typename SelectorQueryTrait::OutputType&) const;
98 template <typename SelectorQueryTrait> 95 template <typename SelectorQueryTrait>
99 void executeSlow(ContainerNode& rootNode, 96 void executeSlow(ContainerNode& rootNode,
(...skipping 19 matching lines...) Expand all
119 SelectorQuery* add(const AtomicString&, const Document&, ExceptionState&); 116 SelectorQuery* add(const AtomicString&, const Document&, ExceptionState&);
120 void invalidate(); 117 void invalidate();
121 118
122 private: 119 private:
123 HashMap<AtomicString, std::unique_ptr<SelectorQuery>> m_entries; 120 HashMap<AtomicString, std::unique_ptr<SelectorQuery>> m_entries;
124 }; 121 };
125 122
126 } // namespace blink 123 } // namespace blink
127 124
128 #endif 125 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698