RESOLVED FIXED 138403
Stop special-casing the empty string in HTMLInputElement.type setter
https://bugs.webkit.org/show_bug.cgi?id=138403
Summary Stop special-casing the empty string in HTMLInputElement.type setter
Chris Dumez
Reported 2014-11-04 20:39:49 PST
We should stop special-casing the empty string in HTMLInputElement.type setter. Currently, if input.type is set to "", we will remove the type attribute. This is inconsistent with the spec and other browsers (tested Firefox 33 and Chrome 38). We should set the attribute to the empty string instead of removing it.
Attachments
Patch (8.68 KB, patch)
2014-11-04 21:40 PST, Chris Dumez
no flags
Patch (8.90 KB, patch)
2014-11-05 09:23 PST, Chris Dumez
no flags
Chris Dumez
Comment 1 2014-11-04 21:40:08 PST
Ryosuke Niwa
Comment 2 2014-11-04 22:52:40 PST
Comment on attachment 241002 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=241002&action=review > LayoutTests/fast/dom/HTMLInputElement/input-type-attribute.html:13 > +input.type = "button"; > +shouldBeEqualToString("input.type", "button"); We should do the assignment inside shouldBeEqualToString or in evalAndLog so that it's visible in the expected result.
Chris Dumez
Comment 3 2014-11-05 09:23:04 PST
WebKit Commit Bot
Comment 4 2014-11-05 09:41:03 PST
Comment on attachment 241033 [details] Patch Clearing flags on attachment: 241033 Committed r175622: <http://trac.webkit.org/changeset/175622>
WebKit Commit Bot
Comment 5 2014-11-05 09:41:07 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.