Bug 1661608 - Use correct viewport type in RecordMouseLocation(). r=tnikkel

Differential Revision: https://phabricator.services.mozilla.com/D88676
This commit is contained in:
Botond Ballo 2020-08-28 21:44:16 +00:00
Родитель 1b5c9ebf54
Коммит 35448ccbee
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -6646,8 +6646,12 @@ void PresShell::RecordMouseLocation(WidgetGUIEvent* aEvent) {
mPresContext, aEvent->mWidget, aEvent->mRefPoint, rootView);
mMouseEventTargetGuid = InputAPZContext::GetTargetLayerGuid();
} else {
RelativeTo relativeTo{rootFrame};
if (rootFrame->PresContext()->IsRootContentDocumentCrossProcess()) {
relativeTo.mViewportType = ViewportType::Visual;
}
mMouseLocation = nsLayoutUtils::GetEventCoordinatesRelativeTo(
aEvent, RelativeTo{rootFrame, ViewportType::Visual});
aEvent, relativeTo);
mMouseEventTargetGuid = InputAPZContext::GetTargetLayerGuid();
}
mMouseLocationWasSetBySynthesizedMouseEventForTests =