Bug 1685926 - Group disconnected radio buttons together. r=saschanaz,smaug

Differential Revision: https://phabricator.services.mozilla.com/D162349
This commit is contained in:
Adam Vandolder
2023-09-28 15:47:11 +00:00
parent 153c4392df
commit a1cf2d6b5d
21 changed files with 390 additions and 423 deletions

View File

@@ -13,11 +13,10 @@
#include "mozilla/dom/AnchorAreaFormRelValues.h"
#include "mozilla/dom/BrowsingContext.h"
#include "mozilla/dom/PopupBlocker.h"
#include "mozilla/dom/RadioGroupManager.h"
#include "mozilla/dom/RadioGroupContainer.h"
#include "nsCOMPtr.h"
#include "nsIFormControl.h"
#include "nsGenericHTMLElement.h"
#include "nsIRadioGroupContainer.h"
#include "nsIWeakReferenceUtils.h"
#include "nsThreadUtils.h"
#include "nsInterfaceHashtable.h"
@@ -39,9 +38,7 @@ class HTMLImageElement;
class FormData;
class HTMLFormElement final : public nsGenericHTMLElement,
public nsIRadioGroupContainer,
public AnchorAreaFormRelValues,
RadioGroupManager {
public AnchorAreaFormRelValues {
friend class HTMLFormControlsCollection;
public:
@@ -61,25 +58,6 @@ class HTMLFormElement final : public nsGenericHTMLElement,
return aElement == mDefaultSubmitElement;
}
// nsIRadioGroupContainer
void SetCurrentRadioButton(const nsAString& aName,
HTMLInputElement* aRadio) override;
HTMLInputElement* GetCurrentRadioButton(const nsAString& aName) override;
NS_IMETHOD GetNextRadioButton(const nsAString& aName, const bool aPrevious,
HTMLInputElement* aFocusedRadio,
HTMLInputElement** aRadioOut) override;
NS_IMETHOD WalkRadioGroup(const nsAString& aName,
nsIRadioVisitor* aVisitor) override;
void AddToRadioGroup(const nsAString& aName,
HTMLInputElement* aRadio) override;
void RemoveFromRadioGroup(const nsAString& aName,
HTMLInputElement* aRadio) override;
uint32_t GetRequiredRadioCount(const nsAString& aName) const override;
void RadioRequiredWillChange(const nsAString& aName,
bool aRequiredAdded) override;
bool GetValueMissingState(const nsAString& aName) const override;
void SetValueMissingState(const nsAString& aName, bool aValue) override;
// EventTarget
void AsyncEventRunning(AsyncEventDispatcher* aEvent) override;