Title: [125705] trunk/Source/WebKit/blackberry
- Revision
- 125705
- Author
- [email protected]
- Date
- 2012-08-15 14:13:15 -0700 (Wed, 15 Aug 2012)
Log Message
[BlackBerry] Should not keep recreating GeoTracker in setEnableHighAccuracy()
https://bugs.webkit.org/show_bug.cgi?id=94136
Patch by Yong Li <[email protected]> on 2012-08-15
Reviewed by Rob Buis.
Internally reviewed by Lyon Chen.
PR# 192401.
1. The prototype of GeoTracker::create() has changed.
2. Fix the issue that it could recreate tracker unnecessarily when
setEnableHighAccuracy() is called but accuracy requirment hasn't
changed.
3. Fix the issue setEnableHighAccuracy() could start tracking when
tracker was suspended.
* WebCoreSupport/GeolocationControllerClientBlackBerry.cpp:
(GeolocationControllerClientBlackBerry::startUpdating):
(GeolocationControllerClientBlackBerry::setEnableHighAccuracy):
Modified Paths
Diff
Modified: trunk/Source/WebKit/blackberry/ChangeLog (125704 => 125705)
--- trunk/Source/WebKit/blackberry/ChangeLog 2012-08-15 21:09:00 UTC (rev 125704)
+++ trunk/Source/WebKit/blackberry/ChangeLog 2012-08-15 21:13:15 UTC (rev 125705)
@@ -1,3 +1,23 @@
+2012-08-15 Yong Li <[email protected]>
+
+ [BlackBerry] Should not keep recreating GeoTracker in setEnableHighAccuracy()
+ https://bugs.webkit.org/show_bug.cgi?id=94136
+
+ Reviewed by Rob Buis.
+ Internally reviewed by Lyon Chen.
+
+ PR# 192401.
+ 1. The prototype of GeoTracker::create() has changed.
+ 2. Fix the issue that it could recreate tracker unnecessarily when
+ setEnableHighAccuracy() is called but accuracy requirment hasn't
+ changed.
+ 3. Fix the issue setEnableHighAccuracy() could start tracking when
+ tracker was suspended.
+
+ * WebCoreSupport/GeolocationControllerClientBlackBerry.cpp:
+ (GeolocationControllerClientBlackBerry::startUpdating):
+ (GeolocationControllerClientBlackBerry::setEnableHighAccuracy):
+
2012-08-15 Mike Fenton <[email protected]>
[BlackBerry] Use the unconverted attribute instead of composing when deciding to how to handle key input.
Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.cpp (125704 => 125705)
--- trunk/Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.cpp 2012-08-15 21:09:00 UTC (rev 125704)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.cpp 2012-08-15 21:13:15 UTC (rev 125705)
@@ -47,7 +47,7 @@
if (m_tracker)
m_tracker->resume();
else
- m_tracker = BlackBerry::Platform::GeoTracker::create(this, 0, m_accuracy, -1, -1);
+ m_tracker = BlackBerry::Platform::GeoTracker::create(this, m_accuracy);
}
void GeolocationControllerClientBlackBerry::stopUpdating()
@@ -101,9 +101,10 @@
{
if (m_accuracy == newAccuracy)
return;
- if (m_tracker) {
- m_tracker->destroy();
- m_tracker = BlackBerry::Platform::GeoTracker::create(this, 0, newAccuracy, -1, -1);
- }
+
+ m_accuracy = newAccuracy;
+
+ if (m_tracker)
+ m_tracker->setRequiresHighAccuracy(m_accuracy);
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes