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

Unified Diff: third_party/WebKit/Source/core/html/forms/BaseCheckableInputType.cpp

Issue 1756483005: Option, checkbox and radio should support ':default' selector (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated as per review comments 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
Index: third_party/WebKit/Source/core/html/forms/BaseCheckableInputType.cpp
diff --git a/third_party/WebKit/Source/core/html/forms/BaseCheckableInputType.cpp b/third_party/WebKit/Source/core/html/forms/BaseCheckableInputType.cpp
index f30b2e6a4069c1732346c1da9a168e1ad5512ce6..bd286ca9c4e0c8c55a5f62c3a7e332176d7d6885 100644
--- a/third_party/WebKit/Source/core/html/forms/BaseCheckableInputType.cpp
+++ b/third_party/WebKit/Source/core/html/forms/BaseCheckableInputType.cpp
@@ -88,6 +88,11 @@ void BaseCheckableInputType::accessKeyAction(bool sendMouseEvents)
element().dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
}
+bool BaseCheckableInputType::matchesDefaultPseudoClass()
+{
+ return element().fastHasAttribute(checkedAttr);
+}
+
String BaseCheckableInputType::fallbackValue() const
{
return "on";

Powered by Google App Engine
This is Rietveld 408576698