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

Unified Diff: third_party/WebKit/Source/platform/WebMouseEvent.cpp

Issue 2586133003: Remove PlatformWheelEvent and use WebMouseWheelEvent instead (Closed)
Patch Set: Adjust function name Created 3 years, 11 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: third_party/WebKit/Source/platform/WebMouseEvent.cpp
diff --git a/third_party/WebKit/Source/platform/WebMouseEvent.cpp b/third_party/WebKit/Source/platform/WebMouseEvent.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..67cf41d8a39c03390d5406d45fbcfdbf0037bf2c
--- /dev/null
+++ b/third_party/WebKit/Source/platform/WebMouseEvent.cpp
@@ -0,0 +1,26 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "public/platform/WebInputEvent.h"
+
+namespace blink {
+
+WebFloatPoint WebMouseEvent::movementInRootFrame() const {
+ return WebFloatPoint((movementX / m_frameScale), (movementY / m_frameScale));
+}
+
+WebFloatPoint WebMouseEvent::positionInRootFrame() const {
+ return WebFloatPoint((x / m_frameScale) + m_frameTranslate.x,
+ (y / m_frameScale) + m_frameTranslate.y);
+}
+
+void WebMouseEvent::flattenTransformSelf() {
+ x = (x / m_frameScale) + m_frameTranslate.x;
+ y = (y / m_frameScale) + m_frameTranslate.y;
+ m_frameTranslate.x = 0;
+ m_frameTranslate.y = 0;
+ m_frameScale = 1;
+}
+
+} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/platform/PlatformWheelEvent.h ('k') | third_party/WebKit/Source/platform/WebMouseWheelEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698