From 967717af5423377c967781471ee106e2bb4e11c8 Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Thu, 22 Jul 2010 15:37:06 +0100 Subject: Merge WebKit at r63859 : Initial merge by git. Change-Id: Ie8096c63ec7c991c9a9cba8bdd9c3b74a3b8ed62 --- WebCore/dom/DeviceOrientationEvent.cpp | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'WebCore/dom/DeviceOrientationEvent.cpp') 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 -- cgit v1.1