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

Unified Diff: Source/core/dom/WheelEvent.h

Issue 22859012: Add support for DOM Level 3 WheelEvent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rename prefixedType() to legacyType() Created 7 years, 4 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
« no previous file with comments | « Source/core/dom/Node.cpp ('k') | Source/core/dom/WheelEvent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/WheelEvent.h
diff --git a/Source/core/dom/WheelEvent.h b/Source/core/dom/WheelEvent.h
index ba17ab4ad2432fd22dcc01ebb32b281692cc6be6..ea2e81c8fe9d3851529450e4d6684faafb44711d 100644
--- a/Source/core/dom/WheelEvent.h
+++ b/Source/core/dom/WheelEvent.h
@@ -3,6 +3,7 @@
* Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
* Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2013 Samsung Electronics. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -35,8 +36,11 @@ class PlatformWheelEvent;
struct WheelEventInit : public MouseEventInit {
WheelEventInit();
- int wheelDeltaX;
- int wheelDeltaY;
+ double deltaX;
+ double deltaY;
+ double deltaZ;
+ int wheelDeltaX; // Deprecated.
+ int wheelDeltaY; // Deprecated.
unsigned deltaMode;
};
@@ -77,9 +81,12 @@ public:
int screenX, int screenY, int pageX, int pageY,
bool ctrlKey, bool altKey, bool shiftKey, bool metaKey);
- int wheelDelta() const { return m_wheelDelta.y() ? m_wheelDelta.y() : m_wheelDelta.x(); }
- int wheelDeltaX() const { return m_wheelDelta.x(); }
- int wheelDeltaY() const { return m_wheelDelta.y(); }
+ double deltaX() const { return m_deltaX; }
+ double deltaY() const { return m_deltaY; }
+ double deltaZ() const { return m_deltaZ; }
+ int wheelDelta() const { return m_deltaY ? m_deltaY : m_deltaX; } // Deprecated.
+ int wheelDeltaX() const { return m_deltaX; } // Deprecated.
+ int wheelDeltaY() const { return m_deltaY; } // Deprecated.
int rawDeltaX() const { return m_rawDelta.x(); }
int rawDeltaY() const { return m_rawDelta.y(); }
unsigned deltaMode() const { return m_deltaMode; }
@@ -96,7 +103,9 @@ private:
unsigned, PassRefPtr<AbstractView>, const IntPoint& screenLocation, const IntPoint& pageLocation,
bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool directionInvertedFromDevice);
- IntPoint m_wheelDelta;
+ double m_deltaX;
+ double m_deltaY;
+ double m_deltaZ;
IntPoint m_rawDelta;
unsigned m_deltaMode;
bool m_directionInvertedFromDevice;
« no previous file with comments | « Source/core/dom/Node.cpp ('k') | Source/core/dom/WheelEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698