Skip to content
  • ossy@webkit.org's avatar
    [Qt] navigator.geolocation support for Qt port · 2880b949
    ossy@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=39724
    
    Patch by Mahesh Kulkarni <mahesh.kulkarni@nokia.com> on 2010-06-14
    Reviewed by Laszlo Gombos.
    
    WebCore: 
    
    Implemetion for Qt port of navigator.gelocation. Using qtmobility location service.
    
    * WebCore.pri:
    * WebCore.pro:
    * platform/qt/GeolocationServiceQt.cpp: Added.
    (WebCore::GeolocationServiceQt::create):
    (WebCore::GeolocationServiceQt::GeolocationServiceQt):
    (WebCore::GeolocationServiceQt::~GeolocationServiceQt):
    (WebCore::GeolocationServiceQt::positionUpdated):
    (WebCore::GeolocationServiceQt::startUpdating):
    (WebCore::GeolocationServiceQt::stopUpdating):
    * platform/qt/GeolocationServiceQt.h: Added.
    (WebCore::GeolocationServiceQt::lastPosition):
    (WebCore::GeolocationServiceQt::lastError):
    
    WebKit/qt: 
    
    Implement ChromeClientQt::requestGeolocationPermissionForFrame() which delegates call to QWebPage::allowGeolocationRequest
    Layout and unit test cases for the are also added. 
    
    * Api/qwebpage.cpp:
    (QWebPage::allowGeolocationRequest):
    * Api/qwebpage.h:
    * WebCoreSupport/ChromeClientQt.cpp:
    (WebCore::ChromeClientQt::requestGeolocationPermissionForFrame):
    * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
    (DumpRenderTreeSupportQt::setMockGeolocationPosition):
    (DumpRenderTreeSupportQt::setMockGeolocationError):
    * WebCoreSupport/DumpRenderTreeSupportQt.h:
    * tests/qwebpage/tst_qwebpage.cpp:
    (JSTestPage::shouldInterruptJavaScript):
    (JSTestPage::allowGeolocationRequest):
    (JSTestPage::setGeolocationPermission):
    (tst_QWebPage::geolocationRequestJS):
    
    WebKitTools: 
    
    Implementation for geolocation cases to DumpRenderTreeQt
    
    * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
    (WebCore::WebPage::allowGeolocationRequest):
    * DumpRenderTree/qt/DumpRenderTreeQt.h:
    * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
    (LayoutTestController::setGeolocationPermission):
    (LayoutTestController::setMockGeolocationError):
    (LayoutTestController::setMockGeolocationPosition):
    * DumpRenderTree/qt/LayoutTestControllerQt.h:
    (LayoutTestController::isGeolocationPermissionSet):
    (LayoutTestController::geolocationPermission):
    
    LayoutTests: 
    
    Uncommenting gelocation cases from Qt. Skipped one case: fast/dom/Geolocation/callback-to-remote-context2.html
    
    * platform/qt/Skipped:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@61117 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    2880b949