diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
commit | 8dd16259287f58f9273002717ec4d27e97127719 (patch) | |
tree | 3863e62a53829a84037444beab3abd4ed9dfc7d0 /dom/base/RadioGroupContainer.cpp | |
parent | Releasing progress-linux version 126.0.1-1~progress7.99u1. (diff) | |
download | firefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz firefox-8dd16259287f58f9273002717ec4d27e97127719.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | dom/base/RadioGroupContainer.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/dom/base/RadioGroupContainer.cpp b/dom/base/RadioGroupContainer.cpp index 3bb4d7da20..988c8186f9 100644 --- a/dom/base/RadioGroupContainer.cpp +++ b/dom/base/RadioGroupContainer.cpp @@ -8,6 +8,7 @@ #include "mozilla/dom/RadioGroupContainer.h" #include "mozilla/dom/TreeOrderedArrayInlines.h" #include "mozilla/Assertions.h" +#include "nsIFrame.h" #include "nsIRadioVisitor.h" #include "nsRadioVisitor.h" @@ -125,7 +126,9 @@ nsresult RadioGroupContainer::GetNextRadioButton( index = 0; } radio = radioGroup->mRadioButtons->ElementAt(index); - } while (radio->Disabled() && radio != currentRadio); + } while ((radio->Disabled() || !radio->GetPrimaryFrame() || + !radio->GetPrimaryFrame()->IsVisibleConsideringAncestors()) && + radio != currentRadio); radio.forget(aRadioOut); return NS_OK; @@ -135,7 +138,8 @@ HTMLInputElement* RadioGroupContainer::GetFirstRadioButton( const nsAString& aName) { nsRadioGroupStruct* radioGroup = GetOrCreateRadioGroup(aName); for (HTMLInputElement* radio : radioGroup->mRadioButtons.AsList()) { - if (!radio->Disabled()) { + if (!radio->Disabled() && radio->GetPrimaryFrame() && + radio->GetPrimaryFrame()->IsVisibleConsideringAncestors()) { return radio; } } |