[webkit-reviews] review denied: [Bug 9756] A form without a submit button unexpectedly performs its action when Return is pressed : [Attachment 54001] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 23 00:58:22 PDT 2010


Adam Barth <abarth at webkit.org> has denied Dimitri Glazkov (Google)
<dglazkov at chromium.org>'s request for review:
Bug 9756: A form without a submit button unexpectedly performs its action when
Return is pressed
https://bugs.webkit.org/show_bug.cgi?id=9756

Attachment 54001: Patch
https://bugs.webkit.org/attachment.cgi?id=54001&action=review

------- Additional Comments from Adam Barth <abarth at webkit.org>
This change is probable file.  I'm giving it an r- mostly for the abysmal
change log.

LayoutTests/fast/forms/implicit-submission.html:59
 +	var html = "<form action=\"data:text/html,<scri" +
"pt>javascript:parent.postMessage('y', '*')</scri" + "pt>\">";
Clever

LayoutTests/fast/forms/implicit-submission.html:73
 +		html += "<input type=\"" + type + "\" id=\"" + id + "\">";
This might be easier to do with the DOM.

LayoutTests/fast/forms/implicit-submission.html:93
 +	iframe.src = "data:text/html,<scri" + "pt>var manifest = \"" +
manifest[1] + "\";\n" + String(runTestInIframe) + 
You actually only need to split the close script tag.  You can leave the open
tag in tact.

WebCore/ChangeLog:7
 +  
Can you add more information to the change log?  There was a lot of good
discussion on the bug.	We should summarize the conclusions here for posterity
in case we need to revisit this issue.

WebCore/html/HTMLFormElement.cpp:609
 +	    if (formElements[i]->hasLocalName(inputTag) &&
(static_cast<HTMLInputElement*>(formElements[i]))->isTextField() &&
++textControlCount > 1)
I hate this static cast pattern, but I realize it's endemic.


More information about the webkit-reviews mailing list