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

Unified Diff: Source/core/html/RadioNodeList.h

Issue 119063002: Have HTMLFormElement's named getter return a RadioNodeList. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update expected output for inspector/console/console-format-collections Created 7 years 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/html/RadioNodeList.h
diff --git a/Source/core/html/RadioNodeList.h b/Source/core/html/RadioNodeList.h
index b735b0c337725375cb1987026805aa19baa527a4..eb120d6548ac2c95b73e07dc3bef30b12faf5d3c 100644
--- a/Source/core/html/RadioNodeList.h
+++ b/Source/core/html/RadioNodeList.h
@@ -32,7 +32,7 @@
namespace WebCore {
-class RadioNodeList FINAL : public LiveNodeList {
+class RadioNodeList : public LiveNodeList {
public:
static PassRefPtr<RadioNodeList> create(Node* ownerNode, CollectionType type, const AtomicString& name)
{
@@ -42,11 +42,13 @@ public:
virtual ~RadioNodeList();
- String value() const;
- void setValue(const String&);
+ virtual String value() const;
+ virtual void setValue(const String&);
-private:
+protected:
RadioNodeList(Node*, const AtomicString& name);
+
+private:
bool checkElementMatchesRadioNodeListFilter(Element*) const;
virtual bool nodeMatches(Element*) const OVERRIDE;
@@ -54,7 +56,27 @@ private:
AtomicString m_name;
};
-} // namepsace
+// A specialized version of RadioNodeList, limited to <img> elements.
+class RadioImgNodeList FINAL : public RadioNodeList {
+public:
esprehn 2013/12/19 11:02:48 I'd rather you just added a bool to the RadioNodeL
sof 2013/12/19 12:15:05 Done.
+ static PassRefPtr<RadioImgNodeList> create(Node* ownerNode, CollectionType type, const AtomicString& name)
+ {
+ ASSERT_UNUSED(type, type == RadioNodeListType);
+ return adoptRef(new RadioImgNodeList(ownerNode, name));
+ }
+
+ virtual String value() const OVERRIDE { return String(); }
+ virtual void setValue(const String&) OVERRIDE { }
+
+private:
+ RadioImgNodeList(Node*, const AtomicString& name);
+
+ virtual bool nodeMatches(Element*) const OVERRIDE;
+
+ AtomicString m_name;
+};
+
+} // namespace
#endif

Powered by Google App Engine
This is Rietveld 408576698