Skip to content
  • hausmann@webkit.org's avatar
    [Qt] Improve the handling of mock geolocation, device orientation and motion clients · f54d2522
    hausmann@webkit.org authored
    Reviewed by Tor Arne Vestbø.
    
    The mock versions of these web facing features should be instantiated when
    running in DumpRenderTree only. In order for them to work, no extra Qt modules
    such as QtLocation are actually needed.
    
    This patch decouples enabling device orientation/motion and geolocation from
    the underlying Qt modules and makes them available in developer builds
    (!production_build) and backed by mock backends when running in drt.
    
    So if the Qt 5 modules are available, they'll be used (unless drtRun). For
    developers the web facing features are always enabled (although requests will
    time out) and the mock backends are enabled inside DRT, allowing for the layout
    tests to run with less dependencies.
    
    In addition this also enables the mock device motion client, which was
    previously never instantiated.
    
    .:
    
    * Source/widgetsapi.pri:
    
    Source/WebCore:
    
    * Target.pri:
    * WebCore.pri:
    
    Source/WebKit:
    
    * WebKit1.pri:
    * WebKit1.pro:
    
    Source/WebKit/qt:
    
    * WebCoreSupport/QWebFrameAdapter.cpp:
    (QWebFrameAdapter::_q_orientationChanged):
    * WebCoreSupport/QWebFrameAdapter.h:
    * WebCoreSupport/QWebPageAdapter.cpp:
    (QWebPageAdapter::initializeWebCorePage):
    * WebCoreSupport/QWebPageAdapter.h:
    * WidgetApi/qwebframe.cpp:
    (QWebFrame::QWebFrame):
    * WidgetApi/qwebpage.cpp:
    (QWebPage::setFeaturePermission):
    
    Source/WebKit2:
    
    * Target.pri:
    * UIProcess/qt/WebContextQt.cpp:
    (WebKit::WebContext::platformInitializeWebProcess):
    * UIProcess/qt/WebGeolocationProviderQt.cpp:
    * WebKit2.pri:
    * WebProcess/WebPage/WebPage.cpp:
    (WebKit::WebPage::WebPage):
    
    Tools:
    
    * qmake/mkspecs/features/features.prf:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    f54d2522