mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-22 20:33:10 +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,11 +715,13 @@ nsObjectLoadingContent::UnbindFromTree(bool aDeep, bool aNullParent)
|
|||
/// would keep the docshell around, but trash the frameloader
|
||||
UnloadObject();
|
||||
}
|
||||
nsIDocument* doc = thisContent->GetComposedDoc();
|
||||
if (doc && doc->IsActive()) {
|
||||
if (mType == eType_Plugin) {
|
||||
nsIDocument* doc = thisContent->GetComposedDoc();
|
||||
if (doc && doc->IsActive()) {
|
||||
nsCOMPtr<nsIRunnable> ev = new nsSimplePluginEvent(doc,
|
||||
NS_LITERAL_STRING("PluginRemoved"));
|
||||
NS_DispatchToCurrentThread(ev);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue