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

Unified Diff: third_party/WebKit/Source/core/html/HTMLInputElement.cpp

Issue 2452903002: INPUT element: Updating value to the previous defaultValue should dispatch "change" event. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/forms/text/text-change-event-after-updating-default.html ('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/HTMLInputElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
index 8642efce92e9f48d25823d94c16738ebd327937d..2c2cecd0395aed50927c30df90dd91b22abe9fa3 100644
--- a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
@@ -718,6 +718,8 @@ void HTMLInputElement::parseAttribute(const QualifiedName& name,
setNeedsStyleRecalc(
SubtreeStyleChange,
StyleChangeReasonForTracing::fromAttribute(valueAttr));
+ if (m_inputType->valueMode() == ValueMode::kValue)
+ setTextAsOfLastFormControlChangeEvent(sanitizeValue(value));
}
m_needsToUpdateViewValue = true;
setNeedsValidityCheck();
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/forms/text/text-change-event-after-updating-default.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698