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

Unified Diff: Source/web/WebInputEventConversion.cpp

Issue 1212113007: Add WebPointerProperties type. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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: Source/web/WebInputEventConversion.cpp
diff --git a/Source/web/WebInputEventConversion.cpp b/Source/web/WebInputEventConversion.cpp
index 12c590fbeea5952009cf5561f3526a10bc06d488..1baa1002001e29249f49a5d432177058dc0834bf 100644
--- a/Source/web/WebInputEventConversion.cpp
+++ b/Source/web/WebInputEventConversion.cpp
@@ -417,7 +417,7 @@ inline WebTouchPoint::State toWebTouchPointState(const AtomicString& type)
PlatformTouchPointBuilder::PlatformTouchPointBuilder(Widget* widget, const WebTouchPoint& point)
{
- m_id = point.id;
+ m_id = point.pointerId;
m_state = toPlatformTouchPointState(point.state);
// This assumes convertFromContainingWindow does only translations, not scales.
@@ -426,9 +426,9 @@ PlatformTouchPointBuilder::PlatformTouchPointBuilder(Widget* widget, const WebTo
m_pos = widget->convertFromContainingWindow(flooredPoint) + (floatPos - flooredPoint);
m_screenPos = FloatPoint(point.screenPosition.x, point.screenPosition.y);
- m_radius = scaleSizeToWindow(widget, FloatSize(point.radiusX, point.radiusY));
+ m_radius = scaleSizeToWindow(widget, FloatSize(point.width, point.height));
m_rotationAngle = point.rotationAngle;
- m_force = point.force;
+ m_force = point.pressure;
}
PlatformTouchEventBuilder::PlatformTouchEventBuilder(Widget* widget, const WebTouchEvent& event)
@@ -657,13 +657,13 @@ WebInputEvent::Type toWebKeyboardEventType(PlatformEvent::Type type)
static WebTouchPoint toWebTouchPoint(const Touch* touch, const LayoutObject* layoutObject, WebTouchPoint::State state)
{
WebTouchPoint point;
- point.id = touch->identifier();
+ point.pointerId = touch->identifier();
point.screenPosition = touch->screenLocation();
point.position = convertAbsoluteLocationForLayoutObjectFloat(touch->absoluteLocation(), *layoutObject);
- point.radiusX = touch->radiusX();
- point.radiusY = touch->radiusY();
+ point.width = touch->radiusX();
+ point.height = touch->radiusY();
point.rotationAngle = touch->rotationAngle();
- point.force = touch->force();
+ point.pressure = touch->force();
point.state = state;
return point;
}
@@ -671,7 +671,7 @@ static WebTouchPoint toWebTouchPoint(const Touch* touch, const LayoutObject* lay
static unsigned indexOfTouchPointWithId(const WebTouchPoint* touchPoints, unsigned touchPointsLength, unsigned id)
{
for (unsigned i = 0; i < touchPointsLength; ++i) {
- if (touchPoints[i].id == static_cast<int>(id))
+ if (touchPoints[i].pointerId == static_cast<int>(id))
return i;
}
return std::numeric_limits<unsigned>::max();

Powered by Google App Engine
This is Rietveld 408576698