tor-browser

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

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

Bug 2000138 - Remove nsIWidgetListener::RequestRepaint. r=tnikkel,layout-reviewers

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

Diffstat:
Mview/nsView.cpp | 6------
Mview/nsView.h | 1-
Mwidget/android/nsWindow.cpp | 6++----
Mwidget/nsIWidgetListener.h | 4----
4 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/view/nsView.cpp b/view/nsView.cpp @@ -426,12 +426,6 @@ void nsView::DidCompositeWindow(mozilla::layers::TransactionId aTransactionId, aCompositeEnd); } -void nsView::RequestRepaint() { - if (PresShell* presShell = mViewManager->GetPresShell()) { - presShell->SchedulePaint(); - } -} - nsEventStatus nsView::HandleEvent(WidgetGUIEvent* aEvent, bool aUseAttachedEvents) { MOZ_ASSERT(aEvent->mWidget, "null widget ptr"); diff --git a/view/nsView.h b/view/nsView.h @@ -268,7 +268,6 @@ class nsView final : public nsIWidgetListener { void DidCompositeWindow(mozilla::layers::TransactionId aTransactionId, const mozilla::TimeStamp& aCompositeStart, const mozilla::TimeStamp& aCompositeEnd) override; - void RequestRepaint() override; MOZ_CAN_RUN_SCRIPT_BOUNDARY nsEventStatus HandleEvent(mozilla::WidgetGUIEvent* aEvent, bool aUseAttachedEvents) override; diff --git a/widget/android/nsWindow.cpp b/widget/android/nsWindow.cpp @@ -2321,10 +2321,8 @@ mozilla::widget::EventDispatcher* nsWindow::GetEventDispatcher() const { } void nsWindow::RedrawAll() { - if (mAttachedWidgetListener) { - mAttachedWidgetListener->RequestRepaint(); - } else if (mWidgetListener) { - mWidgetListener->RequestRepaint(); + if (auto* ps = GetPresShell()) { + ps->SchedulePaint(); } } diff --git a/widget/nsIWidgetListener.h b/widget/nsIWidgetListener.h @@ -142,10 +142,6 @@ class nsIWidgetListener { const mozilla::TimeStamp& aCompositeStart, const mozilla::TimeStamp& aCompositeEnd) {} - /** Request that layout schedules a repaint on the next refresh driver tick. - */ - virtual void RequestRepaint() {} - /** * Returns true if this is a popup that should not be visible. If this * is a popup that is visible, not a popup or this state is unknown,