[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
trey
trey at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:16:15 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit a7641c273b697de7251ce867336893a65ed4a05e
Author: trey <trey at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Dec 18 08:15:03 2002 +0000
3105755 - can't log in to amex
The problem was on c/r khtml would not pick a submit button to add to the
form state that is sent. We now "activate" the first submit button that meets the
criteria for being a "successful" form element, if no button was already
activated by being clicked on.
Reviewed by Darin.
* khtml/html/html_formimpl.cpp:
(HTMLFormElementImpl::submit): Pick a submit button to use, if none was already
chosen by virtue of being clicked.
(HTMLButtonElementImpl::isSuccessfulSubmitButton): New getter to support
submit button selection.
(HTMLButtonElementImpl::isActivatedSubmit): New getter on existing prop.
(HTMLButtonElementImpl::setActivatedSubmit): New setter on existing prop.
(HTMLInputElementImpl::isSuccessfulSubmitButton): New getter to support
submit button selection.
(HTMLInputElementImpl::isActivatedSubmit): New getter on existing prop.
(HTMLInputElementImpl::setActivatedSubmit): New setter on existing prop.
* khtml/html/html_formimpl.h: Add new methods to common superclass.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3119 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 366ac4c..630d620 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,27 @@
+2002-12-18 Trey Matteson <trey at apple.com>
+
+ 3105755 - can't log in to amex
+
+ The problem was on c/r khtml would not pick a submit button to add to the
+ form state that is sent. We now "activate" the first submit button that meets the
+ criteria for being a "successful" form element, if no button was already
+ activated by being clicked on.
+
+ Reviewed by Darin.
+
+ * khtml/html/html_formimpl.cpp:
+ (HTMLFormElementImpl::submit): Pick a submit button to use, if none was already
+ chosen by virtue of being clicked.
+ (HTMLButtonElementImpl::isSuccessfulSubmitButton): New getter to support
+ submit button selection.
+ (HTMLButtonElementImpl::isActivatedSubmit): New getter on existing prop.
+ (HTMLButtonElementImpl::setActivatedSubmit): New setter on existing prop.
+ (HTMLInputElementImpl::isSuccessfulSubmitButton): New getter to support
+ submit button selection.
+ (HTMLInputElementImpl::isActivatedSubmit): New getter on existing prop.
+ (HTMLInputElementImpl::setActivatedSubmit): New setter on existing prop.
+ * khtml/html/html_formimpl.h: Add new methods to common superclass.
+
2002-12-17 Don Melton <gramps at apple.com>
Reviewed by Joyce Chow.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 366ac4c..630d620 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,27 @@
+2002-12-18 Trey Matteson <trey at apple.com>
+
+ 3105755 - can't log in to amex
+
+ The problem was on c/r khtml would not pick a submit button to add to the
+ form state that is sent. We now "activate" the first submit button that meets the
+ criteria for being a "successful" form element, if no button was already
+ activated by being clicked on.
+
+ Reviewed by Darin.
+
+ * khtml/html/html_formimpl.cpp:
+ (HTMLFormElementImpl::submit): Pick a submit button to use, if none was already
+ chosen by virtue of being clicked.
+ (HTMLButtonElementImpl::isSuccessfulSubmitButton): New getter to support
+ submit button selection.
+ (HTMLButtonElementImpl::isActivatedSubmit): New getter on existing prop.
+ (HTMLButtonElementImpl::setActivatedSubmit): New setter on existing prop.
+ (HTMLInputElementImpl::isSuccessfulSubmitButton): New getter to support
+ submit button selection.
+ (HTMLInputElementImpl::isActivatedSubmit): New getter on existing prop.
+ (HTMLInputElementImpl::setActivatedSubmit): New setter on existing prop.
+ * khtml/html/html_formimpl.h: Add new methods to common superclass.
+
2002-12-17 Don Melton <gramps at apple.com>
Reviewed by Joyce Chow.
diff --git a/WebCore/khtml/html/html_formimpl.cpp b/WebCore/khtml/html/html_formimpl.cpp
index e21ac99..d815177 100644
--- a/WebCore/khtml/html/html_formimpl.cpp
+++ b/WebCore/khtml/html/html_formimpl.cpp
@@ -421,6 +421,9 @@ void HTMLFormElementImpl::submit( )
kdDebug( 6030 ) << "submitting!" << endl;
#endif
+ HTMLGenericFormElementImpl* firstSuccessfulSubmitButton = 0;
+ bool needButtonActivation = true; // do we need to activate a submit button?
+
KHTMLView *view = getDocument()->view();
for (QPtrListIterator<HTMLGenericFormElementImpl> it(formElements); it.current(); ++it) {
HTMLGenericFormElementImpl* current = it.current();
@@ -431,6 +434,18 @@ void HTMLFormElementImpl::submit( )
HTMLInputElementImpl *input = static_cast<HTMLInputElementImpl *>(current);
view->addFormCompletionItem(input->name().string(), input->value().string());
}
+
+ if (needButtonActivation) {
+ if (current->isActivatedSubmit()) {
+ needButtonActivation = false;
+ } else if (firstSuccessfulSubmitButton == 0 && current->isSuccessfulSubmitButton()) {
+ firstSuccessfulSubmitButton = current;
+ }
+ }
+ }
+
+ if (needButtonActivation && firstSuccessfulSubmitButton) {
+ firstSuccessfulSubmitButton->setActivatedSubmit(true);
}
bool ok;
@@ -448,6 +463,10 @@ void HTMLFormElementImpl::submit( )
}
}
+ if (needButtonActivation && firstSuccessfulSubmitButton) {
+ firstSuccessfulSubmitButton->setActivatedSubmit(false);
+ }
+
m_doingsubmit = m_insubmit = false;
}
@@ -916,6 +935,21 @@ void HTMLButtonElementImpl::defaultEventHandler(EventImpl *evt)
HTMLGenericFormElementImpl::defaultEventHandler(evt);
}
+bool HTMLButtonElementImpl::isSuccessfulSubmitButton() const
+{
+ return m_type == SUBMIT && !m_disabled && !name().isEmpty();
+}
+
+bool HTMLButtonElementImpl::isActivatedSubmit() const
+{
+ return m_activeSubmit;
+}
+
+void HTMLButtonElementImpl::setActivatedSubmit(bool flag)
+{
+ m_activeSubmit = flag;
+}
+
bool HTMLButtonElementImpl::encoding(const QTextCodec* codec, khtml::encodingList& encoding, bool /*multipart*/)
{
if (m_type != SUBMIT || name().isEmpty() || !m_activeSubmit)
@@ -1261,6 +1295,21 @@ DOMString HTMLInputElementImpl::altText() const
return alt;
}
+bool HTMLInputElementImpl::isSuccessfulSubmitButton() const
+{
+ return m_type == SUBMIT && !m_disabled && !name().isEmpty();
+}
+
+bool HTMLInputElementImpl::isActivatedSubmit() const
+{
+ return m_activeSubmit;
+}
+
+void HTMLInputElementImpl::setActivatedSubmit(bool flag)
+{
+ m_activeSubmit = flag;
+}
+
bool HTMLInputElementImpl::encoding(const QTextCodec* codec, khtml::encodingList& encoding, bool multipart)
{
QString nme = name().string();
diff --git a/WebCore/khtml/html/html_formimpl.h b/WebCore/khtml/html/html_formimpl.h
index 9a7b775..4c9fd85 100644
--- a/WebCore/khtml/html/html_formimpl.h
+++ b/WebCore/khtml/html/html_formimpl.h
@@ -174,6 +174,10 @@ public:
virtual QString state();
QString findMatchingState(QStringList &states);
+ virtual bool isSuccessfulSubmitButton() const { return false; }
+ virtual bool isActivatedSubmit() const { return false; }
+ virtual void setActivatedSubmit(bool flag) { }
+
protected:
HTMLFormElementImpl *getForm() const;
@@ -205,6 +209,10 @@ public:
virtual void defaultEventHandler(EventImpl *evt);
virtual bool encoding(const QTextCodec*, khtml::encodingList&, bool);
+ virtual bool isSuccessfulSubmitButton() const;
+ virtual bool isActivatedSubmit() const;
+ virtual void setActivatedSubmit(bool flag);
+
protected:
DOMString m_value;
QString m_currValue;
@@ -288,6 +296,10 @@ public:
virtual void attach();
virtual bool encoding(const QTextCodec*, khtml::encodingList&, bool);
+ virtual bool isSuccessfulSubmitButton() const;
+ virtual bool isActivatedSubmit() const;
+ virtual void setActivatedSubmit(bool flag);
+
typeEnum inputType() const { return m_type; }
virtual void reset();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list