Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(330)

Unified Diff: Source/WebCore/loader/FormSubmission.cpp

Issue 9369055: Merge 106771 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/963/
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/forms/form-submission-create-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/loader/FormSubmission.cpp
===================================================================
--- Source/WebCore/loader/FormSubmission.cpp (revision 107322)
+++ Source/WebCore/loader/FormSubmission.cpp (working copy)
@@ -142,8 +142,11 @@
ASSERT(form);
HTMLFormControlElement* submitButton = 0;
- if (event && event->target() && event->target()->toNode())
- submitButton = static_cast<HTMLFormControlElement*>(event->target()->toNode());
+ if (event && event->target()) {
+ Node* node = event->target()->toNode();
+ if (node && node->isElementNode() && toElement(node)->isFormControlElement())
+ submitButton = static_cast<HTMLFormControlElement*>(node);
+ }
FormSubmission::Attributes copiedAttributes;
copiedAttributes.copyFrom(attributes);
« no previous file with comments | « LayoutTests/fast/forms/form-submission-create-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698