зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1000004 - Part a: Remove the unused nsContentUtils::HasPluginWithUncontrolledEventDispatch(nsIDocument*) function; r=jst
This commit is contained in:
Родитель
8e3a0e4dcd
Коммит
bb3ddb06c3
|
@ -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<bool*>(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<bool*>(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)
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
|
Загрузка…
Ссылка в новой задаче