Issue #1829 - Revert "Issue #1751"

This commit is contained in:
Brian Smith 2022-04-26 11:34:08 -05:00 committed by roytam1
commit 13fcc4a046
949 changed files with 95662 additions and 444 deletions

View file

@ -2895,9 +2895,15 @@ nsRootPresContext::ComputePluginGeometryUpdates(nsIFrame* aFrame,
aList->ComputeVisibilityForRoot(aBuilder, &region);
}
#ifdef XP_MACOSX
// We control painting of Mac plugins, so just apply geometry updates now.
// This is not happening during a paint event.
ApplyPluginGeometryUpdates();
#else
if (XRE_IsParentProcess()) {
InitApplyPluginGeometryTimer();
}
#endif
}
static void
@ -2933,6 +2939,8 @@ nsRootPresContext::CancelApplyPluginGeometryTimer()
}
}
#ifndef XP_MACOSX
static bool
HasOverlap(const LayoutDeviceIntPoint& aOffset1,
const nsTArray<LayoutDeviceIntRect>& aClipRects1,
@ -3017,6 +3025,8 @@ PluginGetGeometryUpdate(nsTHashtable<nsRefPtrHashKey<nsIContent>>& aPlugins,
}
}
#endif // #ifndef XP_MACOSX
static void
PluginDidSetGeometry(nsTHashtable<nsRefPtrHashKey<nsIContent>>& aPlugins)
{
@ -3033,6 +3043,7 @@ PluginDidSetGeometry(nsTHashtable<nsRefPtrHashKey<nsIContent>>& aPlugins)
void
nsRootPresContext::ApplyPluginGeometryUpdates()
{
#ifndef XP_MACOSX
CancelApplyPluginGeometryTimer();
nsTArray<nsIWidget::Configuration> configurations;
@ -3044,6 +3055,7 @@ nsRootPresContext::ApplyPluginGeometryUpdates()
SortConfigurations(&configurations);
widget->ConfigureChildren(configurations);
}
#endif // #ifndef XP_MACOSX
PluginDidSetGeometry(mRegisteredPlugins);
}
@ -3051,6 +3063,7 @@ nsRootPresContext::ApplyPluginGeometryUpdates()
void
nsRootPresContext::CollectPluginGeometryUpdates(LayerManager* aLayerManager)
{
#ifndef XP_MACOSX
// Collect and pass plugin widget configurations down to the compositor
// for transmission to the chrome process.
NS_ASSERTION(aLayerManager, "layer manager is invalid!");
@ -3073,6 +3086,7 @@ nsRootPresContext::CollectPluginGeometryUpdates(LayerManager* aLayerManager)
clm->StorePluginWidgetConfigurations(configurations);
}
PluginDidSetGeometry(mRegisteredPlugins);
#endif // #ifndef XP_MACOSX
}
static void