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

Unified Diff: Source/core/html/HTMLOutputElement.cpp

Issue 178253006: Output Element defaultValue should be based on textContent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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
Index: Source/core/html/HTMLOutputElement.cpp
diff --git a/Source/core/html/HTMLOutputElement.cpp b/Source/core/html/HTMLOutputElement.cpp
index 6751780a06e96282178b4251820f8b51141941dd..76932d48cbc757effe3104de743f965ef36e8584 100644
--- a/Source/core/html/HTMLOutputElement.cpp
+++ b/Source/core/html/HTMLOutputElement.cpp
@@ -118,8 +118,10 @@ void HTMLOutputElement::setValue(const String& value)
setTextContentInternal(value);
}
-String HTMLOutputElement::defaultValue() const
+String HTMLOutputElement::defaultValue()
{
+ if (m_isDefaultValueMode && m_defaultValue != value())
+ setDefaultValue(value());
return m_defaultValue;
}

Powered by Google App Engine
This is Rietveld 408576698