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

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

Issue 2054123002: Added missing pen tilt when creating PointerEvent from ME. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
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 56a5a16f79342bf935c2524fdfc458e7061021ff..2fad2c6641f30bc99c9701d2f25523b41f5d3866 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);
// Set width/height to 1 because it matches Edge (and supported by the spec).
pointerEventInit.setWidth(1);
@@ -173,8 +175,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());
@@ -182,6 +182,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);
@@ -243,8 +245,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());
@@ -252,6 +252,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