Changeset 102755 in webkit


Ignore:
Timestamp:
Dec 14, 2011 1:57:26 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[Qt] DeviceOrientationClientMockQt should be removed in favor of DeviceOrientationClientMock
https://bugs.webkit.org/show_bug.cgi?id=74417

Patch by Alexander Færøy <alexander.faeroy@nokia.com> on 2011-12-14
Reviewed by Simon Hausmann.

Based on original patch by Kenneth Christiansen.

.:

  • Source/api.pri:

Source/WebCore:

Already covered by current tests.

  • dom/DeviceOrientationController.h:

(WebCore::DeviceOrientationController::client):

Source/WebKit/qt:

Already covered by current tests.

  • Api/qwebpage.cpp:

(QWebPagePrivate::QWebPagePrivate):

  • WebCoreSupport/DeviceMotionProviderQt.cpp:

(WebCore::DeviceMotionProviderQt::DeviceMotionProviderQt):
(WebCore::DeviceMotionProviderQt::filter):

  • WebCoreSupport/DeviceMotionProviderQt.h:
  • WebCoreSupport/DeviceOrientationClientMockQt.cpp: Removed.
  • WebCoreSupport/DeviceOrientationClientMockQt.h: Removed.
  • WebCoreSupport/DeviceOrientationClientQt.cpp:

(WebCore::DeviceOrientationClientQt::DeviceOrientationClientQt):
(WebCore::DeviceOrientationClientQt::~DeviceOrientationClientQt):
(WebCore::DeviceOrientationClientQt::lastOrientation):

  • WebCoreSupport/DeviceOrientationClientQt.h:
  • WebCoreSupport/DeviceOrientationProviderQt.cpp:

(WebCore::DeviceOrientationProviderQt::DeviceOrientationProviderQt):
(WebCore::DeviceOrientationProviderQt::setController):
(WebCore::DeviceOrientationProviderQt::start):
(WebCore::DeviceOrientationProviderQt::stop):
(WebCore::DeviceOrientationProviderQt::filter):

  • WebCoreSupport/DeviceOrientationProviderQt.h:

(WebCore::DeviceOrientationProviderQt::isActive):
(WebCore::DeviceOrientationProviderQt::lastOrientation):
(WebCore::DeviceOrientationProviderQt::hasAlpha):

  • WebCoreSupport/DumpRenderTreeSupportQt.cpp:

(toDeviceOrientationClientMock):
(DumpRenderTreeSupportQt::setMockDeviceOrientation):

  • WebCoreSupport/DumpRenderTreeSupportQt.h:

Tools:

Already covered by current tests.

  • DumpRenderTree/qt/DumpRenderTreeQt.cpp:

(WebCore::DumpRenderTree::DumpRenderTree):
(WebCore::DumpRenderTree::~DumpRenderTree):

  • DumpRenderTree/qt/LayoutTestControllerQt.cpp:

(LayoutTestController::setMockDeviceOrientation):

Location:
trunk
Files:
2 deleted
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r102750 r102755  
     12011-12-14  Alexander Færøy  <alexander.faeroy@nokia.com>
     2
     3        [Qt] DeviceOrientationClientMockQt should be removed in favor of DeviceOrientationClientMock
     4        https://bugs.webkit.org/show_bug.cgi?id=74417
     5
     6        Reviewed by Simon Hausmann.
     7
     8        Based on original patch by Kenneth Christiansen.
     9
     10        * Source/api.pri:
     11
    1122011-12-14  Jacky Jiang  <zhajiang@rim.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r102750 r102755  
     12011-12-14  Alexander Færøy  <alexander.faeroy@nokia.com>
     2
     3        [Qt] DeviceOrientationClientMockQt should be removed in favor of DeviceOrientationClientMock
     4        https://bugs.webkit.org/show_bug.cgi?id=74417
     5
     6        Reviewed by Simon Hausmann.
     7
     8        Based on original patch by Kenneth Christiansen.
     9
     10        Already covered by current tests.
     11
     12        * dom/DeviceOrientationController.h:
     13        (WebCore::DeviceOrientationController::client):
     14
    1152011-12-14  Jacky Jiang  <zhajiang@rim.com>
    216
  • trunk/Source/WebCore/dom/DeviceOrientationController.h

    r98481 r102755  
    5454    bool isActive() { return !m_listeners.isEmpty(); }
    5555
     56    DeviceOrientationClient* client() const { return m_client; }
     57
    5658private:
    5759    void timerFired(Timer<DeviceOrientationController>*);
  • trunk/Source/WebKit/qt/Api/qwebpage.cpp

    r101477 r102755  
    4747#include "ContextMenuController.h"
    4848#include "DeviceMotionClientQt.h"
     49#include "DeviceOrientationClientMock.h"
    4950#include "DeviceOrientationClientQt.h"
    5051#include "DocumentLoader.h"
     
    311312    , m_lastDropAction(Qt::IgnoreAction)
    312313{
     314    bool useMock = QWebPagePrivate::drtRun;
     315
    313316    WebCore::initializeWebCoreQt();
    314317
     
    320323    pageClients.inspectorClient = new InspectorClientQt(q);
    321324#if ENABLE(DEVICE_ORIENTATION)
    322     pageClients.deviceOrientationClient = new DeviceOrientationClientQt(q);
     325    if (useMock)
     326        pageClients.deviceOrientationClient = new DeviceOrientationClientMock;
     327    else
     328        pageClients.deviceOrientationClient = new DeviceOrientationClientQt;
     329
    323330    pageClients.deviceMotionClient = new DeviceMotionClientQt(q);
    324331#endif
    325332#if ENABLE(CLIENT_BASED_GEOLOCATION)
    326     if (QWebPagePrivate::drtRun)
    327         pageClients.geolocationClient = new GeolocationClientMock();
     333    if (useMock)
     334        pageClients.geolocationClient = new GeolocationClientMock;
    328335    else
    329336        pageClients.geolocationClient = new GeolocationClientQt(q);
  • trunk/Source/WebKit/qt/ChangeLog

    r102592 r102755  
     12011-12-14  Alexander Færøy  <alexander.faeroy@nokia.com>
     2
     3        [Qt] DeviceOrientationClientMockQt should be removed in favor of DeviceOrientationClientMock
     4        https://bugs.webkit.org/show_bug.cgi?id=74417
     5
     6        Reviewed by Simon Hausmann.
     7
     8        Based on original patch by Kenneth Christiansen.
     9
     10        Already covered by current tests.
     11
     12        * Api/qwebpage.cpp:
     13        (QWebPagePrivate::QWebPagePrivate):
     14        * WebCoreSupport/DeviceMotionProviderQt.cpp:
     15        (WebCore::DeviceMotionProviderQt::DeviceMotionProviderQt):
     16        (WebCore::DeviceMotionProviderQt::filter):
     17        * WebCoreSupport/DeviceMotionProviderQt.h:
     18        * WebCoreSupport/DeviceOrientationClientMockQt.cpp: Removed.
     19        * WebCoreSupport/DeviceOrientationClientMockQt.h: Removed.
     20        * WebCoreSupport/DeviceOrientationClientQt.cpp:
     21        (WebCore::DeviceOrientationClientQt::DeviceOrientationClientQt):
     22        (WebCore::DeviceOrientationClientQt::~DeviceOrientationClientQt):
     23        (WebCore::DeviceOrientationClientQt::lastOrientation):
     24        * WebCoreSupport/DeviceOrientationClientQt.h:
     25        * WebCoreSupport/DeviceOrientationProviderQt.cpp:
     26        (WebCore::DeviceOrientationProviderQt::DeviceOrientationProviderQt):
     27        (WebCore::DeviceOrientationProviderQt::setController):
     28        (WebCore::DeviceOrientationProviderQt::start):
     29        (WebCore::DeviceOrientationProviderQt::stop):
     30        (WebCore::DeviceOrientationProviderQt::filter):
     31        * WebCoreSupport/DeviceOrientationProviderQt.h:
     32        (WebCore::DeviceOrientationProviderQt::isActive):
     33        (WebCore::DeviceOrientationProviderQt::lastOrientation):
     34        (WebCore::DeviceOrientationProviderQt::hasAlpha):
     35        * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
     36        (toDeviceOrientationClientMock):
     37        (DumpRenderTreeSupportQt::setMockDeviceOrientation):
     38        * WebCoreSupport/DumpRenderTreeSupportQt.h:
     39
    1402011-12-12  Nándor Huszka  <huszka.nandor@stud.u-szeged.hu>
    241
  • trunk/Source/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.cpp

    r95901 r102755  
    2929    m_acceleration.addFilter(this);
    3030    m_motion = DeviceMotionData::create();
    31     m_deviceOrientation = new DeviceOrientationProviderQt();
     31    m_deviceOrientation = new DeviceOrientationProviderQt;
    3232}
    3333
     
    5757
    5858    RefPtr<DeviceMotionData::RotationRate> rotation = DeviceMotionData::RotationRate::create(
    59             m_deviceOrientation->hasAlpha(), m_deviceOrientation->orientation()->alpha(),
    60             /* beta available */ true, m_deviceOrientation->orientation()->beta(),
    61             /* gamma available */ true, m_deviceOrientation->orientation()->gamma());
     59            m_deviceOrientation->hasAlpha(), m_deviceOrientation->lastOrientation()->alpha(),
     60            /* beta available */ true, m_deviceOrientation->lastOrientation()->beta(),
     61            /* gamma available */ true, m_deviceOrientation->lastOrientation()->gamma());
    6262
    6363    m_motion = DeviceMotionData::create(accel,
  • trunk/Source/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.h

    r95901 r102755  
    2727#include <QObject>
    2828
     29#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
    2930QTM_USE_NAMESPACE
     31#endif
    3032
    3133namespace WebCore {
  • trunk/Source/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.cpp

    r95901 r102755  
    2121#include "DeviceOrientationClientQt.h"
    2222
    23 #include "DeviceOrientationClientMockQt.h"
    2423#include "DeviceOrientationController.h"
    2524#include "DeviceOrientationProviderQt.h"
    26 #include "qwebpage.h"
    2725
    2826namespace WebCore {
    2927
    30 DeviceOrientationClientQt::DeviceOrientationClientQt(QWebPage* page)
    31     : m_page(page)
    32     , m_controller(0)
     28DeviceOrientationClientQt::DeviceOrientationClientQt()
     29    : m_controller(0)
    3330    , m_provider(new DeviceOrientationProviderQt())
    3431{
    35     connect(m_provider, SIGNAL(deviceOrientationChanged(DeviceOrientation*)), SLOT(changeDeviceOrientation(DeviceOrientation*)));
    3632}
    3733
    3834DeviceOrientationClientQt::~DeviceOrientationClientQt()
    3935{
    40     disconnect();
    4136    delete m_provider;
    4237}
     
    5954DeviceOrientation* DeviceOrientationClientQt::lastOrientation() const
    6055{
    61     return m_provider->orientation();
     56    return m_provider->lastOrientation();
    6257}
    6358
     
    7671
    7772} // namespace WebCore
    78 
    79 #include "moc_DeviceOrientationClientQt.cpp"
  • trunk/Source/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.h

    r95901 r102755  
    2424#include "DeviceOrientationClient.h"
    2525
    26 #include <QObject>
    27 
    28 class QWebPage;
    29 
    3026namespace WebCore {
    3127
    3228class DeviceOrientationProviderQt;
    3329
    34 class DeviceOrientationClientQt : public QObject, public DeviceOrientationClient {
    35     Q_OBJECT
     30class DeviceOrientationClientQt : public DeviceOrientationClient {
    3631public:
    37     DeviceOrientationClientQt(QWebPage*);
     32    DeviceOrientationClientQt();
    3833    virtual ~DeviceOrientationClientQt();
    3934
     
    4338    virtual DeviceOrientation* lastOrientation() const;
    4439    virtual void deviceOrientationControllerDestroyed();
    45 
    46 public Q_SLOTS:
    47     void changeDeviceOrientation(DeviceOrientation*);
     40    virtual void changeDeviceOrientation(DeviceOrientation*);
    4841
    4942private:
    50     QWebPage* m_page;
    5143    DeviceOrientationController* m_controller;
    5244    DeviceOrientationProviderQt* m_provider;
  • trunk/Source/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.cpp

    r95901 r102755  
    2121#include "DeviceOrientationProviderQt.h"
    2222
    23 #include "DeviceOrientationClientMockQt.h"
    24 
    2523namespace WebCore {
    2624
    2725DeviceOrientationProviderQt::DeviceOrientationProviderQt()
    2826{
    29     m_rotation.addFilter(this);
    30     m_orientation = DeviceOrientation::create();
    31 
    32     if (DeviceOrientationClientMockQt::mockIsActive)
    33         activeClientMock();
     27    m_sensor.addFilter(this);
     28    m_lastOrientation = DeviceOrientation::create();
    3429}
    3530
    36 DeviceOrientationProviderQt::~DeviceOrientationProviderQt()
     31void DeviceOrientationProviderQt::setController(DeviceOrientationController* controller)
    3732{
    38     disconnect();
     33    if (!controller)
     34        stop();
     35
     36    m_controller = controller;
    3937}
    4038
    4139void DeviceOrientationProviderQt::start()
    4240{
    43     m_rotation.start();
     41    m_sensor.start();
    4442}
    4543
    4644void DeviceOrientationProviderQt::stop()
    4745{
    48     m_rotation.stop();
     46    m_sensor.stop();
    4947}
    5048
    5149bool DeviceOrientationProviderQt::filter(QRotationReading* reading)
    5250{
    53     // Provide device orientation data according W3C spec:
    54     // http://dev.w3.org/geo/api/spec-source-orientation.html
    55     // Qt mobility provide these data via QRotationSensor using the
    56     // QRotationReading class:
    57     //  - the rotation around z axis (alpha) is given as z in QRotationReading;
    58     //  - the rotation around x axis (beta) is given as x in QRotationReading;
    59     //  - the rotation around y axis (gamma) is given as y in QRotationReading;
    60     // See: http://doc.qt.nokia.com/qtmobility-1.0/qrotationreading.html
    61     // The Z (alpha) rotation angle is checked via hasAlpha() private method,
    62     // depending if the device is able do detect the alpha rotation. X (beta) and
    63     // Y (gamma) axis are availble in this context.
    64     m_orientation = DeviceOrientation::create(hasAlpha(), reading->z(),
    65             /* x available */ true, reading->x(),
    66             /* y available */ true, reading->y());
    67     emit deviceOrientationChanged(m_orientation.get());
     51    if (m_controller) {
     52        // Provide device orientation data according W3C spec:
     53        // http://dev.w3.org/geo/api/spec-source-orientation.html
     54        // Qt mobility provide these data via QRotationSensor using the
     55        // QRotationReading class:
     56        //  - the rotation around z axis (alpha) is given as z in QRotationReading;
     57        //  - the rotation around x axis (beta) is given as x in QRotationReading;
     58        //  - the rotation around y axis (gamma) is given as y in QRotationReading;
     59        // See: http://doc.qt.nokia.com/qtmobility-1.0/qrotationreading.html
     60        // The Z (alpha) rotation angle is checked via hasAlpha() private method,
     61        // depending if the device is able do detect the alpha rotation. X (beta) and
     62        // Y (gamma) axis are availble in this context.
     63        m_lastOrientation = DeviceOrientation::create(hasAlpha(), reading->z(),
     64                /* x available */ true, reading->x(),
     65                /* y available */ true, reading->y());
     66        m_controller->didChangeDeviceOrientation(m_lastOrientation.get());
     67    }
    6868
     69    // We are the only filter, so no need to propagate.
    6970    return false;
    7071}
    7172
    72 void DeviceOrientationProviderQt::changeDeviceOrientation(DeviceOrientation* orientation)
    73 {
    74     m_orientation = orientation;
    7573}
    76 
    77 void DeviceOrientationProviderQt::activeClientMock()
    78 {
    79     connect(DeviceOrientationClientMockQt::client(), SIGNAL(mockOrientationChanged(DeviceOrientation*)), SLOT(changeDeviceOrientation(DeviceOrientation*)));
    80 }
    81 
    82 }
    83 
    84 #include "moc_DeviceOrientationProviderQt.cpp"
  • trunk/Source/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.h

    r95901 r102755  
    2222
    2323#include "DeviceOrientation.h"
    24 #include "RefPtr.h"
     24#include "DeviceOrientationController.h"
     25#include <wtf/RefPtr.h>
    2526
    26 #include <QObject>
    2727#include <QRotationFilter>
    2828
     29#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
    2930QTM_USE_NAMESPACE
     31#endif
    3032
    3133namespace WebCore {
    3234
    33 class DeviceOrientationClientQt;
    34 
    35 class DeviceOrientationProviderQt : public QObject, public QRotationFilter {
    36     Q_OBJECT
     35class DeviceOrientationProviderQt : public QRotationFilter {
    3736public:
    3837    DeviceOrientationProviderQt();
    39     ~DeviceOrientationProviderQt();
    4038
     39    void setController(DeviceOrientationController*);
    4140    bool filter(QRotationReading*);
    4241    void start();
    4342    void stop();
    44     bool isActive() const { return m_rotation.isActive(); }
    45     DeviceOrientation* orientation() const { return m_orientation.get(); }
    46     bool hasAlpha() const { return m_rotation.property("hasZ").toBool(); }
    47 
    48 Q_SIGNALS:
    49     void deviceOrientationChanged(DeviceOrientation*);
    50 
    51 public Q_SLOTS:
    52     void changeDeviceOrientation(DeviceOrientation*);
     43    bool isActive() const { return m_sensor.isActive(); }
     44    DeviceOrientation* lastOrientation() const { return m_lastOrientation.get(); }
     45    bool hasAlpha() const { return m_sensor.property("hasZ").toBool(); }
    5346
    5447private:
    55     void activeClientMock();
    56 
    57     RefPtr<DeviceOrientation> m_orientation;
    58     QRotationSensor m_rotation;
     48    RefPtr<DeviceOrientation> m_lastOrientation;
     49    DeviceOrientationController* m_controller;
     50    QRotationSensor m_sensor;
    5951};
    6052
  • trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp

    r102592 r102755  
    3535#include "ContextMenuController.h"
    3636#include "DeviceOrientation.h"
    37 #include "DeviceOrientationClientMockQt.h"
     37#include "DeviceOrientationClientMock.h"
     38#include "DeviceOrientationController.h"
    3839#include "DocumentLoader.h"
    3940#include "Editor.h"
     
    113114#endif
    114115
     116#if ENABLE(DEVICE_ORIENTATION)
     117DeviceOrientationClientMock* toDeviceOrientationClientMock(DeviceOrientationClient* client)
     118{
     119    ASSERT(QWebPagePrivate::drtRun);
     120    return static_cast<DeviceOrientationClientMock*>(client);
     121}
     122#endif
     123
    115124QDRTNode::QDRTNode()
    116125    : m_node(0)
     
    839848}
    840849
    841 void DumpRenderTreeSupportQt::activeMockDeviceOrientationClient(bool b)
     850void DumpRenderTreeSupportQt::setMockDeviceOrientation(QWebPage* page, bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma)
    842851{
    843852#if ENABLE(DEVICE_ORIENTATION)
    844     DeviceOrientationClientMockQt::mockIsActive = b;
    845 #endif
    846 }
    847 
    848 void DumpRenderTreeSupportQt::removeMockDeviceOrientation()
    849 {
    850 #if ENABLE(DEVICE_ORIENTATION)
    851     DeviceOrientationClientMockQt* client = DeviceOrientationClientMockQt::client();
    852     delete client;
    853 #endif
    854 }
    855 
    856 void DumpRenderTreeSupportQt::setMockDeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma)
    857 {
    858 #if ENABLE(DEVICE_ORIENTATION)
    859     DeviceOrientationClientMockQt::client()->setOrientation(canProvideAlpha, alpha, canProvideBeta, beta, canProvideGamma, gamma);
     853    Page* corePage = QWebPagePrivate::core(page);
     854    DeviceOrientationClientMock* mockClient = toDeviceOrientationClientMock(corePage->deviceOrientationController()->client());
     855    mockClient->setOrientation(DeviceOrientation::create(canProvideAlpha, alpha, canProvideBeta, beta, canProvideGamma, gamma));
    860856#endif
    861857}
  • trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h

    r102592 r102755  
    157157    static void resetOriginAccessWhiteLists();
    158158
    159     static void activeMockDeviceOrientationClient(bool b);
    160     static void removeMockDeviceOrientation();
    161     static void setMockDeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma);
     159    static void setMockDeviceOrientation(QWebPage*, bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma);
    162160
    163161    static void resetGeolocationMock(QWebPage*);
  • trunk/Source/api.pri

    r102679 r102755  
    138138
    139139contains(DEFINES, ENABLE_DEVICE_ORIENTATION=1) {
     140    haveQt(5): QT += sensors
     141
    140142    HEADERS += \
    141143        $$PWD/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.h \
    142144        $$PWD/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.h \
    143145        $$PWD/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.h \
    144         $$PWD/WebKit/qt/WebCoreSupport/DeviceOrientationClientMockQt.h \
    145146        $$PWD/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.h
    146147
     
    149150        $$PWD/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.cpp \
    150151        $$PWD/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.cpp \
    151         $$PWD/WebKit/qt/WebCoreSupport/DeviceOrientationClientMockQt.cpp \
    152152        $$PWD/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.cpp
    153153}
  • trunk/Tools/ChangeLog

    r102748 r102755  
     12011-12-14  Alexander Færøy  <alexander.faeroy@nokia.com>
     2
     3        [Qt] DeviceOrientationClientMockQt should be removed in favor of DeviceOrientationClientMock
     4        https://bugs.webkit.org/show_bug.cgi?id=74417
     5
     6        Reviewed by Simon Hausmann.
     7
     8        Based on original patch by Kenneth Christiansen.
     9
     10        Already covered by current tests.
     11
     12        * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
     13        (WebCore::DumpRenderTree::DumpRenderTree):
     14        (WebCore::DumpRenderTree::~DumpRenderTree):
     15        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
     16        (LayoutTestController::setMockDeviceOrientation):
     17
    1182011-12-03  Philippe Normand  <pnormand@igalia.com>
    219
  • trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp

    r100763 r102755  
    405405    DumpRenderTreeSupportQt::setDumpRenderTreeModeEnabled(true);
    406406    DumpRenderTreeSupportQt::overwritePluginDirectories();
    407     DumpRenderTreeSupportQt::activeMockDeviceOrientationClient(true);
    408407    QWebSettings::enablePersistentStorage(m_persistentStoragePath);
    409408
     
    486485    delete m_mainView;
    487486    delete m_stdin;
    488     DumpRenderTreeSupportQt::removeMockDeviceOrientation();
    489487}
    490488
  • trunk/Tools/DumpRenderTree/qt/LayoutTestControllerQt.cpp

    r102592 r102755  
    849849void LayoutTestController::setMockDeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma)
    850850{
    851     DumpRenderTreeSupportQt::setMockDeviceOrientation(canProvideAlpha, alpha, canProvideBeta, beta, canProvideGamma, gamma);
     851    QList<WebCore::WebPage*> pages = m_drt->getAllPages();
     852    foreach (WebCore::WebPage* page, pages)
     853        DumpRenderTreeSupportQt::setMockDeviceOrientation(page, canProvideAlpha, alpha, canProvideBeta, beta, canProvideGamma, gamma);
    852854}
    853855
Note: See TracChangeset for help on using the changeset viewer.