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

Unified Diff: third_party/WebKit/Source/core/dom/NodeFilter.h

Issue 2840163002: DOM: NodeIterator.filter and TreeWalker.filter should return values which were specified to createN… (Closed)
Patch Set: Move ToV8() to ToV8ForCore.h, etc. Created 3 years, 8 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 | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/dom/NodeFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/NodeFilter.h
diff --git a/third_party/WebKit/Source/core/dom/NodeFilter.h b/third_party/WebKit/Source/core/dom/NodeFilter.h
index 851226f2a1155e81ea77e4a2bd9c9ba097625734..623334a54055f1111d1d92139062011656abd499 100644
--- a/third_party/WebKit/Source/core/dom/NodeFilter.h
+++ b/third_party/WebKit/Source/core/dom/NodeFilter.h
@@ -25,12 +25,15 @@
#ifndef NodeFilter_h
#define NodeFilter_h
+#include "bindings/core/v8/ExceptionState.h"
#include "bindings/core/v8/ScriptWrappable.h"
-#include "core/dom/NodeFilterCondition.h"
#include "platform/heap/Handle.h"
namespace blink {
+// We never create NodeFilter instances.
+// The IDL interface 'NodeFilter' is represented by V8NodeFilterCondition and a
+// V8 value in Blink.
class NodeFilter final : public GarbageCollected<NodeFilter>,
public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
@@ -64,24 +67,15 @@ class NodeFilter final : public GarbageCollected<NodeFilter>,
kShowNotation = 0x00000800
};
- static NodeFilter* Create(NodeFilterCondition* condition) {
- return new NodeFilter(condition);
+ unsigned acceptNode(Node*, ExceptionState&) const {
+ NOTREACHED();
+ return kFilterReject;
}
- static NodeFilter* Create() { return new NodeFilter(); }
-
- unsigned acceptNode(Node*, ExceptionState&) const;
-
- void SetCondition(NodeFilterCondition* condition) { condition_ = condition; }
-
- DECLARE_TRACE();
+ DEFINE_INLINE_TRACE() {}
private:
- explicit NodeFilter(NodeFilterCondition* condition) : condition_(condition) {}
-
- NodeFilter() {}
-
- Member<NodeFilterCondition> condition_;
+ NodeFilter() = delete;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/dom/NodeFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698