tor-browser

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

commit 8f6dca7b60a789ded34369fb5d2438f829d4be66
parent 49a62d866d7931144fc1395ca5fc0222e4dcbff1
Author: Emilio Cobos Álvarez <emilio@crisal.io>
Date:   Wed, 12 Nov 2025 07:59:07 +0000

Bug 1999622 - Remove nsIFrame::GetClosestView. r=tnikkel,layout-reviewers

It's unused.

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

Diffstat:
Mlayout/generic/nsIFrame.cpp | 16----------------
Mlayout/generic/nsIFrame.h | 6------
2 files changed, 0 insertions(+), 22 deletions(-)

diff --git a/layout/generic/nsIFrame.cpp b/layout/generic/nsIFrame.cpp @@ -10429,22 +10429,6 @@ nsIFrame::SelectablePeekReport nsIFrame::GetFrameFromDirection( aPos.mAncestorLimiter); } -nsView* nsIFrame::GetClosestView(nsPoint* aOffset) const { - nsPoint offset(0, 0); - for (const nsIFrame* f = this; f; f = f->GetParent()) { - if (auto* view = f->GetView()) { - if (aOffset) { - *aOffset = offset; - } - return view; - } - offset += f->GetPosition(); - } - - MOZ_ASSERT_UNREACHABLE("No view on any parent? How did that happen?"); - return nullptr; -} - /* virtual */ void nsIFrame::ChildIsDirty(nsIFrame* aChild) { MOZ_ASSERT_UNREACHABLE( diff --git a/layout/generic/nsIFrame.h b/layout/generic/nsIFrame.h @@ -3334,12 +3334,6 @@ class nsIFrame : public nsQueryFrame { } void SetView(nsView* aView); - /** - * Find the closest view (on |this| or an ancestor). - * If aOffset is non-null, it will be set to the offset of |this| - * from the returned view. - */ - nsView* GetClosestView(nsPoint* aOffset = nullptr) const; /** * Get the offset between the coordinate systems of |this| and aOther.