diff options
Diffstat (limited to 'WebCore/html/HTMLInputElement.cpp')
-rw-r--r-- | WebCore/html/HTMLInputElement.cpp | 38 |
1 files changed, 33 insertions, 5 deletions
diff --git a/WebCore/html/HTMLInputElement.cpp b/WebCore/html/HTMLInputElement.cpp index 31d2cc2..7994472 100644 --- a/WebCore/html/HTMLInputElement.cpp +++ b/WebCore/html/HTMLInputElement.cpp @@ -27,6 +27,7 @@ #include "HTMLInputElement.h" #include "AXObjectCache.h" +#include "Attribute.h" #include "CSSPropertyNames.h" #include "ChromeClient.h" #include "DateComponents.h" @@ -49,7 +50,6 @@ #include "HTMLParser.h" #include "KeyboardEvent.h" #include "LocalizedStrings.h" -#include "MappedAttribute.h" #include "MouseEvent.h" #include "Page.h" #include "RegularExpression.h" @@ -849,7 +849,7 @@ void HTMLInputElement::setInputType(const String& t) registerForActivationCallbackIfNeeded(); if (didRespectHeightAndWidth != willRespectHeightAndWidth) { - NamedMappedAttrMap* map = mappedAttributes(); + NamedNodeMap* map = mappedAttributes(); ASSERT(map); if (Attribute* height = map->getAttributeItem(heightAttr)) attributeChanged(height, false); @@ -1063,7 +1063,7 @@ bool HTMLInputElement::mapToEntry(const QualifiedName& attrName, MappedAttribute return HTMLElement::mapToEntry(attrName, result); } -void HTMLInputElement::parseMappedAttribute(MappedAttribute *attr) +void HTMLInputElement::parseMappedAttribute(Attribute* attr) { if (attr->name() == nameAttr) { checkedRadioButtons(this).removeButton(this); @@ -2646,8 +2646,36 @@ void HTMLInputElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) cons bool HTMLInputElement::recalcWillValidate() const { - return HTMLFormControlElementWithState::recalcWillValidate() - && inputType() != HIDDEN && inputType() != BUTTON && inputType() != RESET; + switch (inputType()) { + case CHECKBOX: + case COLOR: + case DATE: + case DATETIME: + case DATETIMELOCAL: + case EMAIL: + case FILE: + case ISINDEX: + case MONTH: + case NUMBER: + case PASSWORD: + case RADIO: + case RANGE: + case SEARCH: + case TELEPHONE: + case TEXT: + case TIME: + case URL: + case WEEK: + return HTMLFormControlElementWithState::recalcWillValidate(); + case BUTTON: + case HIDDEN: + case IMAGE: + case RESET: + case SUBMIT: + return false; + } + ASSERT_NOT_REACHED(); + return false; } bool HTMLInputElement::parseToDateComponents(InputType type, const String& formString, DateComponents* out) |