Get accelerometer necessary data via Qt mobility library using a provider class.
Created attachment 69808 [details] Patch
Comment on attachment 69808 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=69808&action=review Are we not supposed to pass more tests? > WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.cpp:30 > + m_motion = DeviceMotionData::create(); Who is freeing this one?
(In reply to comment #2) > > WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.cpp:30 > > + m_motion = DeviceMotionData::create(); > > Who is freeing this one? It looks like RefPtr is going to :) RefPtr<DeviceMotionData> m_motion;
(In reply to comment #2) > (From update of attachment 69808 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=69808&action=review > > Are we not supposed to pass more tests? Needs some implementation in DRT, I will working on it in other patch > > WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.cpp:30 > > + m_motion = DeviceMotionData::create(); > > Who is freeing this one?
I did some test with OwnPtr for m_motion, it seems leaking and crashing, because the client needs to have access to the last motion state. So if think RefPtr is the best choice, as it frees automatically.
Created attachment 69974 [details] Patch v2
Comment on attachment 69974 [details] Patch v2 View in context: https://bugs.webkit.org/attachment.cgi?id=69974&action=review r=me, but please fix the below: > WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.h:44 > + DeviceMotionData* currentDeviceMotion() { return m_motion.get(); } This method should be const.
(In reply to comment #7) > (From update of attachment 69974 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=69974&action=review > > r=me, but please fix the below: > > > WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.h:44 > > + DeviceMotionData* currentDeviceMotion() { return m_motion.get(); } > > This method should be const. Thanks Kling :)
Comment on attachment 69974 [details] Patch v2 Clearing flags. Patch landed at r69313