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

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

Issue 1763553002: Invalidate :default pseudo classes when a default button is added or removed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: return -> continue Created 4 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
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLFormElement.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/HTMLInputElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
index 5b0c88c1637ab1d087f0011daee466c585d87bde..1a52b21e6db3ad6dc24f78a46ace39a749f65a1f 100644
--- a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
@@ -475,6 +475,7 @@ void HTMLInputElement::updateType()
bool didStoreValue = m_inputType->storesValueSeparateFromAttribute();
bool didRespectHeightAndWidth = m_inputType->shouldRespectHeightAndWidthAttributes();
+ bool couldBeSuccessfulSubmitButton = canBeSuccessfulSubmitButton();
m_inputTypeView->destroyShadowSubtree();
lazyReattachIfAttached();
@@ -529,6 +530,8 @@ void HTMLInputElement::updateType()
addToRadioButtonGroup();
setNeedsValidityCheck();
+ if ((couldBeSuccessfulSubmitButton || canBeSuccessfulSubmitButton()) && formOwner() && inDocument())
+ formOwner()->invalidateDefaultButtonStyle();
notifyFormStateChanged();
}
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLFormElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698