author | Jim Chen <nchen@mozilla.com> |
Thu, 18 Oct 2018 16:43:40 +0000 | |
changeset 497703 | 084f6e60778f01d66bee26657e0e459f8fddcc3e |
parent 497702 | a58112b87de672f400dc5d23ad8bac80d292a2fd |
child 497704 | 8fc40677cc0eff1eb03a17169ea6997666136b75 |
push id | 10002 |
push user | archaeopteryx@coole-files.de |
push date | Fri, 19 Oct 2018 23:09:29 +0000 |
treeherder | mozilla-beta@01378c910610 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | kats |
bugs | 1498352 |
milestone | 64.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/widget/PuppetWidget.cpp +++ b/widget/PuppetWidget.cpp @@ -420,16 +420,25 @@ PuppetWidget::DispatchInputEvent(WidgetI DispatchEvent(aEvent, status); return status; } if (!mTabChild) { return nsEventStatus_eIgnore; } + if (nsCOMPtr<nsIPresShell> presShell = mTabChild->GetPresShell()) { + // 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 << mTabChild->SendDispatchWheelEvent(*aEvent->AsWheelEvent()); break; case eMouseEventClass: Unused << mTabChild->SendDispatchMouseEvent(*aEvent->AsMouseEvent());