[VD][Autofill] No username matching required for autofill 44/320644/4
authorLiu Feifei <feifei08.liu@samsung.com>
Wed, 20 Nov 2024 13:54:28 +0000 (21:54 +0800)
committerBot Blink <blinkbot@samsung.com>
Thu, 21 Nov 2024 06:28:46 +0000 (06:28 +0000)
There are two issued scenerios:
1. User saved username without "@gmail.com" for google.com on Samsung Pass.
   Example : username is "aaa"
   When autofill do username matching, potential_suggestion(from pass_agent)
   will be "aaa", but current_username(from username element) will be
   "aaa@gmail.com".
   Username matching fails, so that autofill will fail.
2. User saved username as a phone number for website on Samsung Pass.
   Example : username is "151xxxxxxxx"
   When autofill do username matching, potential_suggestion(from pass_agent)
   will be "151xxxxxxxx", but current_username(from username element) will be
   "+86 151 xxx xxx xx".
   Username matching fails, so that autofill will fail.
Since Tizen autofill will get both username and password from pass_agent,
there is no need to do username matching before fill in password

Change-Id: Iae8f1d6573bee11c541995520e97691d93125ba9
Signed-off-by: Liu Feifei <feifei08.liu@samsung.com>
components/autofill/content/renderer/password_autofill_agent.cc

index c56afaef724e6a242a0b5f3a50d57d31e2c5c643..6898c028b9d1eaec892cdd7738d188c37a0df3e9 100644 (file)
@@ -156,6 +156,9 @@ bool DoUsernamesMatch(const std::u16string& potential_suggestion,
   LOG(INFO) << "[Autofill] potential_suggestion : " << potential_suggestion
             << ", current_username = " << current_username
             << ", exact_match = " << (int)exact_match;
+#if BUILDFLAG(IS_TIZEN_TV)
+  return true;
+#endif
   if (potential_suggestion == current_username)
     return true;
   return !exact_match && IsPrefixOfEmailEndingWithAtSign(current_username,