WebCore/ChangeLog

 12010-08-18 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 [Qt] Request for permission before starting Geolocation service
 6 https://bugs.webkit.org/show_bug.cgi?id=42027
 7
 8 Handles starting location acquisition when request is granted for ports using
 9 "!CLIENT_BASED_GEOLOCATION and PREEMPT_GEOLOCATION_PERMISSION" policy
 10 Only Qt port as of today uses the above combination. Enable
 11 PREEMPT_GEOLOCATION_PERMISSION for qt port.
 12
 13 Delayed layout cases for this bug are skipped for Qt (bug #41364 will fix)
 14
 15 * WebCore.pro:
 16 * page/Geolocation.cpp:
 17 (WebCore::Geolocation::handlePendingPermissionNotifiers):
 18
1192010-08-17 Girish Ramakrishnan <girish@forwardbias.in>
220
321 Reviewed by Antonio Gomes.

WebCore/WebCore.pro

@@contains(DEFINES, ENABLE_QT_BEARER=1) {
27962796}
27972797
27982798contains(DEFINES, ENABLE_GEOLOCATION=1) {
 2799 DEFINES += WTF_USE_PREEMPT_GEOLOCATION_PERMISSION
27992800 HEADERS += \
28002801 platform/qt/GeolocationServiceQt.h
28012802 SOURCES += \

WebCore/page/Geolocation.cpp

@@void Geolocation::handlePendingPermissionNotifiers()
695695 if (isAllowed()) {
696696 // start all pending notification requests as permission granted.
697697 // The notifier is always ref'ed by m_oneShots or m_watchers.
698 #if ENABLE(CLIENT_BASED_GEOLOCATION)
699  notifier->startTimerIfNeeded();
700  page->geolocationController()->addObserver(this, notifier->m_options->enableHighAccuracy());
701 #else
702  // TODO: Handle startUpdate() for non-client based implementations using pre-emptive policy
703 #endif
 698 if (startUpdating(notifier))
 699 notifier->startTimerIfNeeded();
 700 else
 701 notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, failedToStartServiceErrorMessage));
704702 } else
705703 notifier->setFatalError(PositionError::create(PositionError::PERMISSION_DENIED, permissionDeniedErrorMessage));
706704 }