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

Unified Diff: third_party/WebKit/Source/core/events/PointerEventFactory.cpp

Issue 2043053002: Added missing pen tilt when creating PointerEvent from ME. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/events/PointerEventFactory.cpp
diff --git a/third_party/WebKit/Source/core/events/PointerEventFactory.cpp b/third_party/WebKit/Source/core/events/PointerEventFactory.cpp
index 06cb56535a6c7cae6908a3ff51e5bf955582f554..cc50085728994221c566246b27b820a06f5ede5c 100644
--- a/third_party/WebKit/Source/core/events/PointerEventFactory.cpp
+++ b/third_party/WebKit/Source/core/events/PointerEventFactory.cpp
@@ -128,6 +128,8 @@ PointerEvent* PointerEventFactory::create(
}
pointerEventInit.setPressure(getPointerEventPressure(
mouseEvent.pointerProperties().force, pointerEventInit.buttons()));
+ pointerEventInit.setTiltX(mouseEvent.pointerProperties().tiltX);
+ pointerEventInit.setTiltY(mouseEvent.pointerProperties().tiltY);
UIEventWithKeyState::setFromPlatformModifiers(pointerEventInit, mouseEvent.getModifiers());
@@ -169,8 +171,6 @@ PointerEvent* PointerEventFactory::create(const AtomicString& type,
pointerEventInit.setWidth(pointRadius.width());
pointerEventInit.setHeight(pointRadius.height());
- pointerEventInit.setTiltX(touchPoint.pointerProperties().tiltX);
- pointerEventInit.setTiltY(touchPoint.pointerProperties().tiltY);
pointerEventInit.setScreenX(touchPoint.screenPos().x());
pointerEventInit.setScreenY(touchPoint.screenPos().y());
pointerEventInit.setClientX(clientPoint.x());
@@ -178,6 +178,8 @@ PointerEvent* PointerEventFactory::create(const AtomicString& type,
pointerEventInit.setButton(pointerPressedOrReleased ? LeftButton: NoButton);
pointerEventInit.setPressure(getPointerEventPressure(
touchPoint.force(), pointerEventInit.buttons()));
+ pointerEventInit.setTiltX(touchPoint.pointerProperties().tiltX);
+ pointerEventInit.setTiltY(touchPoint.pointerProperties().tiltY);
pointerEventInit.setView(view);
UIEventWithKeyState::setFromPlatformModifiers(pointerEventInit, modifiers);
@@ -239,8 +241,6 @@ PointerEvent* PointerEventFactory::createPointerBoundaryEvent(
pointerEventInit.setIsPrimary(pointerEvent->isPrimary());
pointerEventInit.setWidth(pointerEvent->width());
pointerEventInit.setHeight(pointerEvent->height());
- pointerEventInit.setTiltX(pointerEvent->tiltX());
- pointerEventInit.setTiltY(pointerEvent->tiltY());
pointerEventInit.setScreenX(pointerEvent->screenX());
pointerEventInit.setScreenY(pointerEvent->screenY());
pointerEventInit.setClientX(pointerEvent->clientX());
@@ -248,6 +248,8 @@ PointerEvent* PointerEventFactory::createPointerBoundaryEvent(
pointerEventInit.setButton(pointerEvent->button());
pointerEventInit.setButtons(pointerEvent->buttons());
pointerEventInit.setPressure(pointerEvent->pressure());
+ pointerEventInit.setTiltX(pointerEvent->tiltX());
+ pointerEventInit.setTiltY(pointerEvent->tiltY());
pointerEventInit.setView(pointerEvent->view());
setBubblesAndCancelable(pointerEventInit, type);
« no previous file with comments | « third_party/WebKit/LayoutTests/virtual/pointerevent/fast/events/pointerevents/mouse-pointer-event-properties-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698