Commit bd92eff9 authored by Olivier Robin's avatar Olivier Robin Committed by Commit Bot

Check CanCallJavascriptFunction in Form Input

Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs
Change-Id: Icc149b76bb5dc5abe436eac8e10ae9935f66fa69
Reviewed-on: https://chromium-review.googlesource.com/1251528Reviewed-by: default avatarMoe Ahmadi <mahmadi@chromium.org>
Reviewed-by: default avatarOlivier Robin <olivierrobin@chromium.org>
Commit-Queue: Olivier Robin <olivierrobin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595525}
parent c598cda6
......@@ -8,6 +8,7 @@
#include "base/mac/foundation_util.h"
#include "base/mac/scoped_block.h"
#include "components/autofill/core/common/autofill_features.h"
#include "components/autofill/ios/browser/autofill_switches.h"
#import "components/autofill/ios/browser/js_suggestion_manager.h"
#import "components/autofill/ios/form_util/form_activity_observer_bridge.h"
#include "components/autofill/ios/form_util/form_activity_params.h"
......@@ -24,6 +25,7 @@
#import "ios/chrome/browser/web_state_list/web_state_list.h"
#import "ios/web/public/url_scheme_util.h"
#import "ios/web/public/web_state/js/crw_js_injection_receiver.h"
#include "ios/web/public/web_state/web_frame.h"
#include "ios/web/public/web_state/web_state.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
......@@ -180,6 +182,12 @@
return;
}
if (autofill::switches::IsAutofillIFrameMessagingEnabled() &&
(!frame || !frame->CanCallJavaScriptFunction())) {
[self reset];
return;
}
if (params.type == "blur" || params.type == "change" ||
params.type == "form_changed") {
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment