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

Unified Diff: third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp

Issue 2480133003: INPUT element: Move setTextAsOfLastFormControlChangeEvent() call in setValue(). (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « third_party/WebKit/Source/core/html/forms/InputType.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp
diff --git a/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp b/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp
index fe8984381bab9ca33b2bc20d3f5bacc35a65694b..1e28a40a32714934723b01b29f9c36455d7fbaad 100644
--- a/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp
+++ b/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp
@@ -182,8 +182,12 @@ void TextFieldInputType::setValue(const String& sanitizedValue,
break;
}
+ // TODO(tkent): Calling setTextAsOfLastFormControlChangeEvent() twice is very
+ // suspicious.
if (!element().isFocused())
element().setTextAsOfLastFormControlChangeEvent(element().value());
+ if (eventBehavior == DispatchNoEvent)
+ element().setTextAsOfLastFormControlChangeEvent(element().value());
}
void TextFieldInputType::handleKeydownEvent(KeyboardEvent* event) {
« no previous file with comments | « third_party/WebKit/Source/core/html/forms/InputType.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698