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

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

Issue 488703002: Make it obvious an HTMLFormControlsCollection can only contain HTMLElements (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | Source/core/html/HTMLFormControlsCollection.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLFormControlsCollection.h
diff --git a/Source/core/html/HTMLFormControlsCollection.h b/Source/core/html/HTMLFormControlsCollection.h
index cd11813b8fbb90dd0651013618b9f6472c676c2a..dd5e58c91c24292a54bcdc8ce6b97d28e2107ef9 100644
--- a/Source/core/html/HTMLFormControlsCollection.h
+++ b/Source/core/html/HTMLFormControlsCollection.h
@@ -26,11 +26,11 @@
#include "core/html/FormAssociatedElement.h"
#include "core/html/HTMLCollection.h"
+#include "core/html/HTMLElement.h"
#include "core/html/RadioNodeList.h"
namespace blink {
-class HTMLElement;
class HTMLImageElement;
class QualifiedName;
@@ -43,7 +43,9 @@ public:
virtual ~HTMLFormControlsCollection();
- virtual Element* namedItem(const AtomicString& name) const OVERRIDE;
+ HTMLElement* item(unsigned offset) const { return toHTMLElement(HTMLCollection::item(offset)); }
+
+ virtual HTMLElement* namedItem(const AtomicString& name) const OVERRIDE;
void namedGetter(const AtomicString& name, RefPtrWillBeRawPtr<RadioNodeList>&, RefPtrWillBeRawPtr<Element>&);
virtual void trace(Visitor*) OVERRIDE;
@@ -56,10 +58,10 @@ private:
const FormAssociatedElement::List& formControlElements() const;
const WillBeHeapVector<RawPtrWillBeMember<HTMLImageElement> >& formImageElements() const;
- virtual Element* virtualItemAfter(Element*) const OVERRIDE;
+ virtual HTMLElement* virtualItemAfter(Element*) const OVERRIDE;
virtual void invalidateCache(Document* oldDocument = 0) const OVERRIDE;
- mutable RawPtrWillBeMember<Element> m_cachedElement;
+ mutable RawPtrWillBeMember<HTMLElement> m_cachedElement;
mutable unsigned m_cachedElementOffsetInArray;
};
DEFINE_TYPE_CASTS(HTMLFormControlsCollection, LiveNodeListBase, collection, collection->type() == FormControls, collection.type() == FormControls);
« no previous file with comments | « no previous file | Source/core/html/HTMLFormControlsCollection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698