Backed out changeset 2ddeecc9100b (bug 1168182) for causing mochitest failures on test_wheel_scroll.html. CLOSED TREE

This commit is contained in:
Iulian Moraru
2023-02-22 21:32:15 +02:00
parent 83fa218275
commit 6c8fb864fd
11 changed files with 52 additions and 205 deletions

View File

@@ -7093,11 +7093,6 @@ nsresult PresShell::EventHandler::HandleEventUsingCoordinates(
return NS_OK;
}
// Wheel events only apply to elements. If this is a wheel event, attempt to
// update the event target from the current wheel transaction before we
// compute the element from the target frame.
eventTargetData.UpdateWheelEventTarget(aGUIEvent);
if (!eventTargetData.ComputeElementFromFrame(aGUIEvent)) {
return NS_OK;
}
@@ -11812,27 +11807,6 @@ bool PresShell::EventHandler::EventTargetData::ComputeElementFromFrame(
return !!mContent;
}
void PresShell::EventHandler::EventTargetData::UpdateWheelEventTarget(
WidgetGUIEvent* aGUIEvent) {
MOZ_ASSERT(aGUIEvent);
if (aGUIEvent->mMessage != eWheel) {
return;
}
// If dom.event.wheel-event-groups.enabled is not set or the stored
// event target is removed, we will not get a event target frame from the
// wheel transaction here.
nsIFrame* groupFrame = WheelTransaction::GetEventTargetFrame();
if (!groupFrame) {
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);
}
void PresShell::EventHandler::EventTargetData::UpdateTouchEventTarget(
WidgetGUIEvent* aGUIEvent) {
MOZ_ASSERT(aGUIEvent);