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

Unified Diff: third_party/WebKit/public/platform/WebInputEvent.h

Issue 2539283002: Remove PlatformGestureEvent in favour of using WebGestureEvent (Closed)
Patch Set: Add missing copyright on new file Created 4 years 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 | « third_party/WebKit/public/platform/WebGestureEvent.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/public/platform/WebInputEvent.h
diff --git a/third_party/WebKit/public/platform/WebInputEvent.h b/third_party/WebKit/public/platform/WebInputEvent.h
index 2133aaea5b8fd2487290e608eb4a316a31d67035..e927dc041661e2b88e257bb93d64e32645031028 100644
--- a/third_party/WebKit/public/platform/WebInputEvent.h
+++ b/third_party/WebKit/public/platform/WebInputEvent.h
@@ -264,13 +264,34 @@ class WebInputEvent {
BLINK_COMMON_EXPORT static const char* GetName(WebInputEvent::Type);
+ float frameScale() const { return m_frameScale; }
+ void setFrameScale(float scale) { m_frameScale = scale; }
+
+ WebFloatPoint frameTranslate() const { return m_frameTranslate; }
+ void setFrameTranslate(WebFloatPoint translate) {
+ m_frameTranslate = translate;
+ }
+
protected:
+ // The root frame scale.
+ float m_frameScale;
+
+ // The root frame translation (applied post scale).
+ WebFloatPoint m_frameTranslate;
+
explicit WebInputEvent(unsigned sizeParam) {
memset(this, 0, sizeParam);
timeStampSeconds = 0.0;
size = sizeParam;
type = Undefined;
modifiers = 0;
+#if DCHECK_IS_ON()
+ // If dcheck is on force failures if frame scale is not initialized
+ // correctly by causing DIV0.
+ m_frameScale = 0;
+#else
+ m_frameScale = 1;
+#endif
}
};
« no previous file with comments | « third_party/WebKit/public/platform/WebGestureEvent.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698