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

Unified Diff: third_party/WebKit/Source/core/html/HTMLOptionElement.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/HTMLOptionElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLOptionElement.cpp b/third_party/WebKit/Source/core/html/HTMLOptionElement.cpp
index 4c8bf9095afa16b36369b4cb6504a7c19e1e1060..3a1b25d02d201599303ee361398ce1562107aaaa 100644
--- a/third_party/WebKit/Source/core/html/HTMLOptionElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLOptionElement.cpp
@@ -115,6 +115,11 @@ bool HTMLOptionElement::supportsFocus() const
return HTMLElement::supportsFocus();
}
+bool HTMLOptionElement::matchesDefaultPseudoClass() const
+{
+ return fastHasAttribute(selectedAttr);
+}
+
String HTMLOptionElement::displayLabel() const
{
Document& document = this->document();

Powered by Google App Engine
This is Rietveld 408576698