summaryrefslogtreecommitdiffstats
path: root/ios
diff options
context:
space:
mode:
Diffstat (limited to 'ios')
-rw-r--r--ios/chrome/browser/passwords/password_controller.mm8
1 files changed, 7 insertions, 1 deletions
diff --git a/ios/chrome/browser/passwords/password_controller.mm b/ios/chrome/browser/passwords/password_controller.mm
index 1938757..b62751e 100644
--- a/ios/chrome/browser/passwords/password_controller.mm
+++ b/ios/chrome/browser/passwords/password_controller.mm
@@ -339,13 +339,19 @@ bool GetPageURLAndCheckTrustLevel(web::WebState* web_state, GURL* page_url) {
if (!GetPageURLAndCheckTrustLevel(webState, &pageURL))
return;
- if (!web::UrlHasWebScheme(pageURL) || !webState->ContentIsHTML())
+ if (!web::UrlHasWebScheme(pageURL))
return;
// Notify the password manager that the page loaded so it can clear its own
// per-page state.
passwordManager_->DidNavigateMainFrame();
+ if (!webState->ContentIsHTML()) {
+ // If the current page is not HTML, it does not contain any HTML forms.
+ [self
+ didFinishPasswordFormExtraction:std::vector<autofill::PasswordForm>()];
+ }
+
// Read all password forms from the page and send them to the password
// manager.
base::WeakNSObject<PasswordController> weakSelf(self);