Index: Source/core/html/HTMLOptionsCollection.h |
diff --git a/Source/core/html/HTMLOptionsCollection.h b/Source/core/html/HTMLOptionsCollection.h |
index 1e88218bcfaaf5a5f152e8917f7acf98f46f5464..d2d379bc2c63b57e0b6a381e6ced990fc3d67309 100644 |
--- a/Source/core/html/HTMLOptionsCollection.h |
+++ b/Source/core/html/HTMLOptionsCollection.h |
@@ -25,17 +25,18 @@ |
#define HTMLOptionsCollection_h |
#include "core/html/HTMLCollection.h" |
+#include "core/html/HTMLOptionElement.h" |
namespace blink { |
class ExceptionState; |
-class HTMLOptionElement; |
-class HTMLSelectElement; |
class HTMLOptionsCollection FINAL : public HTMLCollection { |
public: |
static PassRefPtrWillBeRawPtr<HTMLOptionsCollection> create(ContainerNode&, CollectionType); |
+ HTMLOptionElement* item(unsigned offset) const { return toHTMLOptionElement(HTMLCollection::item(offset)); } |
+ |
void add(PassRefPtrWillBeRawPtr<HTMLOptionElement>, ExceptionState&); |
void add(PassRefPtrWillBeRawPtr<HTMLOptionElement>, int index, ExceptionState&); |
void remove(int index); |
@@ -47,6 +48,8 @@ public: |
void namedGetter(const AtomicString& name, RefPtrWillBeRawPtr<NodeList>&, RefPtrWillBeRawPtr<Element>&); |
bool anonymousIndexedSetter(unsigned, PassRefPtrWillBeRawPtr<HTMLOptionElement>, ExceptionState&); |
+ bool elementMatches(const HTMLElement&) const; |
+ |
private: |
explicit HTMLOptionsCollection(ContainerNode&); |
@@ -55,6 +58,11 @@ private: |
DEFINE_TYPE_CASTS(HTMLOptionsCollection, LiveNodeListBase, collection, collection->type() == SelectOptions, collection.type() == SelectOptions); |
+inline bool HTMLOptionsCollection::elementMatches(const HTMLElement& element) const |
+{ |
+ return isHTMLOptionElement(element); |
+} |
+ |
} //namespace |
#endif |