Bug 617539 - Combine nsIRadioGroupContainer_MOZILLA_2_0_BRANCH; r=bz

This commit is contained in:
Benjamin Smedberg 2011-07-19 11:44:55 +02:00
Родитель 31158df4e9
Коммит 3ee6f4f68e
6 изменённых файлов: 11 добавлений и 32 удалений

Просмотреть файл

@ -1691,7 +1691,6 @@ NS_INTERFACE_TABLE_HEAD(nsDocument)
NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIDOMEventTarget)
NS_INTERFACE_TABLE_ENTRY(nsDocument, nsISupportsWeakReference)
NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIRadioGroupContainer)
NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIRadioGroupContainer_MOZILLA_2_0_BRANCH)
NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIMutationObserver)
NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIApplicationCacheContainer)
NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIDOMDocumentTouch)

Просмотреть файл

@ -490,7 +490,7 @@ class nsDocument : public nsIDocument,
public nsIDOMDocumentXBL,
public nsSupportsWeakReference,
public nsIScriptObjectPrincipal,
public nsIRadioGroupContainer_MOZILLA_2_0_BRANCH,
public nsIRadioGroupContainer,
public nsIApplicationCacheContainer,
public nsStubMutationObserver,
public nsIDOMDocumentTouch

Просмотреть файл

@ -45,8 +45,8 @@ class nsIRadioVisitor;
class nsIFormControl;
#define NS_IRADIOGROUPCONTAINER_IID \
{ 0x06de7839, 0xd0db, 0x47d3, \
{ 0x82, 0x90, 0x3c, 0xb8, 0x62, 0x2e, 0xd9, 0x66 } }
{ 0x22924a01, 0x4360, 0x401b, \
{ 0xb1, 0xd1, 0x56, 0x8d, 0xf5, 0xa3, 0xda, 0x71 } }
/**
* A container that has multiple radio groups in it, defined by name.
@ -132,19 +132,6 @@ public:
NS_IMETHOD GetPositionInGroup(nsIDOMHTMLInputElement *aRadio,
PRInt32 *aPositionIndex,
PRInt32 *aItemsInGroup) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIRadioGroupContainer,
NS_IRADIOGROUPCONTAINER_IID)
#define NS_IRADIOGROUPCONTAINER_MOZILLA_2_0_BRANCH_IID \
{ 0xaa9ec446, 0xcdc7, 0x4030, \
{ 0xab, 0x02, 0xda, 0x44, 0xee, 0xb1, 0x80, 0x0a } }
class nsIRadioGroupContainer_MOZILLA_2_0_BRANCH : public nsIRadioGroupContainer
{
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IRADIOGROUPCONTAINER_MOZILLA_2_0_IID)
virtual PRUint32 GetRequiredRadioCount(const nsAString& aName) const = 0;
virtual void RadioRequiredChanged(const nsAString& aName,
@ -153,7 +140,7 @@ public:
virtual void SetValueMissingState(const nsAString& aName, bool aValue) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIRadioGroupContainer_MOZILLA_2_0_BRANCH,
NS_IRADIOGROUPCONTAINER_MOZILLA_2_0_BRANCH_IID)
NS_DEFINE_STATIC_IID_ACCESSOR(nsIRadioGroupContainer,
NS_IRADIOGROUPCONTAINER_IID)
#endif /* nsIRadioGroupContainer_h__ */

Просмотреть файл

@ -328,12 +328,11 @@ DOMCI_NODE_DATA(HTMLFormElement, nsHTMLFormElement)
// QueryInterface implementation for nsHTMLFormElement
NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(nsHTMLFormElement)
NS_HTML_CONTENT_INTERFACE_TABLE5(nsHTMLFormElement,
NS_HTML_CONTENT_INTERFACE_TABLE4(nsHTMLFormElement,
nsIDOMHTMLFormElement,
nsIForm,
nsIWebProgressListener,
nsIRadioGroupContainer,
nsIRadioGroupContainer_MOZILLA_2_0_BRANCH)
nsIRadioGroupContainer)
NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(nsHTMLFormElement,
nsGenericHTMLElement)
NS_HTML_CONTENT_INTERFACE_TABLE_TAIL_CLASSINFO(HTMLFormElement)

Просмотреть файл

@ -94,7 +94,7 @@ class nsHTMLFormElement : public nsGenericHTMLElement,
public nsIDOMHTMLFormElement,
public nsIWebProgressListener,
public nsIForm,
public nsIRadioGroupContainer_MOZILLA_2_0_BRANCH
public nsIRadioGroupContainer
{
public:
nsHTMLFormElement(already_AddRefed<nsINodeInfo> aNodeInfo);

Просмотреть файл

@ -883,9 +883,7 @@ nsHTMLInputElement::AfterSetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
}
if (mType == NS_FORM_INPUT_RADIO && aName == nsGkAtoms::required) {
nsIRadioGroupContainer* c = GetRadioGroupContainer();
nsCOMPtr<nsIRadioGroupContainer_MOZILLA_2_0_BRANCH> container =
do_QueryInterface(c);
nsCOMPtr<nsIRadioGroupContainer> container = GetRadioGroupContainer();
if (container) {
nsAutoString name;
@ -3343,10 +3341,8 @@ nsHTMLInputElement::AddedToRadioGroup()
// We initialize the validity of the element to the validity of the group
// because we assume UpdateValueMissingState() will be called after.
nsCOMPtr<nsIRadioGroupContainer_MOZILLA_2_0_BRANCH> container2 =
do_QueryInterface(container);
SetValidityState(VALIDITY_STATE_VALUE_MISSING,
container2->GetValueMissingState(name));
container->GetValueMissingState(name));
}
}
@ -3733,9 +3729,7 @@ nsHTMLInputElement::UpdateValueMissingValidityStateForRadio(bool aIgnoreSelf)
: HasAttr(kNameSpaceID_None, nsGkAtoms::required);
bool valueMissing = false;
nsIRadioGroupContainer* c = GetRadioGroupContainer();
nsCOMPtr<nsIRadioGroupContainer_MOZILLA_2_0_BRANCH> container =
do_QueryInterface(c);
nsCOMPtr<nsIRadioGroupContainer> container = GetRadioGroupContainer();
if (!container) {
SetValidityState(VALIDITY_STATE_VALUE_MISSING, required && !selected);