mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-09 00:37:32 +09:00
Dispatch a PluginRemoved event for actual plugins, not images/unknown/iframe-type <objects>
If a page uses or removes many <object> elements which are not actually plugins, loading the page goes to a crawl because UXP recalculates the plugin UI every time. Only dispatch a PluginRemoved event for actual plugins.
This commit is contained in:
parent
936be91587
commit
ffb2d9d791
1 changed files with 4 additions and 2 deletions
|
|
@ -715,12 +715,14 @@ nsObjectLoadingContent::UnbindFromTree(bool aDeep, bool aNullParent)
|
||||||
/// would keep the docshell around, but trash the frameloader
|
/// would keep the docshell around, but trash the frameloader
|
||||||
UnloadObject();
|
UnloadObject();
|
||||||
}
|
}
|
||||||
|
if (mType == eType_Plugin) {
|
||||||
nsIDocument* doc = thisContent->GetComposedDoc();
|
nsIDocument* doc = thisContent->GetComposedDoc();
|
||||||
if (doc && doc->IsActive()) {
|
if (doc && doc->IsActive()) {
|
||||||
nsCOMPtr<nsIRunnable> ev = new nsSimplePluginEvent(doc,
|
nsCOMPtr<nsIRunnable> ev = new nsSimplePluginEvent(doc,
|
||||||
NS_LITERAL_STRING("PluginRemoved"));
|
NS_LITERAL_STRING("PluginRemoved"));
|
||||||
NS_DispatchToCurrentThread(ev);
|
NS_DispatchToCurrentThread(ev);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nsObjectLoadingContent::nsObjectLoadingContent()
|
nsObjectLoadingContent::nsObjectLoadingContent()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue