summaryrefslogtreecommitdiffstats
path: root/WebCore/html/HTMLFormCollection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/html/HTMLFormCollection.cpp')
-rw-r--r--WebCore/html/HTMLFormCollection.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/WebCore/html/HTMLFormCollection.cpp b/WebCore/html/HTMLFormCollection.cpp
index fa69710..823291a 100644
--- a/WebCore/html/HTMLFormCollection.cpp
+++ b/WebCore/html/HTMLFormCollection.cpp
@@ -23,7 +23,7 @@
#include "config.h"
#include "HTMLFormCollection.h"
-#include "HTMLGenericFormElement.h"
+#include "HTMLFormControlElement.h"
#include "HTMLFormElement.h"
#include "HTMLImageElement.h"
#include "HTMLNames.h"
@@ -47,6 +47,11 @@ HTMLFormCollection::HTMLFormCollection(PassRefPtr<HTMLFormElement> form)
{
}
+PassRefPtr<HTMLFormCollection> HTMLFormCollection::create(PassRefPtr<HTMLFormElement> form)
+{
+ return adoptRef(new HTMLFormCollection(form));
+}
+
HTMLFormCollection::~HTMLFormCollection()
{
}
@@ -72,7 +77,7 @@ Node* HTMLFormCollection::item(unsigned index) const
info()->elementsArrayPosition = 0;
}
- Vector<HTMLGenericFormElement*>& l = static_cast<HTMLFormElement*>(base())->formElements;
+ Vector<HTMLFormControlElement*>& l = static_cast<HTMLFormElement*>(base())->formElements;
unsigned currentIndex = info()->position;
for (unsigned i = info()->elementsArrayPosition; i < l.size(); i++) {
@@ -103,13 +108,13 @@ Element* HTMLFormCollection::getNamedFormItem(const QualifiedName& attrName, con
bool foundInputElements = false;
for (unsigned i = 0; i < form->formElements.size(); ++i) {
- HTMLGenericFormElement* e = form->formElements[i];
+ HTMLFormControlElement* e = form->formElements[i];
if (e->isEnumeratable()) {
bool found;
if (caseSensitive)
found = e->getAttribute(attrName) == name;
else
- found = e->getAttribute(attrName).domString().lower() == name.lower();
+ found = equalIgnoringCase(e->getAttribute(attrName), name);
if (found) {
foundInputElements = true;
if (!duplicateNumber)
@@ -126,7 +131,7 @@ Element* HTMLFormCollection::getNamedFormItem(const QualifiedName& attrName, con
if (caseSensitive)
found = e->getAttribute(attrName) == name;
else
- found = e->getAttribute(attrName).domString().lower() == name.lower();
+ found = equalIgnoringCase(e->getAttribute(attrName), name);
if (found) {
if (!duplicateNumber)
return e;
@@ -195,7 +200,7 @@ void HTMLFormCollection::updateNameCache() const
HTMLFormElement* f = static_cast<HTMLFormElement*>(base());
for (unsigned i = 0; i < f->formElements.size(); ++i) {
- HTMLGenericFormElement* e = f->formElements[i];
+ HTMLFormControlElement* e = f->formElements[i];
if (e->isEnumeratable()) {
const AtomicString& idAttrVal = e->getAttribute(idAttr);
const AtomicString& nameAttrVal = e->getAttribute(nameAttr);