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

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

Issue 1756483005: Option, checkbox and radio should support ':default' selector (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased the patch 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/BaseButtonInputType.cpp
diff --git a/third_party/WebKit/Source/core/html/forms/BaseButtonInputType.cpp b/third_party/WebKit/Source/core/html/forms/BaseButtonInputType.cpp
index 9eb0bbaf3e4c91e2a48d2369d6d9f5453b6e3163..c5f1fb7499431a2c4541763cf7bfa8686df0967a 100644
--- a/third_party/WebKit/Source/core/html/forms/BaseButtonInputType.cpp
+++ b/third_party/WebKit/Source/core/html/forms/BaseButtonInputType.cpp
@@ -34,6 +34,7 @@
#include "core/HTMLNames.h"
#include "core/dom/Text.h"
#include "core/dom/shadow/ShadowRoot.h"
+#include "core/html/HTMLFormElement.h"
#include "core/html/HTMLInputElement.h"
#include "core/html/parser/HTMLParserIdioms.h"
#include "core/layout/LayoutButton.h"
@@ -82,4 +83,9 @@ void BaseButtonInputType::setValue(const String& sanitizedValue, bool, TextField
element().setAttribute(valueAttr, AtomicString(sanitizedValue));
}
+bool BaseButtonInputType::matchesDefaultPseudoClass()
+{
tkent 2016/03/04 06:39:14 Please copy the comment in HTMLFormControlElement:
ramya.v 2016/03/04 10:22:40 Done.
+ return canBeSuccessfulSubmitButton() && element().form() && element().form()->defaultButton() == &element();
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698