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

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

Issue 2089053002: Delay to apply |checked| attribute only if the document has form state to be restored. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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: 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 1e3cf9fb3148968f90afeaf2ccecffffa97941c8..8243c7a680b6d6b369f3da3fd041a4ef58e61347 100644
--- a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
@@ -696,7 +696,7 @@ void HTMLInputElement::parseAttribute(const QualifiedName& name, const AtomicStr
// restore. We shouldn't call setChecked() even if this has the checked
// attribute. So, delay the setChecked() call until
// finishParsingChildren() is called if parsing is in progress.
- if (!m_parsingInProgress && !m_dirtyCheckedness) {
+ if ((!m_parsingInProgress || !document().formController().hasFormStates()) && !m_dirtyCheckedness) {
setChecked(!value.isNull());
m_dirtyCheckedness = false;
}

Powered by Google App Engine
This is Rietveld 408576698