Bug 1863194 - Do not terminate wheel transaction on browsing context change. r=hiro,smaug

We should continue to use a wheel transaction for wheel events when the
browsing context changes from the current context. Avoiding the override
of the event target with the current wheel transaction can halt a page
scroll when the mouse moves over content in a different presentation
context.

Differential Revision: https://phabricator.services.mozilla.com/D205495
This commit is contained in:
Dan Robertson
2024-04-15 20:45:38 +00:00
parent 2fdc4da831
commit e83943cc40
4 changed files with 186 additions and 7 deletions

View File

@@ -12102,13 +12102,6 @@ void PresShell::EventHandler::EventTargetData::UpdateWheelEventTarget(
return;
}
// If the browsing context is no longer the same as the context of the
// current wheel transaction, do not override the event target.
if (!groupFrame->PresContext() || !groupFrame->PresShell() ||
groupFrame->PresContext() != GetPresContext()) {
return;
}
// If dom.event.wheel-event-groups.enabled is set and whe have a stored
// event target from the wheel transaction, override the event target.
SetFrameAndComputePresShellAndContent(groupFrame, aGUIEvent);