diff options
author | Ben Murdoch <benm@google.com> | 2010-07-22 15:37:06 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2010-07-27 10:20:25 +0100 |
commit | 967717af5423377c967781471ee106e2bb4e11c8 (patch) | |
tree | 1e701dc0a12f7f07cce1df4a7681717de77a211b /WebCore/dom/DeviceOrientationEvent.cpp | |
parent | dcc30a9fca45f634b1d3a12b276d3a0ccce99fc3 (diff) | |
download | external_webkit-967717af5423377c967781471ee106e2bb4e11c8.zip external_webkit-967717af5423377c967781471ee106e2bb4e11c8.tar.gz external_webkit-967717af5423377c967781471ee106e2bb4e11c8.tar.bz2 |
Merge WebKit at r63859 : Initial merge by git.
Change-Id: Ie8096c63ec7c991c9a9cba8bdd9c3b74a3b8ed62
Diffstat (limited to 'WebCore/dom/DeviceOrientationEvent.cpp')
-rw-r--r-- | WebCore/dom/DeviceOrientationEvent.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/WebCore/dom/DeviceOrientationEvent.cpp b/WebCore/dom/DeviceOrientationEvent.cpp index b1aae65..992b6ce 100644 --- a/WebCore/dom/DeviceOrientationEvent.cpp +++ b/WebCore/dom/DeviceOrientationEvent.cpp @@ -26,35 +26,34 @@ #include "config.h" #include "DeviceOrientationEvent.h" +#include "DeviceOrientation.h" + #if ENABLE(DEVICE_ORIENTATION) namespace WebCore { +DeviceOrientationEvent::~DeviceOrientationEvent() +{ +} + DeviceOrientationEvent::DeviceOrientationEvent() - : m_alpha(0) - , m_beta(0) - , m_gamma(0) + : m_orientation(DeviceOrientation::create()) { } -DeviceOrientationEvent::DeviceOrientationEvent(const AtomicString& eventType, double alpha, double beta, double gamma) +DeviceOrientationEvent::DeviceOrientationEvent(const AtomicString& eventType, DeviceOrientation* orientation) : Event(eventType, false, false) // Can't bubble, not cancelable - , m_alpha(alpha) - , m_beta(beta) - , m_gamma(gamma) + , m_orientation(orientation) { } -void DeviceOrientationEvent::initDeviceOrientationEvent(const AtomicString& eventType, bool canBubble, bool cancelable, double alpha, double beta, double gamma) +void DeviceOrientationEvent::initDeviceOrientationEvent(const AtomicString& type, bool bubbles, bool cancelable, DeviceOrientation* orientation) { if (dispatched()) return; - initEvent(eventType, canBubble, cancelable); - - m_alpha = alpha; - m_beta = beta; - m_gamma = gamma; + initEvent(type, bubbles, cancelable); + m_orientation = orientation; } } // namespace WebCore |