[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da
diegohcg at webkit.org
diegohcg at webkit.org
Wed Dec 22 18:28:45 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit e563d3adeb1de534a67e8e8ef0e686a386f5e9a6
Author: diegohcg at webkit.org <diegohcg at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Dec 11 18:49:09 2010 +0000
[Qt] Mock DeviceOrientation client for DRT
https://bugs.webkit.org/show_bug.cgi?id=47490
Reviewed by Kenneth Rohde Christiansen.
WebCore:
* WebCore.pro:
WebKit/qt:
* WebCoreSupport/DeviceOrientationClientMockQt.cpp: Added.
(WebCore::DeviceOrientationClientMockQt::client):
(WebCore::DeviceOrientationClientMockQt::DeviceOrientationClientMockQt):
(WebCore::DeviceOrientationClientMockQt::~DeviceOrientationClientMockQt):
(WebCore::DeviceOrientationClientMockQt::setController):
(WebCore::DeviceOrientationClientMockQt::startUpdating):
(WebCore::DeviceOrientationClientMockQt::stopUpdating):
(WebCore::DeviceOrientationClientMockQt::lastOrientation):
(WebCore::DeviceOrientationClientMockQt::deviceOrientationControllerDestroyed):
(WebCore::DeviceOrientationClientMockQt::setOrientation):
* WebCoreSupport/DeviceOrientationClientMockQt.h: Added.
* WebCoreSupport/DeviceOrientationClientQt.cpp:
* WebCoreSupport/DeviceOrientationProviderQt.cpp:
(WebCore::DeviceOrientationProviderQt::DeviceOrientationProviderQt):
(WebCore::DeviceOrientationProviderQt::~DeviceOrientationProviderQt):
(WebCore::DeviceOrientationProviderQt::changeDeviceOrientation):
* WebCoreSupport/DeviceOrientationProviderQt.h:
* WebCoreSupport/DumpRenderTreeSupportQt.cpp:
(DumpRenderTreeSupportQt::activeMockDeviceOrientationClient):
(DumpRenderTreeSupportQt::removeMockDeviceOrientation):
(DumpRenderTreeSupportQt::setMockDeviceOrientation):
* WebCoreSupport/DumpRenderTreeSupportQt.h:
WebKitTools:
* DumpRenderTree/qt/DumpRenderTreeQt.cpp:
(WebCore::DumpRenderTree::DumpRenderTree):
(WebCore::DumpRenderTree::~DumpRenderTree):
* DumpRenderTree/qt/LayoutTestControllerQt.cpp:
(LayoutTestController::setMockDeviceOrientation):
LayoutTests:
* platform/qt/Skipped:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73862 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index bd1b8b8..66eea47 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,12 @@
+2010-10-11 Diego Gonzalez <diegohcg at webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Mock DeviceOrientation client for DRT
+ https://bugs.webkit.org/show_bug.cgi?id=47490
+
+ * platform/qt/Skipped:
+
2010-12-11 Pavel Feldman <pfeldman at chromium.org>
Not reviewed. Update chromium test expectations.
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index e36387c..04bec9e 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -75,15 +75,6 @@ svg/webarchive
# This test is for clients that choose to make the missing plugin indicator a button
plugins/clicking-missing-plugin-fires-delegate.html
-# =========================================================================== #
-# Feature not supported... yet
-# =========================================================================== #
-
-# This port doesn't support DeviceMotion or DeviceOrientation.
-fast/dom/DeviceMotion
-fast/dom/DeviceOrientation
-fast/dom/Window/window-properties-device-orientation.html
-
# IndexedDB is not yet enabled.
storage/indexeddb
@@ -3054,6 +3045,7 @@ fast/dom/row-inner-text.html
fast/dom/setPrimitiveValue.html
fast/dom/stripNullFromTextNodes.html
fast/dom/wrapper-classes.html
+fast/dom/Window/window-properties-device-orientation.html
fast/dynamic/002.html
fast/dynamic/004.html
fast/dynamic/006.html
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 7bf42b3..ca6a282 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,12 @@
+2010-10-11 Diego Gonzalez <diegohcg at webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Mock DeviceOrientation client for DRT
+ https://bugs.webkit.org/show_bug.cgi?id=47490
+
+ * WebCore.pro:
+
2010-12-11 Joone Hur <joone at kldp.org>
Reviewed by Alexey Proskuryakov.
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index e51e28b..7e97904 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -3418,12 +3418,14 @@ contains(DEFINES, ENABLE_DEVICE_ORIENTATION=1) {
../WebKit/qt/WebCoreSupport/DeviceMotionClientQt.h \
../WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.h \
../WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.h \
+ ../WebKit/qt/WebCoreSupport/DeviceOrientationClientMockQt.h \
../WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.h \
bindings/generic/RuntimeEnabledFeatures.h
SOURCES += \
../WebKit/qt/WebCoreSupport/DeviceMotionClientQt.cpp \
../WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.cpp \
../WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.cpp \
+ ../WebKit/qt/WebCoreSupport/DeviceOrientationClientMockQt.cpp \
../WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.cpp \
bindings/generic/RuntimeEnabledFeatures.cpp
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 964c484..ada1ee4 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,33 @@
+2010-10-11 Diego Gonzalez <diegohcg at webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Mock DeviceOrientation client for DRT
+ https://bugs.webkit.org/show_bug.cgi?id=47490
+
+ * WebCoreSupport/DeviceOrientationClientMockQt.cpp: Added.
+ (WebCore::DeviceOrientationClientMockQt::client):
+ (WebCore::DeviceOrientationClientMockQt::DeviceOrientationClientMockQt):
+ (WebCore::DeviceOrientationClientMockQt::~DeviceOrientationClientMockQt):
+ (WebCore::DeviceOrientationClientMockQt::setController):
+ (WebCore::DeviceOrientationClientMockQt::startUpdating):
+ (WebCore::DeviceOrientationClientMockQt::stopUpdating):
+ (WebCore::DeviceOrientationClientMockQt::lastOrientation):
+ (WebCore::DeviceOrientationClientMockQt::deviceOrientationControllerDestroyed):
+ (WebCore::DeviceOrientationClientMockQt::setOrientation):
+ * WebCoreSupport/DeviceOrientationClientMockQt.h: Added.
+ * WebCoreSupport/DeviceOrientationClientQt.cpp:
+ * WebCoreSupport/DeviceOrientationProviderQt.cpp:
+ (WebCore::DeviceOrientationProviderQt::DeviceOrientationProviderQt):
+ (WebCore::DeviceOrientationProviderQt::~DeviceOrientationProviderQt):
+ (WebCore::DeviceOrientationProviderQt::changeDeviceOrientation):
+ * WebCoreSupport/DeviceOrientationProviderQt.h:
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::activeMockDeviceOrientationClient):
+ (DumpRenderTreeSupportQt::removeMockDeviceOrientation):
+ (DumpRenderTreeSupportQt::setMockDeviceOrientation):
+ * WebCoreSupport/DumpRenderTreeSupportQt.h:
+
2010-12-10 Krithigassree Sambamurthy <krithigassree.sambamurthy at nokia.com>
Reviewed by Joseph Pecoraro.
diff --git a/WebKit/qt/WebCoreSupport/DeviceOrientationClientMockQt.cpp b/WebKit/qt/WebCoreSupport/DeviceOrientationClientMockQt.cpp
new file mode 100644
index 0000000..81ddaa2
--- /dev/null
+++ b/WebKit/qt/WebCoreSupport/DeviceOrientationClientMockQt.cpp
@@ -0,0 +1,88 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+#include "config.h"
+#include "DeviceOrientationClientMockQt.h"
+
+#include "DeviceOrientation.h"
+#include "DeviceOrientationClientMock.h"
+#include "DeviceOrientationController.h"
+
+namespace WebCore {
+
+bool DeviceOrientationClientMockQt::mockIsActive = false;
+
+DeviceOrientationClientMockQt* DeviceOrientationClientMockQt::client()
+{
+ static DeviceOrientationClientMockQt* client = 0;
+ if (!client)
+ client = new DeviceOrientationClientMockQt;
+
+ return client;
+}
+
+DeviceOrientationClientMockQt::DeviceOrientationClientMockQt()
+ : m_clientMock(new DeviceOrientationClientMock())
+{
+ m_orientation = DeviceOrientation::create();
+}
+
+DeviceOrientationClientMockQt::~DeviceOrientationClientMockQt()
+{
+ delete m_clientMock;
+}
+
+void DeviceOrientationClientMockQt::setController(DeviceOrientationController* controller)
+{
+ m_clientMock->setController(m_controller);
+}
+
+void DeviceOrientationClientMockQt::startUpdating()
+{
+ m_clientMock->startUpdating();
+}
+
+void DeviceOrientationClientMockQt::stopUpdating()
+{
+ m_clientMock->stopUpdating();
+}
+
+DeviceOrientation* DeviceOrientationClientMockQt::lastOrientation() const
+{
+ return m_orientation.get();
+}
+
+void DeviceOrientationClientMockQt::deviceOrientationControllerDestroyed()
+{
+ delete this;
+}
+
+void DeviceOrientationClientMockQt::setOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma)
+{
+ m_orientation = DeviceOrientation::create(canProvideAlpha, alpha,
+ canProvideBeta, beta,
+ canProvideGamma, gamma);
+ m_clientMock->setOrientation(m_orientation);
+
+ emit mockOrientationChanged(m_orientation.get());
+}
+
+} // namespace WebCore
+
+#include "moc_DeviceOrientationClientMockQt.cpp"
diff --git a/WebKit/qt/WebCoreSupport/DeviceOrientationClientMockQt.h b/WebKit/qt/WebCoreSupport/DeviceOrientationClientMockQt.h
new file mode 100644
index 0000000..cc5913d
--- /dev/null
+++ b/WebKit/qt/WebCoreSupport/DeviceOrientationClientMockQt.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+#ifndef DeviceOrientationClientMockQt_h
+#define DeviceOrientationClientMockQt_h
+
+#include "DeviceOrientationClient.h"
+#include "RefPtr.h"
+
+#include <QObject>
+
+namespace WebCore {
+
+class DeviceOrientation;
+class DeviceOrientationClientMock;
+class DeviceOrientationController;
+
+class DeviceOrientationClientMockQt : public QObject, public DeviceOrientationClient {
+ Q_OBJECT
+public:
+ static DeviceOrientationClientMockQt* client();
+ virtual ~DeviceOrientationClientMockQt();
+
+ virtual void setController(DeviceOrientationController*);
+ virtual void startUpdating();
+ virtual void stopUpdating();
+ virtual DeviceOrientation* lastOrientation() const;
+ virtual void deviceOrientationControllerDestroyed();
+ void setOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma);
+ static bool mockIsActive;
+
+Q_SIGNALS:
+ void mockOrientationChanged(DeviceOrientation*);
+
+private:
+ DeviceOrientationClientMockQt();
+
+ DeviceOrientationClientMock* m_clientMock;
+ DeviceOrientationController* m_controller;
+ RefPtr<DeviceOrientation> m_orientation;
+};
+
+} // namespace WebCore
+
+#endif // DeviceOrientationClientMockQt_h
diff --git a/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.cpp b/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.cpp
index 1d0c6d1..01cbe73 100644
--- a/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.cpp
@@ -20,6 +20,7 @@
#include "config.h"
#include "DeviceOrientationClientQt.h"
+#include "DeviceOrientationClientMockQt.h"
#include "DeviceOrientationController.h"
#include "DeviceOrientationProviderQt.h"
#include "qwebpage.h"
diff --git a/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.cpp b/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.cpp
index 051eba0..a31930d 100644
--- a/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.cpp
+++ b/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.cpp
@@ -20,16 +20,22 @@
#include "config.h"
#include "DeviceOrientationProviderQt.h"
+#include "DeviceOrientationClientMockQt.h"
+
namespace WebCore {
DeviceOrientationProviderQt::DeviceOrientationProviderQt()
{
m_rotation.addFilter(this);
m_orientation = DeviceOrientation::create();
+
+ if (DeviceOrientationClientMockQt::mockIsActive)
+ activeClientMock();
}
DeviceOrientationProviderQt::~DeviceOrientationProviderQt()
{
+ disconnect();
}
void DeviceOrientationProviderQt::start()
@@ -63,6 +69,16 @@ bool DeviceOrientationProviderQt::filter(QRotationReading* reading)
return false;
}
+void DeviceOrientationProviderQt::changeDeviceOrientation(DeviceOrientation* orientation)
+{
+ m_orientation = orientation;
+}
+
+void DeviceOrientationProviderQt::activeClientMock()
+{
+ connect(DeviceOrientationClientMockQt::client(), SIGNAL(mockOrientationChanged(DeviceOrientation*)), SLOT(changeDeviceOrientation(DeviceOrientation*)));
+}
+
}
#include "moc_DeviceOrientationProviderQt.cpp"
diff --git a/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.h b/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.h
index 86c224e..e87937e 100644
--- a/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.h
+++ b/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.h
@@ -48,7 +48,12 @@ public:
Q_SIGNALS:
void deviceOrientationChanged(DeviceOrientation*);
+public Q_SLOTS:
+ void changeDeviceOrientation(DeviceOrientation*);
+
private:
+ void activeClientMock();
+
RefPtr<DeviceOrientation> m_orientation;
QRotationSensor m_rotation;
};
diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
index f18894d..754b20a 100644
--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
@@ -29,6 +29,8 @@
#include "ContextMenu.h"
#include "ContextMenuClientQt.h"
#include "ContextMenuController.h"
+#include "DeviceOrientation.h"
+#include "DeviceOrientationClientMockQt.h"
#include "Editor.h"
#include "EditorClientQt.h"
#include "Element.h"
@@ -693,6 +695,28 @@ QString DumpRenderTreeSupportQt::viewportAsText(QWebPage* page, const QSize& ava
return res;
}
+void DumpRenderTreeSupportQt::activeMockDeviceOrientationClient(bool b)
+{
+#if ENABLE(DEVICE_ORIENTATION)
+ DeviceOrientationClientMockQt::mockIsActive = b;
+#endif
+}
+
+void DumpRenderTreeSupportQt::removeMockDeviceOrientation()
+{
+#if ENABLE(DEVICE_ORIENTATION)
+ DeviceOrientationClientMockQt* client = DeviceOrientationClientMockQt::client();
+ delete client;
+#endif
+}
+
+void DumpRenderTreeSupportQt::setMockDeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma)
+{
+#if ENABLE(DEVICE_ORIENTATION)
+ DeviceOrientationClientMockQt::client()->setOrientation(canProvideAlpha, alpha, canProvideBeta, beta, canProvideGamma, gamma);
+#endif
+}
+
void DumpRenderTreeSupportQt::setMockGeolocationPosition(double latitude, double longitude, double accuracy)
{
#if ENABLE(GEOLOCATION)
diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
index 184d822..e08d962 100644
--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
@@ -94,6 +94,10 @@ public:
static void removeWhiteListAccessFromOrigin(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains);
static void resetOriginAccessWhiteLists();
+ static void activeMockDeviceOrientationClient(bool b);
+ static void removeMockDeviceOrientation();
+ static void setMockDeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma);
+
static void setMockGeolocationPosition(double latitude, double longitude, double accuracy);
static void setMockGeolocationError(int errorCode, const QString& message);
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 7ee5666..bf11a01 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,16 @@
+2010-10-11 Diego Gonzalez <diegohcg at webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Mock DeviceOrientation client for DRT
+ https://bugs.webkit.org/show_bug.cgi?id=47490
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::~DumpRenderTree):
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ (LayoutTestController::setMockDeviceOrientation):
+
2010-12-11 Philippe Normand <pnormand at igalia.com>
Reviewed by Gustavo Noronha Silva.
diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
index c287152..4f87472 100644
--- a/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
+++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
@@ -420,7 +420,7 @@ DumpRenderTree::DumpRenderTree()
setGraphicsBased(true);
DumpRenderTreeSupportQt::overwritePluginDirectories();
-
+ DumpRenderTreeSupportQt::activeMockDeviceOrientationClient(true);
QWebSettings::enablePersistentStorage(m_persistentStoragePath);
m_networkAccessManager = new NetworkAccessManager(this);
@@ -496,6 +496,7 @@ DumpRenderTree::~DumpRenderTree()
{
delete m_mainView;
delete m_stdin;
+ DumpRenderTreeSupportQt::removeMockDeviceOrientation();
}
static void clearHistory(QWebPage* page)
diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
index 9e6efc0..2d00c3e 100644
--- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
+++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
@@ -750,8 +750,7 @@ void LayoutTestController::setEditingBehavior(const QString& editingBehavior)
void LayoutTestController::setMockDeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma)
{
- // FIXME: Implement for DeviceOrientation layout tests.
- // See https://bugs.webkit.org/show_bug.cgi?id=30335.
+ DumpRenderTreeSupportQt::setMockDeviceOrientation(canProvideAlpha, alpha, canProvideBeta, beta, canProvideGamma, gamma);
}
void LayoutTestController::setGeolocationPermission(bool allow)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list