Bug 47105

Summary: [Qt] Hook up accelerometer data via Qt DeviceMotion
Product: WebKit Reporter: Diego Gonzalez <diegohcg>
Component: WebKit QtAssignee: Diego Gonzalez <diegohcg>
Status: RESOLVED FIXED    
Severity: Normal CC: hausmann, kenneth, kling, tonikitoo
Priority: P2 Keywords: Qt
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 47050    
Attachments:
Description Flags
Patch
none
Patch v2 none

Diego Gonzalez
Reported 2010-10-04 12:43:48 PDT
Get accelerometer necessary data via Qt mobility library using a provider class.
Attachments
Patch (12.50 KB, patch)
2010-10-05 10:46 PDT, Diego Gonzalez
no flags
Patch v2 (12.41 KB, patch)
2010-10-06 11:57 PDT, Diego Gonzalez
no flags
Diego Gonzalez
Comment 1 2010-10-05 10:46:31 PDT
Kenneth Rohde Christiansen
Comment 2 2010-10-05 11:36:49 PDT
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?
Simon Hausmann
Comment 3 2010-10-06 01:24:05 PDT
(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;
Diego Gonzalez
Comment 4 2010-10-06 05:41:04 PDT
(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?
Diego Gonzalez
Comment 5 2010-10-06 05:45:18 PDT
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.
Diego Gonzalez
Comment 6 2010-10-06 11:57:41 PDT
Created attachment 69974 [details] Patch v2
Andreas Kling
Comment 7 2010-10-06 22:35:06 PDT
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.
Diego Gonzalez
Comment 8 2010-10-07 08:53:22 PDT
(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 :)
Diego Gonzalez
Comment 9 2010-10-07 09:26:21 PDT
Comment on attachment 69974 [details] Patch v2 Clearing flags. Patch landed at r69313
Note You need to log in before you can comment on or make changes to this bug.