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

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

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/Document.idl ('k') | Source/core/dom/Touch.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Touch.h
diff --git a/Source/core/dom/Touch.h b/Source/core/dom/Touch.h
index 26591abbbeb21371d3bd8a7132b69a733a6a98e7..d3f90daa4721577d6bbe9cc817f0397990a06d81 100644
--- a/Source/core/dom/Touch.h
+++ b/Source/core/dom/Touch.h
@@ -45,10 +45,10 @@ class Touch final : public RefCountedWillBeGarbageCollected<Touch>, public Scrip
public:
static PassRefPtrWillBeRawPtr<Touch> create(LocalFrame* frame, EventTarget* target,
unsigned identifier, const FloatPoint& screenPos, const FloatPoint& pagePos,
- const FloatSize& radius, float rotationAngle, float force)
+ const FloatSize& radius, float rotationAngle, float force, float tilt, float tiltDirection)
{
return adoptRefWillBeNoop(
- new Touch(frame, target, identifier, screenPos, pagePos, radius, rotationAngle, force));
+ new Touch(frame, target, identifier, screenPos, pagePos, radius, rotationAngle, force, tilt, tiltDirection));
}
// DOM Touch implementation
@@ -67,6 +67,8 @@ public:
float webkitRotationAngle() const { return m_rotationAngle; }
float force() const { return m_force; }
float webkitForce() const { return m_force; }
+ float tilt() const { return m_tilt; }
+ float tiltDirection() const {return m_tiltDirection; }
// Blink-internal methods
const LayoutPoint& absoluteLocation() const { return m_absoluteLocation; }
@@ -78,11 +80,11 @@ public:
private:
Touch(LocalFrame* frame, EventTarget* target, unsigned identifier,
const FloatPoint& screenPos, const FloatPoint& pagePos,
- const FloatSize& radius, float rotationAngle, float force);
+ const FloatSize& radius, float rotationAngle, float force, float tilt, float tiltDirection);
Touch(EventTarget*, unsigned identifier, const FloatPoint& clientPos,
const FloatPoint& screenPos, const FloatPoint& pagePos,
- const FloatSize& radius, float rotationAngle, float force, LayoutPoint absoluteLocation);
+ const FloatSize& radius, float rotationAngle, float force, float tilt, float tiltDirection, LayoutPoint absoluteLocation);
RefPtrWillBeMember<EventTarget> m_target;
unsigned m_identifier;
@@ -96,6 +98,8 @@ private:
FloatSize m_radius;
float m_rotationAngle;
float m_force;
+ float m_tilt;
+ float m_tiltDirection;
// FIXME(rbyers): Shouldn't we be able to migrate callers to relying on screenPos, pagePos
// or clientPos? absoluteLocation appears to be the same as pagePos but without browser
// scale applied.
« no previous file with comments | « Source/core/dom/Document.idl ('k') | Source/core/dom/Touch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698