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

Unified Diff: Source/core/dom/NodeList.h

Issue 1220883007: [dom] support iterable<> NodeList (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Check that it merges cleanly Created 5 years, 3 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
Index: Source/core/dom/NodeList.h
diff --git a/Source/core/dom/NodeList.h b/Source/core/dom/NodeList.h
index ab50dd22ed1e7ad25e58e40fc868a9f9d845d935..417e93ada156985d628736db5ec0c339f8da62c9 100644
--- a/Source/core/dom/NodeList.h
+++ b/Source/core/dom/NodeList.h
@@ -24,15 +24,15 @@
#ifndef NodeList_h
#define NodeList_h
+#include "bindings/core/v8/Iterable.h"
#include "bindings/core/v8/ScriptWrappable.h"
#include "core/CoreExport.h"
+#include "core/dom/Node.h"
jsbell 2015/09/21 17:55:18 Is this actually needed, or can we keep the forwar
caitp (gmail) 2015/09/22 01:57:33 My compiler didn't like the uses of the template p
#include "wtf/RefCounted.h"
namespace blink {
-class Node;
-
-class CORE_EXPORT NodeList : public RefCountedWillBeGarbageCollectedFinalized<NodeList>, public ScriptWrappable {
+class CORE_EXPORT NodeList : public RefCountedWillBeGarbageCollectedFinalized<NodeList>, public ScriptWrappable, public ValueIterable<Node*> {
DEFINE_WRAPPERTYPEINFO();
public:
virtual ~NodeList() { }
@@ -51,6 +51,9 @@ public:
protected:
NodeList() { }
+
+private:
+ IterationSource* startIteration(ScriptState*, ExceptionState&) override;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698