commit b9bd75cab0573e62ffa00d5ad1b804a91cbec5f4
parent 1c41842c3ad7769f72c8b9f7a220f850530f15ef
Author: Emilio Cobos Álvarez <emilio@crisal.io>
Date: Wed, 12 Nov 2025 07:53:07 +0000
Bug 1999619 - Remove nsIBaseWindow.repaint(). r=tnikkel,smaug,layout-reviewers,dom-core
It's unused. Found when removing more view code.
Differential Revision: https://phabricator.services.mozilla.com/D272204
Diffstat:
7 files changed, 0 insertions(+), 46 deletions(-)
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
@@ -4745,18 +4745,6 @@ nsDocShell::GetDimensions(DimensionKind aDimensionKind, int32_t* aX,
}
NS_IMETHODIMP
-nsDocShell::Repaint(bool aForce) {
- PresShell* presShell = GetPresShell();
- NS_ENSURE_TRUE(presShell, NS_ERROR_FAILURE);
-
- RefPtr<nsViewManager> viewManager = presShell->GetViewManager();
- NS_ENSURE_TRUE(viewManager, NS_ERROR_FAILURE);
-
- viewManager->InvalidateAllViews();
- return NS_OK;
-}
-
-NS_IMETHODIMP
nsDocShell::GetParentWidget(nsIWidget** aParentWidget) {
NS_ENSURE_ARG_POINTER(aParentWidget);
diff --git a/docshell/base/nsDocShellTreeOwner.cpp b/docshell/base/nsDocShellTreeOwner.cpp
@@ -597,9 +597,6 @@ nsDocShellTreeOwner::GetDimensions(DimensionKind aDimensionKind, int32_t* aX,
}
NS_IMETHODIMP
-nsDocShellTreeOwner::Repaint(bool aForce) { return NS_ERROR_NULL_POINTER; }
-
-NS_IMETHODIMP
nsDocShellTreeOwner::GetParentWidget(nsIWidget** aParentWidget) {
return NS_ERROR_NULL_POINTER;
}
diff --git a/toolkit/components/browser/nsWebBrowser.cpp b/toolkit/components/browser/nsWebBrowser.cpp
@@ -946,14 +946,6 @@ nsWebBrowser::GetDimensions(DimensionKind aDimensionKind, int32_t* aX,
}
NS_IMETHODIMP
-nsWebBrowser::Repaint(bool aForce) {
- NS_ENSURE_STATE(mDocShell);
- // Can directly return this as it is the
- // same interface, thus same returns.
- return mDocShell->Repaint(aForce);
-}
-
-NS_IMETHODIMP
nsWebBrowser::GetParentWidget(nsIWidget** aParentWidget) {
NS_ENSURE_ARG_POINTER(aParentWidget);
diff --git a/widget/nsIBaseWindow.idl b/widget/nsIBaseWindow.idl
@@ -180,13 +180,6 @@ interface nsIBaseWindow : nsISupports
}
%}
- /**
- * Tell the window to repaint itself
- * @param aForce - if true, repaint immediately
- * if false, the window may defer repainting as it sees fit.
- */
- void repaint(in boolean force);
-
/*
This is the parenting widget for the control.
diff --git a/xpfe/appshell/AppWindow.cpp b/xpfe/appshell/AppWindow.cpp
@@ -826,12 +826,6 @@ NS_IMETHODIMP AppWindow::Center(nsIAppWindow* aRelative, bool aScreen,
return NS_OK;
}
-NS_IMETHODIMP AppWindow::Repaint(bool aForce) {
- // XXX First Check In
- NS_ASSERTION(false, "Not Yet Implemented");
- return NS_OK;
-}
-
NS_IMETHODIMP AppWindow::GetParentWidget(nsIWidget** aParentWidget) {
NS_ENSURE_ARG_POINTER(aParentWidget);
NS_ENSURE_STATE(mWindow);
diff --git a/xpfe/appshell/nsChromeTreeOwner.cpp b/xpfe/appshell/nsChromeTreeOwner.cpp
@@ -319,11 +319,6 @@ nsChromeTreeOwner::GetDimensions(DimensionKind aDimensionKind, int32_t* aX,
return GetRootShellSize(aCX, aCY);
}
-NS_IMETHODIMP nsChromeTreeOwner::Repaint(bool aForce) {
- NS_ENSURE_STATE(mAppWindow);
- return mAppWindow->Repaint(aForce);
-}
-
NS_IMETHODIMP nsChromeTreeOwner::GetParentWidget(nsIWidget** aParentWidget) {
NS_ENSURE_STATE(mAppWindow);
return mAppWindow->GetParentWidget(aParentWidget);
diff --git a/xpfe/appshell/nsContentTreeOwner.cpp b/xpfe/appshell/nsContentTreeOwner.cpp
@@ -424,11 +424,6 @@ nsContentTreeOwner::GetDimensions(DimensionKind aDimensionKind, int32_t* aX,
return GetPrimaryContentSize(aCX, aCY);
}
-NS_IMETHODIMP nsContentTreeOwner::Repaint(bool aForce) {
- NS_ENSURE_STATE(mAppWindow);
- return mAppWindow->Repaint(aForce);
-}
-
NS_IMETHODIMP nsContentTreeOwner::GetParentWidget(nsIWidget** aParentWidget) {
NS_ENSURE_STATE(mAppWindow);
return mAppWindow->GetParentWidget(aParentWidget);