diff options
author | Moonchild <moonchild@palemoon.org> | 2022-04-29 07:20:46 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2022-04-29 07:20:46 +0000 |
commit | bc2841f9f916b2a6aade0cd6dae4a2e4407352b6 (patch) | |
tree | e8314f3d55f136a6db6bb9e2a035ae68a04dc3e9 /layout/base/nsPresContext.cpp | |
parent | 33523f5d5ed0c3b8000aae21a50a56c238422db3 (diff) | |
parent | d78e03d528ba9e7395160a23bce23726067600dd (diff) | |
download | uxp-bc2841f9f916b2a6aade0cd6dae4a2e4407352b6.tar.gz |
Merge pull request 'Restore Mac OS X code and buildability' (#1886) from dbsoft/UXP:1829 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1886
Diffstat (limited to 'layout/base/nsPresContext.cpp')
-rw-r--r-- | layout/base/nsPresContext.cpp | 14 |
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, ®ion); } +#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 |