Chromium Code Reviews| 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 85f4fad689dba9c397ecd85020a124a18a65f86d..baa36e8f0465019bf820952a9efef12712d6dcf6 100644 |
| --- a/components/autofill/content/renderer/autofill_agent.cc |
| +++ b/components/autofill/content/renderer/autofill_agent.cc |
| @@ -289,8 +289,7 @@ void AutofillAgent::setIgnoreTextChanges(bool ignore) { |
| void AutofillAgent::InputElementClicked(const WebInputElement& element, |
| bool was_focused, |
| bool is_focused) { |
| - if (was_focused) |
| - ShowSuggestions(element, true, false, true, false); |
| + ShowSuggestions(element, true, false, true, false, true); |
|
Garrett Casto
2014/02/19 21:20:19
Ilya, are you okay with Autofill also showing on f
jww
2014/02/19 21:56:48
I'm worried that would be hard-to-understand behav
jww
2014/02/19 22:14:39
Obviously we're still waiting for comments on the
jww
2014/02/21 02:43:28
My bad. I misunderstood your point in a similar wa
|
| } |
| void AutofillAgent::InputElementLostFocus() { |
| @@ -339,7 +338,7 @@ void AutofillAgent::TextFieldDidChangeImpl(const WebInputElement& element) { |
| return; |
| } |
| - ShowSuggestions(element, false, true, false, false); |
| + ShowSuggestions(element, false, true, false, false, false); |
| FormData form; |
| FormFieldData field; |
| @@ -358,11 +357,11 @@ void AutofillAgent::textFieldDidReceiveKeyDown(const WebInputElement& element, |
| if (event.windowsKeyCode == ui::VKEY_DOWN || |
| event.windowsKeyCode == ui::VKEY_UP) |
| - ShowSuggestions(element, true, true, true, false); |
| + ShowSuggestions(element, true, true, true, false, false); |
| } |
| void AutofillAgent::openTextDataListChooser(const WebInputElement& element) { |
| - ShowSuggestions(element, true, false, false, true); |
| + ShowSuggestions(element, true, false, false, true, false); |
| } |
| void AutofillAgent::AcceptDataListSuggestion( |
| @@ -493,7 +492,8 @@ void AutofillAgent::ShowSuggestions(const WebInputElement& element, |
| bool autofill_on_empty_values, |
| bool requires_caret_at_end, |
| bool display_warning_if_disabled, |
| - bool datalist_only) { |
| + bool datalist_only, |
| + bool show_all) { |
| if (!element.isEnabled() || element.isReadOnly() || !element.isTextField() || |
| element.isPasswordField()) |
| return; |
| @@ -515,7 +515,7 @@ void AutofillAgent::ShowSuggestions(const WebInputElement& element, |
| } |
| element_ = element; |
| - if (password_autofill_agent_->ShowSuggestions(element)) |
| + if (password_autofill_agent_->ShowSuggestions(element, show_all)) |
| return; |
| // If autocomplete is disabled at the field level, ensure that the native |