Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(544)

Unified Diff: third_party/WebKit/Source/core/input/TouchEventManager.cpp

Issue 1964523002: Fix clientX/Y properties of touch pointer events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clientPoint -> framePoint Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/input/TouchEventManager.cpp
diff --git a/third_party/WebKit/Source/core/input/TouchEventManager.cpp b/third_party/WebKit/Source/core/input/TouchEventManager.cpp
index 5fbb1139f481d6dcf3bea6dfe89f759b3deb01d4..db2431d114d068f0d7b3ffc65f208361cc383c4f 100644
--- a/third_party/WebKit/Source/core/input/TouchEventManager.cpp
+++ b/third_party/WebKit/Source/core/input/TouchEventManager.cpp
@@ -177,7 +177,7 @@ WebInputEventResult TouchEventManager::dispatchTouchEvents(
touchInfo.touchNode.get(),
point.id(),
point.screenPos(),
- touchInfo.adjustedPagePoint,
+ touchInfo.contentPoint,
touchInfo.adjustedRadius,
point.rotationAngle(),
point.force(),
@@ -379,9 +379,13 @@ void TouchEventManager::setAllPropertiesOfTouchInfos(
touchInfo.point.pos());
float scaleFactor = 1.0f / targetFrame->pageZoomFactor();
+ FloatPoint scrollPosition = targetFrame->view()->scrollPosition();
+
touchInfo.touchNode = touchNode;
touchInfo.targetFrame = targetFrame;
- touchInfo.adjustedPagePoint = pagePoint.scaledBy(scaleFactor);
+ touchInfo.contentPoint = pagePoint.scaledBy(scaleFactor);
+ touchInfo.framePoint = touchInfo.contentPoint;
+ touchInfo.framePoint.moveBy(scrollPosition.scaledBy(-scaleFactor));
bokan 2016/05/09 18:13:08 Use Frame::contentsToFrame rather than manually mo
Navid Zolghadr 2016/05/09 18:59:04 Done.
touchInfo.adjustedRadius = touchInfo.point.radius().scaledBy(scaleFactor);
touchInfo.knownTarget = knownTarget;
touchInfo.consumed = false;

Powered by Google App Engine
This is Rietveld 408576698