Bug 1556556 - Remove applications of the visual-to-layout transform at the process boundary (and equivalent places for non-e10s). r=kats

Note that the propagation of the target guid to places where the transform
will be applied is best-effort at the moment. In particular, the
InputAPZContext will result in the correct guid being available in places
that are called synchronously from the Recv*() functions, but not places
called asynhcronously (e.g. via DelayedFireSingleTapEvent).

To mitigate this, places where the transform is applied fall back on the
RCD-RSF if a guid is not available via InputAPZContext (added in a
subsequent patch).

The cases that this gets wrong are fairly edge casey (it requires (a) an
asynchronous codepath, (b) an event targeting a subframe, and (c) that
subframe having a "could not accept the APZ scroll position" transform),
so we just punt on them for now. If it turns out to be important to handle,
then options for doing so include (1) propagating the guid through each of
the affected asynchronous codepaths, or (2) attaching the guid to the event
itself.

Differential Revision: https://phabricator.services.mozilla.com/D68723
This commit is contained in:
Botond Ballo
2020-04-28 01:34:22 +00:00
parent 1697dee74d
commit ab6f6e5e27
4 changed files with 45 additions and 46 deletions

View File

@@ -395,15 +395,6 @@ nsEventStatus PuppetWidget::DispatchInputEvent(WidgetInputEvent* aEvent) {
return nsEventStatus_eIgnore;
}
if (PresShell* presShell = mBrowserChild->GetTopLevelPresShell()) {
// Because the root resolution is conceptually at the parent/child process
// boundary, we need to apply that resolution here because we're sending
// the event from the child to the parent process.
LayoutDevicePoint pt(aEvent->mRefPoint);
pt = pt * presShell->GetResolution();
aEvent->mRefPoint = LayoutDeviceIntPoint::Round(pt);
}
switch (aEvent->mClass) {
case eWheelEventClass:
Unused << mBrowserChild->SendDispatchWheelEvent(*aEvent->AsWheelEvent());