summaryrefslogtreecommitdiff
path: root/layout/base/nsPresContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'layout/base/nsPresContext.cpp')
-rw-r--r--layout/base/nsPresContext.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/layout/base/nsPresContext.cpp b/layout/base/nsPresContext.cpp
index 8f3de7f78d..f7be42b5ff 100644
--- a/layout/base/nsPresContext.cpp
+++ b/layout/base/nsPresContext.cpp
@@ -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