Bug 1434399 part 8. Remove nsIDOMXULDocument's broadcast listener bits. r=mystor

MozReview-Commit-ID: Auj7Lfu6ex3
This commit is contained in:
Boris Zbarsky 2018-01-31 14:49:27 -05:00
Родитель f35c2bc77d
Коммит 59398e9cad
3 изменённых файлов: 4 добавлений и 39 удалений

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

@ -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);

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

@ -678,19 +678,6 @@ XULDocument::SynchronizeBroadcastListener(Element *aBroadcaster,
}
}
NS_IMETHODIMP
XULDocument::AddBroadcastListenerFor(nsIDOMElement* aBroadcaster,
nsIDOMElement* aListener,
const nsAString& aAttr)
{
ErrorResult rv;
nsCOMPtr<Element> broadcaster = do_QueryInterface(aBroadcaster);
nsCOMPtr<Element> 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<Element> broadcaster = do_QueryInterface(aBroadcaster);
nsCOMPtr<Element> listener = do_QueryInterface(aListener);
NS_ENSURE_ARG(broadcaster && listener);
RemoveBroadcastListenerFor(*broadcaster, *listener, aAttr);
return NS_OK;
}
void
XULDocument::RemoveBroadcastListenerFor(Element& aBroadcaster,
Element& aListener,

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

@ -1242,13 +1242,11 @@ nsXULElement::ParseAttribute(int32_t aNamespaceID,
void
nsXULElement::RemoveBroadcaster(const nsAString & broadcasterId)
{
nsCOMPtr<nsIDOMXULDocument> xuldoc = do_QueryInterface(OwnerDoc());
XULDocument* xuldoc = OwnerDoc()->AsXULDocument();
if (xuldoc) {
nsCOMPtr<nsIDOMElement> broadcaster;
nsCOMPtr<nsIDOMDocument> domDoc (do_QueryInterface(xuldoc));
domDoc->GetElementById(broadcasterId, getter_AddRefs(broadcaster));
Element* broadcaster = xuldoc->GetElementById(broadcasterId);
if (broadcaster) {
xuldoc->RemoveBroadcastListenerFor(broadcaster, this,
xuldoc->RemoveBroadcastListenerFor(*broadcaster, *this,
NS_LITERAL_STRING("*"));
}
}