Bug 1557160. Stop Event::GetScreenCoords from converting from visual to layout coords. r=botond
authorTimothy Nikkel <tnikkel@gmail.com>
Tue, 12 May 2020 04:53:37 +0000
changeset 529278 715ea15fc504bac27714c4c1a7ca4cd181e45f27
parent 529277 03a111855a06c370fd8ef2d473486c983881321e
child 529279 faf97dd5d45415bb3bd09757b4ab1c885654981c
push id37406
push userdluca@mozilla.com
push dateTue, 12 May 2020 09:34:21 +0000
treeherdermozilla-central@1706d4d54ec6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbotond
bugs1557160
milestone78.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
Bug 1557160. Stop Event::GetScreenCoords from converting from visual to layout coords. r=botond Screen coords are not layout coords. Differential Revision: https://phabricator.services.mozilla.com/D74788
dom/events/Event.cpp
--- a/dom/events/Event.cpp
+++ b/dom/events/Event.cpp
@@ -545,20 +545,16 @@ CSSIntPoint Event::GetScreenCoords(nsPre
       guiEvent->mWidget->WidgetToTopLevelWidgetTransform().TransformPoint(
           floatPoint);
   LayoutDeviceIntPoint rounded = RoundedToInt(topLevelPoint);
 
   nsPoint pt = LayoutDevicePixel::ToAppUnits(
       rounded,
       aPresContext->DeviceContext()->AppUnitsPerDevPixelAtUnitFullZoom());
 
-  if (PresShell* shell = aPresContext->GetPresShell()) {
-    pt = ViewportUtils::VisualToLayout(pt, shell);
-  }
-
   pt += LayoutDevicePixel::ToAppUnits(
       guiEvent->mWidget->TopLevelWidgetToScreenOffset(),
       aPresContext->DeviceContext()->AppUnitsPerDevPixelAtUnitFullZoom());
 
   return CSSPixel::FromAppUnitsRounded(pt);
 }
 
 // static