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

Unified Diff: ios/web/web_state/js/resources/core.js

Issue 2763173002: Form submission with blank target is broken. (Closed)
Patch Set: Fix JS formatting. Created 3 years, 9 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 | « no previous file | ios/web/web_state/ui/crw_web_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/js/resources/core.js
diff --git a/ios/web/web_state/js/resources/core.js b/ios/web/web_state/js/resources/core.js
index f1a302f2be7fea56efd2a4f13cfcbfab761cd92f..2eaef1ebff88d01d0c2f65924da1a3f00f4daf53 100644
--- a/ios/web/web_state/js/resources/core.js
+++ b/ios/web/web_state/js/resources/core.js
@@ -552,21 +552,17 @@ goog.require('__crWeb.message');
// Capture form submit actions.
document.addEventListener('submit', function(evt) {
+ var action;
if (evt['defaultPrevented'])
return;
-
- var form = evt.target;
- var targetsFrame = form.target && hasFrame_(window, form.target);
-
- var action = form.getAttribute('action');
+ action = evt.target.getAttribute('action');
// Default action is to re-submit to same page.
if (!action)
action = document.location.href;
invokeOnHost_({
'command': 'document.submit',
'formName': __gCrWeb.common.getFormIdentifier(evt.srcElement),
- 'href': __gCrWeb['getFullyQualifiedURL'](action),
- 'targetsFrame': targetsFrame
+ 'href': __gCrWeb['getFullyQualifiedURL'](action)
});
}, false);
« no previous file with comments | « no previous file | ios/web/web_state/ui/crw_web_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698