Modified: trunk/Source/WebKit/blackberry/ChangeLog (121224 => 121225)
--- trunk/Source/WebKit/blackberry/ChangeLog 2012-06-26 04:14:54 UTC (rev 121224)
+++ trunk/Source/WebKit/blackberry/ChangeLog 2012-06-26 04:31:48 UTC (rev 121225)
@@ -1,3 +1,17 @@
+2012-06-25 Leo Yang <[email protected]>
+
+ [BlackBerry] Fill more data in device motion event
+ https://bugs.webkit.org/show_bug.cgi?id=89857
+
+ Reviewed by Antonio Gomes.
+
+ Reviewed internally by Robin Cao.
+
+ Fill acceleration and rotation rate into DeviceMotionData.
+
+ * WebCoreSupport/DeviceMotionClientBlackBerry.cpp:
+ (DeviceMotionClientBlackBerry::onMotion):
+
2012-06-25 Yong Li <[email protected]>
[BlackBerry] Add JSC statistics into about:memory
Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/DeviceMotionClientBlackBerry.cpp (121224 => 121225)
--- trunk/Source/WebKit/blackberry/WebCoreSupport/DeviceMotionClientBlackBerry.cpp 2012-06-26 04:14:54 UTC (rev 121224)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/DeviceMotionClientBlackBerry.cpp 2012-06-26 04:31:48 UTC (rev 121225)
@@ -71,11 +71,19 @@
void DeviceMotionClientBlackBerry::onMotion(const BlackBerry::Platform::DeviceMotionEvent* event)
{
- RefPtr<DeviceMotionData::Acceleration> accel = DeviceMotionData::Acceleration::create(
- true, event->x, true, event->y, true, event->z);
+ // All boolean parameters in the following create() calls indicate that if the following parameter is validly provided.
+ RefPtr<DeviceMotionData::Acceleration> acceleration = DeviceMotionData::Acceleration::create(
+ true, event->acceleration.x, true, event->acceleration.y, true, event->acceleration.z);
+
+ RefPtr<DeviceMotionData::Acceleration> accelerationIncludingGravity = DeviceMotionData::Acceleration::create(
+ true, event->accelerationIncludingGravity.x, true, event->accelerationIncludingGravity.y, true, event->accelerationIncludingGravity.z);
+
+ RefPtr<DeviceMotionData::RotationRate> rotationRate = DeviceMotionData::RotationRate::create(
+ true, event->rotationRate.alpha, true, event->rotationRate.beta, true, event->rotationRate.gamma);
+
double now = WTF::currentTimeMS();
- m_currentMotion = DeviceMotionData::create(0, accel, 0, m_lastEventTime, m_lastEventTime - now);
+ m_currentMotion = DeviceMotionData::create(acceleration, accelerationIncludingGravity, rotationRate, m_lastEventTime, m_lastEventTime - now);
m_lastEventTime = now;
if (!m_controller)