mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 13:57:32 +00:00
Bug 705110 - Suppress warning spam on DOMAttrModified event. r=smaug
This commit is contained in:
parent
6b6f7e4458
commit
fcffee46fd
@ -2899,6 +2899,14 @@ nsGenericElement::GetAttributeNodeNS(const nsAString& aNamespaceURI,
|
||||
|
||||
OwnerDoc()->WarnOnceAbout(nsIDocument::eGetAttributeNodeNS);
|
||||
|
||||
return GetAttributeNodeNSInternal(aNamespaceURI, aLocalName, aReturn);
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsGenericElement::GetAttributeNodeNSInternal(const nsAString& aNamespaceURI,
|
||||
const nsAString& aLocalName,
|
||||
nsIDOMAttr** aReturn)
|
||||
{
|
||||
nsCOMPtr<nsIDOMNamedNodeMap> map;
|
||||
nsresult rv = GetAttributes(getter_AddRefs(map));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
@ -5206,8 +5214,8 @@ nsGenericElement::SetAttrAndNotify(PRInt32 aNamespaceID,
|
||||
nsCOMPtr<nsIDOMAttr> attrNode;
|
||||
nsAutoString ns;
|
||||
nsContentUtils::NameSpaceManager()->GetNameSpaceURI(aNamespaceID, ns);
|
||||
GetAttributeNodeNS(ns, nsDependentAtomString(aName),
|
||||
getter_AddRefs(attrNode));
|
||||
GetAttributeNodeNSInternal(ns, nsDependentAtomString(aName),
|
||||
getter_AddRefs(attrNode));
|
||||
mutation.mRelatedNode = attrNode;
|
||||
|
||||
mutation.mAttrName = aName;
|
||||
@ -5386,8 +5394,8 @@ nsGenericElement::UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
|
||||
if (hasMutationListeners) {
|
||||
nsAutoString ns;
|
||||
nsContentUtils::NameSpaceManager()->GetNameSpaceURI(aNameSpaceID, ns);
|
||||
GetAttributeNodeNS(ns, nsDependentAtomString(aName),
|
||||
getter_AddRefs(attrNode));
|
||||
GetAttributeNodeNSInternal(ns, nsDependentAtomString(aName),
|
||||
getter_AddRefs(attrNode));
|
||||
}
|
||||
|
||||
// Clear binding to nsIDOMNamedNodeMap
|
||||
|
@ -794,6 +794,10 @@ protected:
|
||||
return this;
|
||||
}
|
||||
|
||||
nsresult GetAttributeNodeNSInternal(const nsAString& aNamespaceURI,
|
||||
const nsAString& aLocalName,
|
||||
nsIDOMAttr** aReturn);
|
||||
|
||||
public:
|
||||
// Because of a bug in MS C++ compiler nsDOMSlots must be declared public,
|
||||
// otherwise nsXULElement::nsXULSlots doesn't compile.
|
||||
|
@ -1368,7 +1368,8 @@ nsXULElement::UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aName, bool aNotify)
|
||||
if (hasMutationListeners) {
|
||||
nsAutoString ns;
|
||||
nsContentUtils::NameSpaceManager()->GetNameSpaceURI(aNameSpaceID, ns);
|
||||
GetAttributeNodeNS(ns, nsDependentAtomString(aName), getter_AddRefs(attrNode));
|
||||
GetAttributeNodeNSInternal(ns, nsDependentAtomString(aName),
|
||||
getter_AddRefs(attrNode));
|
||||
}
|
||||
|
||||
nsDOMSlots *slots = GetExistingDOMSlots();
|
||||
|
Loading…
x
Reference in New Issue
Block a user