Commit ba021ece authored by darin's avatar darin

Reviewed by Maciej and Trey.

	- fixed 3138063 -- REGRESSION: JavaScript-submitted form activates input type=image (webmail.mac.com)

	JavaScript-submitted forms must not get a submit button activated as return-key-submitted ones do.

        * khtml/html/html_formimpl.h: Add boolean activateSubmitButton parameter to submit.
        * khtml/html/html_formimpl.cpp:
        (HTMLFormElementImpl::prepareSubmit): Pass true for activateSubmitButton.
        (HTMLFormElementImpl::submit): Only activate a button if activateSubmitButton is true.

        * khtml/dom/html_form.cpp: (HTMLFormElement::submit): Pass false for activateSubmitButton.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3237 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 559ff05c
2003-01-02 Darin Adler <darin@apple.com>
Reviewed by Maciej and Trey.
- fixed 3138063 -- REGRESSION: JavaScript-submitted form activates input type=image (webmail.mac.com)
JavaScript-submitted forms must not get a submit button activated as return-key-submitted ones do.
* khtml/html/html_formimpl.h: Add boolean activateSubmitButton parameter to submit.
* khtml/html/html_formimpl.cpp:
(HTMLFormElementImpl::prepareSubmit): Pass true for activateSubmitButton.
(HTMLFormElementImpl::submit): Only activate a button if activateSubmitButton is true.
* khtml/dom/html_form.cpp: (HTMLFormElement::submit): Pass false for activateSubmitButton.
2003-01-02 David Hyatt <hyatt@apple.com>
Fix for the 3137790. This patch passes the mouse event x and y as
......
2003-01-02 Darin Adler <darin@apple.com>
Reviewed by Maciej and Trey.
- fixed 3138063 -- REGRESSION: JavaScript-submitted form activates input type=image (webmail.mac.com)
JavaScript-submitted forms must not get a submit button activated as return-key-submitted ones do.
* khtml/html/html_formimpl.h: Add boolean activateSubmitButton parameter to submit.
* khtml/html/html_formimpl.cpp:
(HTMLFormElementImpl::prepareSubmit): Pass true for activateSubmitButton.
(HTMLFormElementImpl::submit): Only activate a button if activateSubmitButton is true.
* khtml/dom/html_form.cpp: (HTMLFormElement::submit): Pass false for activateSubmitButton.
2003-01-02 David Hyatt <hyatt@apple.com>
Fix for the 3137790. This patch passes the mouse event x and y as
......
......@@ -275,7 +275,7 @@ void HTMLFormElement::setTarget( const DOMString &value )
void HTMLFormElement::submit( )
{
if(impl) static_cast<HTMLFormElementImpl*>(impl)->submit( );
if(impl) static_cast<HTMLFormElementImpl*>(impl)->submit( false );
}
void HTMLFormElement::reset( )
......
......@@ -407,12 +407,12 @@ bool HTMLFormElementImpl::prepareSubmit()
m_insubmit = false;
if ( m_doingsubmit )
submit();
submit(true);
return m_doingsubmit;
}
void HTMLFormElementImpl::submit( )
void HTMLFormElementImpl::submit( bool activateSubmitButton )
{
if ( m_insubmit ) {
m_doingsubmit = true;
......@@ -426,7 +426,7 @@ void HTMLFormElementImpl::submit( )
#endif
HTMLGenericFormElementImpl* firstSuccessfulSubmitButton = 0;
bool needButtonActivation = true; // do we need to activate a submit button?
bool needButtonActivation = activateSubmitButton; // do we need to activate a submit button?
KHTMLView *view = getDocument()->view();
for (QPtrListIterator<HTMLGenericFormElementImpl> it(formElements); it.current(); ++it) {
......
......@@ -91,7 +91,7 @@ public:
void removeFormElement(HTMLGenericFormElementImpl *);
bool prepareSubmit();
void submit();
void submit(bool activateSubmitButton);
void reset();
void setMalformed(bool malformed) { m_malformed = malformed; }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment