Changeset 125705 in webkit


Ignore:
Timestamp:
Aug 15, 2012 2:13:15 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[BlackBerry] Should not keep recreating GeoTracker in setEnableHighAccuracy()
https://bugs.webkit.org/show_bug.cgi?id=94136

Patch by Yong Li <yoli@rim.com> 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):

Location:
trunk/Source/WebKit/blackberry
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/blackberry/ChangeLog

    r125701 r125705  
     12012-08-15  Yong Li  <yoli@rim.com>
     2
     3        [BlackBerry] Should not keep recreating GeoTracker in setEnableHighAccuracy()
     4        https://bugs.webkit.org/show_bug.cgi?id=94136
     5
     6        Reviewed by Rob Buis.
     7        Internally reviewed by Lyon Chen.
     8
     9        PR# 192401.
     10        1. The prototype of GeoTracker::create() has changed.
     11        2. Fix the issue that it could recreate tracker unnecessarily when
     12           setEnableHighAccuracy() is called but accuracy requirment hasn't
     13           changed.
     14        3. Fix the issue setEnableHighAccuracy() could start tracking when
     15           tracker was suspended.
     16
     17        * WebCoreSupport/GeolocationControllerClientBlackBerry.cpp:
     18        (GeolocationControllerClientBlackBerry::startUpdating):
     19        (GeolocationControllerClientBlackBerry::setEnableHighAccuracy):
     20
    1212012-08-15  Mike Fenton  <mifenton@rim.com>
    222
  • trunk/Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.cpp

    r112720 r125705  
    4848        m_tracker->resume();
    4949    else
    50         m_tracker = BlackBerry::Platform::GeoTracker::create(this, 0, m_accuracy, -1, -1);
     50        m_tracker = BlackBerry::Platform::GeoTracker::create(this, m_accuracy);
    5151}
    5252
     
    102102    if (m_accuracy == newAccuracy)
    103103        return;
    104     if (m_tracker) {
    105         m_tracker->destroy();
    106         m_tracker = BlackBerry::Platform::GeoTracker::create(this, 0, newAccuracy, -1, -1);
    107     }
     104
     105    m_accuracy = newAccuracy;
     106
     107    if (m_tracker)
     108        m_tracker->setRequiresHighAccuracy(m_accuracy);
    108109}
    109110
Note: See TracChangeset for help on using the changeset viewer.