Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/Touch.cpp |
| diff --git a/third_party/WebKit/Source/core/dom/Touch.cpp b/third_party/WebKit/Source/core/dom/Touch.cpp |
| index 8930f7e7b9b52d48c35a0b9fc298e33988417f0b..bc07521137327143d544973e73b73c7a6c90d67e 100644 |
| --- a/third_party/WebKit/Source/core/dom/Touch.cpp |
| +++ b/third_party/WebKit/Source/core/dom/Touch.cpp |
| @@ -43,64 +43,60 @@ static FloatPoint contentsOffset(LocalFrame* frame) { |
| Touch::Touch(LocalFrame* frame, |
| EventTarget* target, |
| - int identifier, |
| const FloatPoint& screenPos, |
| const FloatPoint& pagePos, |
| const FloatSize& radius, |
| float rotationAngle, |
| - float force, |
| - String region) |
| + String region, |
| + const WebPointerProperties& properties) |
| : m_target(target), |
| - m_identifier(identifier), |
| m_clientPos(pagePos - contentsOffset(frame)), |
| m_screenPos(screenPos), |
| m_pagePos(pagePos), |
| m_radius(radius), |
| m_rotationAngle(rotationAngle), |
| - m_force(force), |
| - m_region(region) { |
| + m_region(region), |
| + m_pointerProperties(properties) { |
|
Navid Zolghadr
2016/11/15 18:53:37
It seems that everytime we create a WebTouchPoint
|
| float scaleFactor = frame ? frame->pageZoomFactor() : 1.0f; |
| m_absoluteLocation = LayoutPoint(pagePos.scaledBy(scaleFactor)); |
| } |
| Touch::Touch(EventTarget* target, |
| - int identifier, |
| const FloatPoint& clientPos, |
| const FloatPoint& screenPos, |
| const FloatPoint& pagePos, |
| const FloatSize& radius, |
| float rotationAngle, |
| - float force, |
| String region, |
| + const WebPointerProperties& properties, |
| LayoutPoint absoluteLocation) |
| : m_target(target), |
| - m_identifier(identifier), |
| m_clientPos(clientPos), |
| m_screenPos(screenPos), |
| m_pagePos(pagePos), |
| m_radius(radius), |
| m_rotationAngle(rotationAngle), |
| - m_force(force), |
| m_region(region), |
| - m_absoluteLocation(absoluteLocation) {} |
| + m_absoluteLocation(absoluteLocation), |
| + m_pointerProperties(properties) {} |
| Touch::Touch(LocalFrame* frame, const TouchInit& initializer) |
| : m_target(initializer.target()), |
| - m_identifier(initializer.identifier()), |
| m_clientPos(FloatPoint(initializer.clientX(), initializer.clientY())), |
| m_screenPos(FloatPoint(initializer.screenX(), initializer.screenY())), |
| m_pagePos(FloatPoint(initializer.pageX(), initializer.pageY())), |
| m_radius(FloatSize(initializer.radiusX(), initializer.radiusY())), |
| m_rotationAngle(initializer.rotationAngle()), |
| - m_force(initializer.force()), |
| m_region(initializer.region()) { |
| + m_pointerProperties.id = initializer.identifier(); |
| + m_pointerProperties.force = initializer.force(); |
| float scaleFactor = frame ? frame->pageZoomFactor() : 1.0f; |
| m_absoluteLocation = LayoutPoint(m_pagePos.scaledBy(scaleFactor)); |
| } |
| Touch* Touch::cloneWithNewTarget(EventTarget* eventTarget) const { |
| - return new Touch(eventTarget, m_identifier, m_clientPos, m_screenPos, |
| - m_pagePos, m_radius, m_rotationAngle, m_force, m_region, |
| + return new Touch(eventTarget, m_clientPos, m_screenPos, m_pagePos, m_radius, |
| + m_rotationAngle, m_region, m_pointerProperties, |
| m_absoluteLocation); |
| } |