summaryrefslogtreecommitdiff
path: root/view
diff options
context:
space:
mode:
authorBrian Smith <brian@dbsoft.org>2022-04-26 10:13:11 -0500
committerBrian Smith <brian@dbsoft.org>2022-04-26 10:19:04 -0500
commit3daf711085889bad1bd68651bc4e8790412ae105 (patch)
treef5b0e4c1befb320cdf158e1839ac5e273373087f /view
parent7fe702603066e7f122d5dd66a3a1892ac7e06215 (diff)
downloaduxp-3daf711085889bad1bd68651bc4e8790412ae105.tar.gz
Issue #1829 - Revert “Issue #1751 -- Remove XP_MACOSX conditionals from the rest of the tree.”
This also removes some PP abuse and takes file entries out of PP when no longer needed without XP_MACOSX conditionals. This reverts commit 6f707bde95dab6998ac204f9ee6c925ee230c740.
Diffstat (limited to 'view')
-rw-r--r--view/nsView.cpp4
-rw-r--r--view/nsViewManager.cpp6
2 files changed, 7 insertions, 3 deletions
diff --git a/view/nsView.cpp b/view/nsView.cpp
index 79fd7cf075..8f509cadeb 100644
--- a/view/nsView.cpp
+++ b/view/nsView.cpp
@@ -241,8 +241,8 @@ LayoutDeviceIntRect nsView::CalcWidgetBounds(nsWindowType aType)
LayoutDeviceIntRect newBounds =
LayoutDeviceIntRect::FromUnknownRect(viewBounds.ToNearestPixels(p2a));
-#if (MOZ_WIDGET_GTK == 3)
- // GTK 3 rounds widget coordinates to the nearest global "display
+#if defined(XP_MACOSX) || (MOZ_WIDGET_GTK == 3)
+ // cocoa and GTK round widget coordinates to the nearest global "display
// pixel" integer value. So we avoid fractional display pixel values by
// rounding to the nearest value that won't yield a fractional display pixel.
nsIWidget* widget = parentWidget ? parentWidget : mWindow.get();
diff --git a/view/nsViewManager.cpp b/view/nsViewManager.cpp
index b6a6e25ef2..e41f005b25 100644
--- a/view/nsViewManager.cpp
+++ b/view/nsViewManager.cpp
@@ -598,7 +598,10 @@ nsViewManager::InvalidateWidgetArea(nsView *aWidgetView,
"Only plugin or popup widgets can be children!");
// We do not need to invalidate in plugin widgets, but we should
- // exclude them from the invalidation region.
+ // exclude them from the invalidation region IF we're not on
+ // Mac. On Mac we need to draw under plugin widgets, because
+ // plugin widgets are basically invisible
+#ifndef XP_MACOSX
// GetBounds should compensate for chrome on a toplevel widget
LayoutDeviceIntRect bounds = childWidget->GetBounds();
@@ -610,6 +613,7 @@ nsViewManager::InvalidateWidgetArea(nsView *aWidgetView,
children.Or(children, rr - aWidgetView->ViewToWidgetOffset());
children.SimplifyInward(20);
}
+#endif
}
}
}