Index: Source/bindings/v8/custom/V8TreeWalkerCustom.cpp |
diff --git a/Source/bindings/v8/custom/V8TreeWalkerCustom.cpp b/Source/bindings/v8/custom/V8TreeWalkerCustom.cpp |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5b60189c8703912bcd8065a5fade3f39849b6a7a |
--- /dev/null |
+++ b/Source/bindings/v8/custom/V8TreeWalkerCustom.cpp |
@@ -0,0 +1,28 @@ |
+#include "config.h" |
haraken
2013/08/01 13:32:20
Please add a copyright.
kouhei (in TOK)
2013/08/02 03:26:57
Done.
|
+#include "V8TreeWalker.h" |
+ |
+#include "V8NodeFilter.h" |
+#include "bindings/v8/V8Binding.h" |
+#include "bindings/v8/V8HiddenPropertyName.h" |
+#include "bindings/v8/V8Utilities.h" |
+#include "core/dom/Node.h" |
+#include "core/dom/TreeWalker.h" |
+ |
+#include "wtf/RefPtr.h" |
+ |
+namespace WebCore { |
+ |
+v8::Handle<v8::Object> wrap(TreeWalker* treeWalker, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
+{ |
+ ASSERT(treeWalker); |
+ ASSERT(DOMDataStore::getWrapper<V8TreeWalker>(treeWalker, isolate).IsEmpty()); |
+ |
+ v8::Handle<v8::Object> wrapper = V8TreeWalker::createWrapper(treeWalker, creationContext, isolate); |
+ |
+ if (treeWalker->filter()) |
+ V8HiddenPropertyName::setNamedHiddenReference(wrapper, "filter", toV8(treeWalker->filter(), creationContext, isolate)); |
+ |
+ return wrapper; |
+} |
+ |
+} // namespace WebCore |