Commit 018bf76b authored by sebsg's avatar sebsg Committed by Commit Bot

[Autofill] Fill Autocomplete correctly after suggestion.

Tbr-ing tkent@ for the TODO comment I added in WebInputElement.h

Bug: 777097
Change-Id: Ia7c9b839521211d4527f067f848cd7988a49f64c
Tbr: tkent@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/734104
Commit-Queue: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Reviewed-by: default avatarRoger McFarlane <rogerm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512553}
parent dcda3596
......@@ -738,7 +738,7 @@ void AutofillAgent::QueryAutofillSuggestions(
void AutofillAgent::DoFillFieldWithValue(const base::string16& value,
WebInputElement* node) {
base::AutoReset<bool> auto_reset(&ignore_text_changes_, true);
node->SetEditingValue(
node->SetAutofillValue(
blink::WebString::FromUTF16(value.substr(0, node->MaxLength())));
password_autofill_agent_->UpdateStateForTextChange(*node);
}
......
......@@ -73,6 +73,8 @@ class BLINK_EXPORT WebInputElement final : public WebFormControlElement {
// Sets the value inside the text field without being sanitized. Can't be
// used if a renderer doesn't exist or on a non text field type. Caret will
// be moved to the end.
// TODO(crbug.com/777850): Remove all references to SetEditingValue, as it's
// not used anymore.
void SetEditingValue(const WebString&);
bool IsValidValue(const WebString&) const;
bool IsChecked() const;
......
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