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

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: Make Touch.tilt available behind the enable-experimental-web-platform-features flag Created 5 years, 10 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/core/dom/Touch.h
diff --git a/Source/core/dom/Touch.h b/Source/core/dom/Touch.h
index 8e54087832ae1da717c9616fa1aad298c40c1e41..2d1480454e792f961fac8b50f05485c40aa7abab 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 tilt, float force)
{
return adoptRefWillBeNoop(
- new Touch(frame, target, identifier, screenPos, pagePos, radius, rotationAngle, force));
+ new Touch(frame, target, identifier, screenPos, pagePos, radius, rotationAngle, tilt, force));
}
// DOM Touch implementation
@@ -67,6 +67,7 @@ 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; }
// Blink-internal methods
const LayoutPoint& absoluteLocation() const { return m_absoluteLocation; }
@@ -78,11 +79,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 tilt, float force);
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 tilt, float force, LayoutPoint absoluteLocation);
RefPtrWillBeMember<EventTarget> m_target;
unsigned m_identifier;
@@ -95,6 +96,7 @@ private:
// Radius in CSS px.
FloatSize m_radius;
float m_rotationAngle;
+ float m_tilt;
float m_force;
// 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

Powered by Google App Engine
This is Rietveld 408576698