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

Side by Side Diff: third_party/WebKit/Source/platform/WebMouseWheelEvent.cpp

Issue 2586133003: Remove PlatformWheelEvent and use WebMouseWheelEvent instead (Closed)
Patch Set: Rebase 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "public/platform/WebMouseWheelEvent.h"
6
7 namespace blink {
8
9 float WebMouseWheelEvent::deltaXInRootFrame() const {
10 return deltaX / m_frameScale;
11 }
12
13 float WebMouseWheelEvent::deltaYInRootFrame() const {
14 return deltaY / m_frameScale;
15 }
16
17 WebMouseWheelEvent WebMouseWheelEvent::flattenTransform() const {
18 WebMouseWheelEvent result = *this;
19 result.deltaX /= result.m_frameScale;
20 result.deltaY /= result.m_frameScale;
majidvp 2016/12/20 17:30:14 I think this should also flatten movement{X,Y}. P
dtapuska 2017/01/03 20:19:14 I've added a FlattenTransformSelf on mouse event t
21 result.x = (result.x / result.m_frameScale) + result.m_frameTranslate.x;
22 result.y = (result.y / result.m_frameScale) + result.m_frameTranslate.y;
23 result.m_frameTranslate.x = 0;
24 result.m_frameTranslate.y = 0;
25 result.m_frameScale = 1;
26 return result;
27 }
28
29 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698