-
dbates@webkit.org authored
Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=30491 Fixes an issue where pressing return/enter on the keyboard in <isindex> does not submit it if is not within a <form>. According to the HTML 2.0 thru HTML 4.01 spec (http://www.w3.org/MarkUp/html-spec/html-spec_7.html#SEC7.5), the <isindex> element does not need to be within a <form> element in order to submit it. It can submitted on its own. Also, if present, the href property of the <base> element will dictate where to submit the value of the <isindex> element (this is analogous to the action property of the <form> element). Tests: http/tests/misc/isindex-with-no-form-base-href.html http/tests/misc/isindex-with-no-form.html * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler): Calls createTemporaryFormForIsIndex() to create a <form> if none is present and we are an <isindex> element. (WebCore::HTMLInputElement::createTemporaryFormForIsIndex): Added. * html/HTMLInputElement.h: 2009-10-26 Daniel Bates <dbates@webkit.org> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=30491 Test that the <isindex> element can be submitted without being enclosed within a <form> element. Also tests that the href property of the <base> element can be used to direct where the submission is sent. * http/tests/misc/isindex-with-no-form-base-href-expected.txt: Added. * http/tests/misc/isindex-with-no-form-base-href.html: Added. * http/tests/misc/isindex-with-no-form-expected.txt: Added. * http/tests/misc/isindex-with-no-form.html: Added. * http/tests/misc/resources/isindex-with-no-form-base-href-submit.html: Added. * http/tests/misc/resources/isindex-with-no-form-base-href.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50132 268f45cc-cd09-0410-ab3c-d52691b4dbfc
c6b0081f