Changeset 30095 for trunk/WebCore/html/HTMLButtonElement.cpp
- Timestamp:
- 02/08/08 11:23:08 (10 months ago)
- Files:
-
- 1 modified
-
trunk/WebCore/html/HTMLButtonElement.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/html/HTMLButtonElement.cpp
r28620 r30095 57 57 const AtomicString& HTMLButtonElement::type() const 58 58 { 59 return getAttribute(typeAttr); 59 switch (m_type) { 60 case SUBMIT: { 61 static const AtomicString submit("submit"); 62 return submit; 63 } 64 case BUTTON: { 65 static const AtomicString button("button"); 66 return button; 67 } 68 case RESET: { 69 static const AtomicString reset("reset"); 70 return reset; 71 } 72 } 73 74 ASSERT_NOT_REACHED(); 75 return emptyAtom; 60 76 } 61 77 … … 63 79 { 64 80 if (attr->name() == typeAttr) { 65 if (equalIgnoringCase(attr->value(), "submit")) 66 m_type = SUBMIT; 67 else if (equalIgnoringCase(attr->value(), "reset")) 81 if (equalIgnoringCase(attr->value(), "reset")) 68 82 m_type = RESET; 69 83 else if (equalIgnoringCase(attr->value(), "button")) 70 84 m_type = BUTTON; 85 else 86 m_type = SUBMIT; 71 87 } else if (attr->name() == alignAttr) { 72 88 // Don't map 'align' attribute. This matches what Firefox and IE do, but not Opera.