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

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

Issue 2368193002: Introduce HTMLInputElement::m_hasDirtyValue. (Closed)
Patch Set: Fix Windows build Created 4 years, 3 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 | « no previous file | third_party/WebKit/Source/core/html/HTMLInputElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLInputElement.h
diff --git a/third_party/WebKit/Source/core/html/HTMLInputElement.h b/third_party/WebKit/Source/core/html/HTMLInputElement.h
index a5633c857e556c87c7ba9ec9e72e73f82cc689ae..8d3369d15147a9740d756823f2df82854da0f461 100644
--- a/third_party/WebKit/Source/core/html/HTMLInputElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLInputElement.h
@@ -119,7 +119,7 @@ public:
// Checks if the specified string would be a valid value.
// We should not call this for types with no string value such as CHECKBOX and RADIO.
bool isValidValue(const String&) const;
- bool hasDirtyValue() const { return !m_valueIfDirty.isNull(); }
+ bool hasDirtyValue() const;
String sanitizeValue(const String&) const;
@@ -374,11 +374,15 @@ private:
bool shouldDispatchFormControlChangeEvent(String&, String&) override;
AtomicString m_name;
+ // A dirty value. isNull() means the value is not dirty and we should refer
+ // to |value| content attribute value.
String m_valueIfDirty;
String m_suggestedValue;
int m_size;
int m_maxLength;
int m_minLength;
+ // https://html.spec.whatwg.org/multipage/forms.html#concept-input-value-dirty-flag
+ unsigned m_hasDirtyValue : 1;
// https://html.spec.whatwg.org/multipage/forms.html#concept-fe-checked
unsigned m_isChecked : 1;
// https://html.spec.whatwg.org/multipage/forms.html#concept-input-checked-dirty-flag
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLInputElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698