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

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

Issue 1798043002: Removed CORE_EXPORT from APIs at NodeTraversal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved DOM Traversing API to RadioInputTYpe Created 4 years, 9 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/RadioInputType.cpp
diff --git a/third_party/WebKit/Source/core/html/forms/RadioInputType.cpp b/third_party/WebKit/Source/core/html/forms/RadioInputType.cpp
index b724f71f28dd038db54749a969efed7184630f3f..29e8ed420960f40892af0dbce40883a45b071e53 100644
--- a/third_party/WebKit/Source/core/html/forms/RadioInputType.cpp
+++ b/third_party/WebKit/Source/core/html/forms/RadioInputType.cpp
@@ -211,4 +211,16 @@ bool RadioInputType::shouldAppearIndeterminate() const
return !element().checkedRadioButtonForGroup();
}
+HTMLInputElement* RadioInputType::nextRadioButtonInGroup(HTMLInputElement* current, bool forward)
+{
+ for (HTMLElement* htmlElement = nextElement(*current, current->form(), forward); htmlElement; htmlElement = nextElement(*htmlElement, current->form(), forward)) {
+ if (!isHTMLInputElement(*htmlElement))
+ continue;
+ HTMLInputElement* inputElement = toHTMLInputElement(htmlElement);
+ if (current->form() == inputElement->form() && inputElement->type() == InputTypeNames::radio && inputElement->name() == current->name())
+ return inputElement;
+ }
+ return nullptr;
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698