diff --git a/dom/interfaces/xul/nsIDOMXULDocument.idl b/dom/interfaces/xul/nsIDOMXULDocument.idl index e78720b43b9b..1116b642e5ba 100644 --- a/dom/interfaces/xul/nsIDOMXULDocument.idl +++ b/dom/interfaces/xul/nsIDOMXULDocument.idl @@ -13,14 +13,6 @@ interface nsIBoxObject; [uuid(7790d4c3-e8f0-4e29-9887-d683ed2b2a44)] interface nsIDOMXULDocument : nsIDOMDocument { - void addBroadcastListenerFor(in nsIDOMElement broadcaster, - in nsIDOMElement observer, - in DOMString attr); - - void removeBroadcastListenerFor(in nsIDOMElement broadcaster, - in nsIDOMElement observer, - in DOMString attr); - void persist(in DOMString id, in DOMString attr); nsIBoxObject getBoxObjectFor(in nsIDOMElement elt); diff --git a/dom/xul/XULDocument.cpp b/dom/xul/XULDocument.cpp index 57308591efbc..b29d261a19d2 100644 --- a/dom/xul/XULDocument.cpp +++ b/dom/xul/XULDocument.cpp @@ -678,19 +678,6 @@ XULDocument::SynchronizeBroadcastListener(Element *aBroadcaster, } } -NS_IMETHODIMP -XULDocument::AddBroadcastListenerFor(nsIDOMElement* aBroadcaster, - nsIDOMElement* aListener, - const nsAString& aAttr) -{ - ErrorResult rv; - nsCOMPtr broadcaster = do_QueryInterface(aBroadcaster); - nsCOMPtr listener = do_QueryInterface(aListener); - NS_ENSURE_ARG(broadcaster && listener); - AddBroadcastListenerFor(*broadcaster, *listener, aAttr, rv); - return rv.StealNSResult(); -} - void XULDocument::AddBroadcastListenerFor(Element& aBroadcaster, Element& aListener, const nsAString& aAttr, ErrorResult& aRv) @@ -759,18 +746,6 @@ XULDocument::AddBroadcastListenerFor(Element& aBroadcaster, Element& aListener, SynchronizeBroadcastListener(&aBroadcaster, &aListener, aAttr); } -NS_IMETHODIMP -XULDocument::RemoveBroadcastListenerFor(nsIDOMElement* aBroadcaster, - nsIDOMElement* aListener, - const nsAString& aAttr) -{ - nsCOMPtr broadcaster = do_QueryInterface(aBroadcaster); - nsCOMPtr listener = do_QueryInterface(aListener); - NS_ENSURE_ARG(broadcaster && listener); - RemoveBroadcastListenerFor(*broadcaster, *listener, aAttr); - return NS_OK; -} - void XULDocument::RemoveBroadcastListenerFor(Element& aBroadcaster, Element& aListener, diff --git a/dom/xul/nsXULElement.cpp b/dom/xul/nsXULElement.cpp index a841cded0934..dad57eff3058 100644 --- a/dom/xul/nsXULElement.cpp +++ b/dom/xul/nsXULElement.cpp @@ -1242,14 +1242,12 @@ nsXULElement::ParseAttribute(int32_t aNamespaceID, void nsXULElement::RemoveBroadcaster(const nsAString & broadcasterId) { - nsCOMPtr xuldoc = do_QueryInterface(OwnerDoc()); + XULDocument* xuldoc = OwnerDoc()->AsXULDocument(); if (xuldoc) { - nsCOMPtr broadcaster; - nsCOMPtr domDoc (do_QueryInterface(xuldoc)); - domDoc->GetElementById(broadcasterId, getter_AddRefs(broadcaster)); + Element* broadcaster = xuldoc->GetElementById(broadcasterId); if (broadcaster) { - xuldoc->RemoveBroadcastListenerFor(broadcaster, this, - NS_LITERAL_STRING("*")); + xuldoc->RemoveBroadcastListenerFor(*broadcaster, *this, + NS_LITERAL_STRING("*")); } } }