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

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

Issue 2586133003: Remove PlatformWheelEvent and use WebMouseWheelEvent instead (Closed)
Patch Set: Address comments Created 3 years, 12 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/WebMouseWheelEvent.cpp
diff --git a/third_party/WebKit/Source/platform/WebMouseWheelEvent.cpp b/third_party/WebKit/Source/platform/WebMouseWheelEvent.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..e3085cbc07a63556a2e0fc36354d6e3250ce2c22
--- /dev/null
+++ b/third_party/WebKit/Source/platform/WebMouseWheelEvent.cpp
@@ -0,0 +1,25 @@
+// 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/WebMouseWheelEvent.h"
+
+namespace blink {
+
+float WebMouseWheelEvent::deltaXInRootFrame() const {
+ return deltaX / m_frameScale;
+}
+
+float WebMouseWheelEvent::deltaYInRootFrame() const {
+ return deltaY / m_frameScale;
+}
+
+WebMouseWheelEvent WebMouseWheelEvent::flattenTransform() const {
+ WebMouseWheelEvent result = *this;
+ result.deltaX /= result.m_frameScale;
+ result.deltaY /= result.m_frameScale;
+ result.flattenTransformSelf();
+ return result;
+}
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698