Index: Source/bindings/v8/custom/V8NodeIteratorCustom.cpp |
diff --git a/Source/bindings/v8/custom/V8NodeIteratorCustom.cpp b/Source/bindings/v8/custom/V8NodeIteratorCustom.cpp |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5fd84042ccf189bc3fdaa4bda7078673fb9799b7 |
--- /dev/null |
+++ b/Source/bindings/v8/custom/V8NodeIteratorCustom.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 "V8NodeIterator.h" |
+ |
+#include "V8NodeFilter.h" |
haraken
2013/08/01 13:32:20
This is not needed.
kouhei (in TOK)
2013/08/02 03:26:57
Won't compile without this file.
|
+#include "bindings/v8/V8Binding.h" |
+#include "bindings/v8/V8HiddenPropertyName.h" |
+#include "bindings/v8/V8Utilities.h" |
haraken
2013/08/01 13:32:20
This wouldn't be needed. Please be careful not to
kouhei (in TOK)
2013/08/02 03:26:57
Done.
|
+#include "core/dom/Node.h" |
haraken
2013/08/01 13:32:20
Ditto.
kouhei (in TOK)
2013/08/02 03:26:57
Won't compile without this file.
|
+#include "core/dom/NodeIterator.h" |
haraken
2013/08/01 13:32:20
Ditto.
kouhei (in TOK)
2013/08/02 03:26:57
Done.
|
+ |
+#include "wtf/RefPtr.h" |
haraken
2013/08/01 13:32:20
Ditto.
kouhei (in TOK)
2013/08/02 03:26:57
Done.
kouhei (in TOK)
2013/08/02 03:26:57
Done.
|
+ |
+namespace WebCore { |
+ |
+v8::Handle<v8::Object> wrap(NodeIterator* nodeIterator, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
+{ |
+ ASSERT(nodeIterator); |
+ ASSERT(DOMDataStore::getWrapper<V8NodeIterator>(nodeIterator, isolate).IsEmpty()); |
+ |
+ v8::Handle<v8::Object> wrapper = V8NodeIterator::createWrapper(nodeIterator, creationContext, isolate); |
+ |
+ if (nodeIterator->filter()) |
+ V8HiddenPropertyName::setNamedHiddenReference(wrapper, "filter", toV8(nodeIterator->filter(), creationContext, isolate)); |
+ |
+ return wrapper; |
+} |
+ |
+} // namespace WebCore |