tor-browser

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

commit 454f6f9ce1d49ebb412f801ae69b4433dc133ac2
parent 160d4f9b3114a7b249c83c1a2d5f600b933f78c7
Author: Emilio Cobos Álvarez <emilio@crisal.io>
Date:   Tue,  7 Oct 2025 06:18:18 +0000

Bug 1992635 - Make GetLayerPoint use the target frame's pres shell. r=smaug

It seems
`mPresContext->EventStateManager()->GetEventTarget()->PresContext()`
might not be `mPresContext`? That's rather weird...

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

Diffstat:
Mdom/events/UIEvent.cpp | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dom/events/UIEvent.cpp b/dom/events/UIEvent.cpp @@ -151,7 +151,7 @@ nsIntPoint UIEvent::GetLayerPoint() const { } // NOTE(emilio): This matches Blink to my knowledge, but it's generally not // super-well specified, see https://github.com/w3c/uievents/issues/398 - RelativeTo root{mPresContext->PresShell()->GetRootFrame()}; + RelativeTo root{targetFrame->PresShell()->GetRootFrame()}; const nsPoint rootPoint = nsLayoutUtils::GetEventCoordinatesRelativeTo(mEvent, root); nsIFrame* layer = nsLayoutUtils::GetClosestLayer(targetFrame);