2010-12-20 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>

        Reviewed by Andreas Kling.

        Qt port of geolocation, geoposition objects timestamp was in seconds
        instead of miliseconds as per HTML5 Geolocation standards.
        Ref: http://dev.w3.org/geo/api/spec-source.html#position_interface
        http://www.w3.org/TR/DOM-Level-3-Core/core.html#Core-DOMTimeStamp

        Implemented by Asheesh Srivastava.

        [QT] QtWebkit geolocation's position.timestamp is not in miliseconds
        https://bugs.webkit.org/show_bug.cgi?id=51100

        Porting code not covered in layout testing. No new tests added.

        * platform/qt/GeolocationServiceQt.cpp:
        (WebCore::GeolocationServiceQt::positionUpdated):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74404 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent a0975e72
2010-12-20 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
Reviewed by Andreas Kling.
Qt port of geolocation, geoposition objects timestamp was in seconds
instead of miliseconds as per HTML5 Geolocation standards.
Ref: http://dev.w3.org/geo/api/spec-source.html#position_interface
http://www.w3.org/TR/DOM-Level-3-Core/core.html#Core-DOMTimeStamp
Implemented by Asheesh Srivastava.
[QT] QtWebkit geolocation's position.timestamp is not in miliseconds
https://bugs.webkit.org/show_bug.cgi?id=51100
Porting code not covered in layout testing. No new tests added.
* platform/qt/GeolocationServiceQt.cpp:
(WebCore::GeolocationServiceQt::positionUpdated):
2010-12-20 Yuzo Fujishima <yuzo@google.com>
Reviewed by Eric Seidel.
......
......@@ -83,7 +83,13 @@ void GeolocationServiceQt::positionUpdated(const QGeoPositionInfo &geoPosition)
RefPtr<Coordinates> coordinates = Coordinates::create(latitude, longitude, providesAltitude, altitude,
accuracy, providesAltitudeAccuracy, altitudeAccuracy,
providesHeading, heading, providesSpeed, speed);
m_lastPosition = Geoposition::create(coordinates.release(), geoPosition.timestamp().toTime_t());
#if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0)
m_lastPosition = Geoposition::create(coordinates.release(), geoPosition.timestamp().toMSecsSinceEpoch());
#else
QDateTime timestamp = geoPosition.timestamp();
m_lastPosition = Geoposition::create(coordinates.release(), (timestamp.toTime_t() * 1000.00) + timestamp.time().msec());
#endif
positionChanged();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment