Bug 1455674 part 16. Remove most use of nsIDOMElement in dom. r=qdot

This commit is contained in:
Boris Zbarsky
2018-04-26 23:37:34 -04:00
parent 5378e40459
commit 599ef690cf
57 changed files with 67 additions and 134 deletions

View File

@@ -13,6 +13,7 @@
#include "mozilla/dom/ContentChild.h"
#include "mozilla/ipc/CrashReporterClient.h"
#include "mozilla/ipc/CrashReporterHost.h"
#include "mozilla/dom/Element.h"
#include "mozilla/ipc/GeckoChildProcessHost.h"
#include "mozilla/ipc/MessageChannel.h"
#include "mozilla/ipc/ProtocolUtils.h"
@@ -2472,10 +2473,10 @@ PluginModuleParent::NPP_NewInternal(NPMIMEType pluginType, NPP instance,
// Any IPC messages for the PluginInstance actor should be dispatched to the
// DocGroup for the plugin's document.
RefPtr<nsPluginInstanceOwner> owner = parentInstance->GetOwner();
nsCOMPtr<nsIDOMElement> elt;
RefPtr<dom::Element> elt;
owner->GetDOMElement(getter_AddRefs(elt));
if (nsCOMPtr<nsINode> node = do_QueryInterface(elt)) {
nsCOMPtr<nsIDocument> doc = node->OwnerDoc();
if (elt) {
nsCOMPtr<nsIDocument> doc = elt->OwnerDoc();
if (doc) {
nsCOMPtr<nsIEventTarget> eventTarget = doc->EventTargetFor(TaskCategory::Other);
SetEventTargetForActor(parentInstance, eventTarget);