mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 810669 - Cleanup GetDocumentForReport in nsDOMEvent.cpp a bit; r=smaug
This commit is contained in:
parent
f5bccafc02
commit
25360fe5d5
@ -381,16 +381,16 @@ nsDOMEvent::StopImmediatePropagation()
|
||||
|
||||
static nsIDocument* GetDocumentForReport(nsEvent* aEvent)
|
||||
{
|
||||
nsCOMPtr<nsINode> node = do_QueryInterface(aEvent->currentTarget);
|
||||
if (node)
|
||||
nsIDOMEventTarget* target = aEvent->currentTarget;
|
||||
if (nsCOMPtr<nsINode> node = do_QueryInterface(target)) {
|
||||
return node->OwnerDoc();
|
||||
}
|
||||
|
||||
nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(aEvent->currentTarget);
|
||||
if (!window)
|
||||
return nullptr;
|
||||
if (nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(target)) {
|
||||
return window->GetExtantDoc();
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDocument> doc(do_QueryInterface(window->GetExtantDocument()));
|
||||
return doc;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user