diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp index e282d5f72205..b98aa39c310f 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp @@ -6798,43 +6798,6 @@ CheckForWindowedPlugins(nsISupports* aSupports, void* aResult) } } -static bool -DocTreeContainsWindowedPlugins(nsIDocument* aDoc, void* aResult) -{ - if (!nsContentUtils::IsChromeDoc(aDoc)) { - aDoc->EnumerateActivityObservers(CheckForWindowedPlugins, aResult); - } - if (*static_cast(aResult)) { - // Return false to stop iteration, we found a windowed plugin. - return false; - } - aDoc->EnumerateSubDocuments(DocTreeContainsWindowedPlugins, aResult); - // Return false to stop iteration if we found a windowed plugin in - // the sub documents. - return !*static_cast(aResult); -} - -/* static */ -bool -nsContentUtils::HasPluginWithUncontrolledEventDispatch(nsIDocument* aDoc) -{ -#ifdef XP_MACOSX - // We control dispatch to all mac plugins. - return false; -#endif - bool result = false; - - // Find the top of the document's branch, the child of the chrome document. - nsIDocument* doc = aDoc; - nsIDocument* parent = nullptr; - while (doc && (parent = doc->GetParentDocument()) && !IsChromeDoc(parent)) { - doc = parent; - } - - DocTreeContainsWindowedPlugins(doc, &result); - return result; -} - /* static */ bool nsContentUtils::HasPluginWithUncontrolledEventDispatch(nsIContent* aContent) diff --git a/dom/base/nsContentUtils.h b/dom/base/nsContentUtils.h index 6d043af56203..0e8fd34f3415 100644 --- a/dom/base/nsContentUtils.h +++ b/dom/base/nsContentUtils.h @@ -2059,14 +2059,6 @@ public: return sPrivacyResistFingerprinting; } - /** - * Returns true if the doc tree branch which contains aDoc contains any - * plugins which we don't control event dispatch for, i.e. do any plugins - * in the same tab as this document receive key events outside of our - * control? This always returns false on MacOSX. - */ - static bool HasPluginWithUncontrolledEventDispatch(nsIDocument* aDoc); - /** * Return true if this doc is controlled by a ServiceWorker. */