tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit dc7680efa92c4cd45885e653e3a392a4b887005e
parent 2ee191cca3f4dbec5f0286e039f5ae9e71d993b1
Author: Emilio Cobos Álvarez <emilio@crisal.io>
Date:   Fri, 14 Nov 2025 05:03:02 +0000

Bug 2000138 - Remove some more dead view code. r=tnikkel,layout-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D272567

Diffstat:
Mview/nsView.cpp | 28----------------------------
Mview/nsView.h | 16----------------
2 files changed, 0 insertions(+), 44 deletions(-)

diff --git a/view/nsView.cpp b/view/nsView.cpp @@ -234,34 +234,6 @@ void nsView::DetachFromTopLevelWidget() { mWidgetIsTopLevel = false; } -void nsView::AssertNoWindow() { - // XXX: it would be nice to make this a strong assert - if (MOZ_UNLIKELY(mWindow)) { - NS_ERROR("We already have a window for this view? BAD"); - mWindow->SetWidgetListener(nullptr); - mWindow->Destroy(); - mWindow = nullptr; - } -} - -// -// internal window creation functions -// -void nsView::AttachWidgetEventHandler(nsIWidget* aWidget) { -#ifdef DEBUG - NS_ASSERTION(!aWidget->GetWidgetListener(), "Already have a widget listener"); -#endif - - aWidget->SetWidgetListener(this); -} - -void nsView::DetachWidgetEventHandler(nsIWidget* aWidget) { - NS_ASSERTION( - !aWidget->GetWidgetListener() || aWidget->GetWidgetListener() == this, - "Wrong view"); - aWidget->SetWidgetListener(nullptr); -} - #ifdef DEBUG void nsView::List(FILE* out, int32_t aIndent) const { int32_t i; diff --git a/view/nsView.h b/view/nsView.h @@ -210,17 +210,6 @@ class nsView final : public nsIWidgetListener { void SetNeedsWindowPropertiesSync(); - /** - * Make aWidget direct its events to this view. - * The caller must call DetachWidgetEventHandler before this view - * is destroyed. - */ - void AttachWidgetEventHandler(nsIWidget* aWidget); - /** - * Stop aWidget directing its events to this view. - */ - void DetachWidgetEventHandler(nsIWidget* aWidget); - #ifdef DEBUG /** * Output debug info to FILE @@ -292,11 +281,6 @@ class nsView final : public nsIWidgetListener { */ void SetDimensions(const nsRect& aRect); - bool IsDirty() const { return mIsDirty; } - void SetIsDirty(bool aDirty) { mIsDirty = aDirty; } - - void AssertNoWindow(); - void CallOnAllRemoteChildren( const std::function<mozilla::CallState(mozilla::dom::BrowserParent*)>& aCallback);