https://bugs.webkit.org/show_bug.cgi?id=77813
Reviewed by Kent Tamura.
Source/WebCore:
Test: fast/forms/form-submission-create-crash.xhtml
* loader/FormSubmission.cpp:
(WebCore::FormSubmission::create):
LayoutTests:
* fast/forms/form-submission-create-crash-expected.txt: Added.
* fast/forms/form-submission-create-crash.xhtml: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@106771
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-02-05 Abhishek Arya <inferno@chromium.org>
+
+ Crash in FormSubmission::create.
+ https://bugs.webkit.org/show_bug.cgi?id=77813
+
+ Reviewed by Kent Tamura.
+
+ * fast/forms/form-submission-create-crash-expected.txt: Added.
+ * fast/forms/form-submission-create-crash.xhtml: Added.
+
2012-02-05 Adam Barth <abarth@webkit.org>
Rebaseline xss-inactive-closure.html. This test "fails" because of a
--- /dev/null
+Test passes if it does not crash.
+
--- /dev/null
+<html xmlns='http://www.w3.org/1999/xhtml'>
+Test passes if it does not crash.
+<form>
+<input id="submit" type="submit" />
+</form>
+<script>
+if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.waitUntilDone();
+}
+
+textNode = document.createTextNode("x");
+document.getElementById("submit").appendChild(textNode);
+
+runTest = function() {
+ event = document.createEvent("MouseEvent");
+ event.initEvent("click");
+ textNode.dispatchEvent(event);
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+}
+
+setTimeout(runTest, 0);
+</script>
+</html>
+2012-02-05 Abhishek Arya <inferno@chromium.org>
+
+ Crash in FormSubmission::create.
+ https://bugs.webkit.org/show_bug.cgi?id=77813
+
+ Reviewed by Kent Tamura.
+
+ Test: fast/forms/form-submission-create-crash.xhtml
+
+ * loader/FormSubmission.cpp:
+ (WebCore::FormSubmission::create):
+
2012-02-05 Andreas Kling <awesomekling@apple.com>
Remove unused file MappedAttributeEntry.h.
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);