commit f85b6b318c0e4f89bcd3011dc30c9b81867b42ff
parent 27689c413b0b9e5fb1f3c12a0962e2a034ee8fea
Author: Emilio Cobos Álvarez <emilio@crisal.io>
Date: Fri, 17 Oct 2025 00:23:57 +0000
Bug 1994762 - Remove unneeded AllocateChildPopupWindow. r=mac-reviewers,spohl
This is dead code since bug 1919165.
Differential Revision: https://phabricator.services.mozilla.com/D268967
Diffstat:
3 files changed, 1 insertion(+), 13 deletions(-)
diff --git a/widget/cocoa/nsCocoaWindow.h b/widget/cocoa/nsCocoaWindow.h
@@ -527,10 +527,6 @@ class nsCocoaWindow final : public nsIWidget {
void UpdateFullscreenState(bool aFullScreen, bool aNativeMode);
nsresult DoMakeFullScreen(bool aFullScreen, bool aUseSystemTransition);
- already_AddRefed<nsIWidget> AllocateChildPopupWidget() override {
- return nsIWidget::CreateTopLevelWindow();
- }
-
BaseWindow* mWindow; // our cocoa window [STRONG]
BaseWindow* mClosedRetainedWindow; // a second strong reference to our
// window upon closing it, held through our destructor. This is useful
diff --git a/widget/nsIWidget.cpp b/widget/nsIWidget.cpp
@@ -552,11 +552,7 @@ already_AddRefed<nsIWidget> nsIWidget::CreateChild(
nsCOMPtr<nsIWidget> widget;
switch (mWidgetType) {
case WidgetType::Native: {
- if (aInitData.mWindowType == WindowType::Popup) {
- widget = AllocateChildPopupWidget();
- } else {
- widget = nsIWidget::CreateChildWindow();
- }
+ widget = nsIWidget::CreateChildWindow();
break;
}
case WidgetType::Headless:
diff --git a/widget/nsIWidget.h b/widget/nsIWidget.h
@@ -2141,10 +2141,6 @@ class nsIWidget : public nsSupportsWeakReference {
static already_AddRefed<nsIWidget> CreateChildWindow();
- virtual already_AddRefed<nsIWidget> AllocateChildPopupWidget() {
- return CreateChildWindow();
- }
-
/**
* Allocate and return a "puppet widget" that doesn't directly
* correlate to a platform widget; platform events and data must