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

Unified Diff: Source/core/dom/Touch.cpp

Issue 750013004: Added experimental tilt and tiltDirection to the Touch interface (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed WebInputEventConversionTest Created 5 years, 9 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
« no previous file with comments | « Source/core/dom/Touch.h ('k') | Source/core/dom/Touch.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Touch.cpp
diff --git a/Source/core/dom/Touch.cpp b/Source/core/dom/Touch.cpp
index 7633d907261dbe431ba5ae5d0cb2b7d2c06ad73a..f81bd742c2d741acd2a37cefe808a5bc0292b267 100644
--- a/Source/core/dom/Touch.cpp
+++ b/Source/core/dom/Touch.cpp
@@ -44,7 +44,7 @@ static FloatPoint contentsOffset(LocalFrame* frame)
return FloatPoint(frameView->scrollPosition()).scaledBy(scale);
}
-Touch::Touch(LocalFrame* frame, EventTarget* target, unsigned identifier, const FloatPoint& screenPos, const FloatPoint& pagePos, const FloatSize& radius, float rotationAngle, float force)
+Touch::Touch(LocalFrame* frame, EventTarget* target, unsigned identifier, const FloatPoint& screenPos, const FloatPoint& pagePos, const FloatSize& radius, float rotationAngle, float force, float tilt, float tiltDirection)
: m_target(target)
, m_identifier(identifier)
, m_clientPos(pagePos - contentsOffset(frame))
@@ -53,12 +53,14 @@ Touch::Touch(LocalFrame* frame, EventTarget* target, unsigned identifier, const
, m_radius(radius)
, m_rotationAngle(rotationAngle)
, m_force(force)
+ , m_tilt(tilt)
+ , m_tiltDirection(tiltDirection)
{
float scaleFactor = frame ? frame->pageZoomFactor() : 1.0f;
m_absoluteLocation = roundedLayoutPoint(pagePos.scaledBy(scaleFactor));
}
-Touch::Touch(EventTarget* target, unsigned identifier, const FloatPoint& clientPos, const FloatPoint& screenPos, const FloatPoint& pagePos, const FloatSize& radius, float rotationAngle, float force, LayoutPoint absoluteLocation)
+Touch::Touch(EventTarget* target, unsigned identifier, const FloatPoint& clientPos, const FloatPoint& screenPos, const FloatPoint& pagePos, const FloatSize& radius, float rotationAngle, float force, float tilt, float tiltDirection, LayoutPoint absoluteLocation)
: m_target(target)
, m_identifier(identifier)
, m_clientPos(clientPos)
@@ -67,13 +69,15 @@ Touch::Touch(EventTarget* target, unsigned identifier, const FloatPoint& clientP
, m_radius(radius)
, m_rotationAngle(rotationAngle)
, m_force(force)
+ , m_tilt(tilt)
+ , m_tiltDirection(tiltDirection)
, m_absoluteLocation(absoluteLocation)
{
}
PassRefPtrWillBeRawPtr<Touch> Touch::cloneWithNewTarget(EventTarget* eventTarget) const
{
- return adoptRefWillBeNoop(new Touch(eventTarget, m_identifier, m_clientPos, m_screenPos, m_pagePos, m_radius, m_rotationAngle, m_force, m_absoluteLocation));
+ return adoptRefWillBeNoop(new Touch(eventTarget, m_identifier, m_clientPos, m_screenPos, m_pagePos, m_radius, m_rotationAngle, m_force, m_tilt, m_tiltDirection, m_absoluteLocation));
}
DEFINE_TRACE(Touch)
« no previous file with comments | « Source/core/dom/Touch.h ('k') | Source/core/dom/Touch.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698