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

Unified Diff: components/autofill/content/renderer/autofill_agent.cc

Issue 715733002: [Android] Show autofill popup after animation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add zoomed page click test. Created 5 years, 11 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
Index: components/autofill/content/renderer/autofill_agent.cc
diff --git a/components/autofill/content/renderer/autofill_agent.cc b/components/autofill/content/renderer/autofill_agent.cc
index 6afbd4ca8dd79d0d60c860e2d41e584424cf114d..8aeeb2d9d6e52e8ce4182e7082892684e2352ca1 100644
--- a/components/autofill/content/renderer/autofill_agent.cc
+++ b/components/autofill/content/renderer/autofill_agent.cc
@@ -214,12 +214,6 @@ void AutofillAgent::FocusedNodeChanged(const WebNode& node) {
if (node.document().frame() != render_frame()->GetWebFrame())
return;
- if (password_generation_agent_ &&
- password_generation_agent_->FocusedNodeHasChanged(node)) {
- is_popup_possibly_visible_ = true;
- return;
- }
-
WebElement web_element = node.toConst<WebElement>();
if (!web_element.document().frame())
@@ -228,16 +222,23 @@ void AutofillAgent::FocusedNodeChanged(const WebNode& node) {
const WebInputElement* element = toWebInputElement(&web_element);
if (!element || !element->isEnabled() || element->isReadOnly() ||
- !element->isTextField() || element->isPasswordField())
+ !element->isTextField())
return;
element_ = *element;
}
-void AutofillAgent::Resized() {
+void AutofillAgent::FocusedElementMovedOnResize() {
HidePopup();
}
+void AutofillAgent::FocusChangeComplete() {
+ if (!element_.isNull() && password_generation_agent_ &&
+ password_generation_agent_->FocusedNodeHasChanged(element_)) {
+ is_popup_possibly_visible_ = true;
+ }
+}
+
void AutofillAgent::didRequestAutocomplete(
const WebFormElement& form) {
DCHECK_EQ(form.document().frame(), render_frame()->GetWebFrame());
@@ -316,12 +317,6 @@ void AutofillAgent::FormControlElementClicked(
switches::kEnableSingleClickAutofill)) {
// Show full suggestions when clicking on an already-focused form field. On
// the initial click (not focused yet), only show password suggestions.
-#if defined(OS_ANDROID)
- // TODO(gcasto): Remove after crbug.com/430318 has been fixed.
- if (!was_focused)
- return;
-#endif
-
options.show_full_suggestion_list =
options.show_full_suggestion_list || was_focused;
options.show_password_suggestions_only = !was_focused;
@@ -785,8 +780,12 @@ void AutofillAgent::LegacyAutofillAgent::FocusedNodeChanged(
agent_->FocusedNodeChanged(node);
}
-void AutofillAgent::LegacyAutofillAgent::Resized() {
- agent_->Resized();
+void AutofillAgent::LegacyAutofillAgent::FocusedElementMovedOnResize() {
+ agent_->FocusedElementMovedOnResize();
+}
+
+void AutofillAgent::LegacyAutofillAgent::FocusChangeComplete() {
+ agent_->FocusChangeComplete();
}
} // namespace autofill

Powered by Google App Engine
This is Rietveld 408576698