[webkit-reviews] review denied: [Bug 16798] <button> does not have type=submit (Acid3 bug) : [Attachment 18433] Proposed patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 14 10:58:26 PST 2008

Darin Adler <darin at apple.com> has denied Andrew Wellington
<proton at wiretapped.net>'s request for review:
Bug 16798: <button> does not have type=submit (Acid3 bug)

Attachment 18433: Proposed patch

------- Additional Comments from Darin Adler <darin at apple.com>
+void HTMLButtonElement::attributeChanged(Attribute* attr, bool preserveDecls)
+    if (attr->name() == typeAttr && !attr->value())
+	 m_type = SUBMIT;
+    HTMLGenericFormElement::attributeChanged(attr, preserveDecls);

We should not add this override. Instead the code for this should just go into
parseMappedAttribute. It should just be rewritten so it sets m_type to SUBMIT
any time the value is neither RESET nor BUTTON.

I'd like to confirm that HTMLButtonElement.type really returns a different
value than getAttribute("type") in the other browsers. Accordingly, the test
case should check both type and getAttribute("type").

+debug('<span>Start test 1</span>');

I don't think these are great. We normally don't include markup in the debug
statements, and I think it's better not to. And I don't think it adds much to
the output to just number tests here. Maybe if the messages said things like
"removing type attribute" it would be better.

More information about the webkit-reviews mailing list