From 40a355a42d4a9444dc753c04c6608dade2f06a23 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:27 +0200 Subject: Adding upstream version 125.0.1. Signed-off-by: Daniel Baumann --- dom/base/RadioGroupContainer.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'dom/base/RadioGroupContainer.cpp') diff --git a/dom/base/RadioGroupContainer.cpp b/dom/base/RadioGroupContainer.cpp index 1d5abb78c6..3bb4d7da20 100644 --- a/dom/base/RadioGroupContainer.cpp +++ b/dom/base/RadioGroupContainer.cpp @@ -131,6 +131,17 @@ nsresult RadioGroupContainer::GetNextRadioButton( return NS_OK; } +HTMLInputElement* RadioGroupContainer::GetFirstRadioButton( + const nsAString& aName) { + nsRadioGroupStruct* radioGroup = GetOrCreateRadioGroup(aName); + for (HTMLInputElement* radio : radioGroup->mRadioButtons.AsList()) { + if (!radio->Disabled()) { + return radio; + } + } + return nullptr; +} + void RadioGroupContainer::AddToRadioGroup(const nsAString& aName, HTMLInputElement* aRadio, nsIContent* aAncestor) { -- cgit v1.2.3