Changeset 30095 in webkit
- Timestamp:
- Feb 8, 2008, 11:23:08 AM (17 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r30092 r30095 1 2008-02-08 David Hyatt <hyatt@apple.com> 2 3 Fix for bug 16798, button should default to type=submit. 4 5 Reviewed by darin 6 7 * html/HTMLButtonElement.cpp: 8 (WebCore::HTMLButtonElement::type): 9 (WebCore::HTMLButtonElement::parseMappedAttribute): 10 1 11 2008-02-08 Rodney Dawes <dobey@wayofthemonkey.com> 2 12 -
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.
Note:
See TracChangeset
for help on using the changeset viewer.