[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

diegohcg at webkit.org diegohcg at webkit.org
Wed Dec 22 14:04:27 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit b3a7f3785d8d13f7a4d9929909ee30af5c004375
Author: diegohcg at webkit.org <diegohcg at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Oct 2 21:16:10 2010 +0000

    [Qt] Provide Qt support for DeviceMotion/Orientation clients
    https://bugs.webkit.org/show_bug.cgi?id=47051
    
    Reviewed by Kenneth Rohde Christiansen.
    
    WebCore:
    
    Add Qt DeviceMotion/Orientation dummy clients in build system.
    
    * WebCore.pro:
    
    WebKit/qt:
    
    Dummy implementation of DeviceMotion/Orientation client classes
    to make possible to hook up motion/orientation data
    in further implementations.
    
    * Api/qwebpage.cpp:
    (QWebPagePrivate::QWebPagePrivate):
    * WebCoreSupport/DeviceMotionClientQt.cpp: Added.
    (WebCore::DeviceMotionClientQt::DeviceMotionClientQt):
    (WebCore::DeviceMotionClientQt::setController):
    (WebCore::DeviceMotionClientQt::startUpdating):
    (WebCore::DeviceMotionClientQt::stopUpdating):
    (WebCore::DeviceMotionClientQt::currentDeviceMotion):
    (WebCore::DeviceMotionClientQt::deviceMotionControllerDestroyed):
    * WebCoreSupport/DeviceMotionClientQt.h: Added.
    (WebCore::DeviceMotionClientQt::~DeviceMotionClientQt):
    * WebCoreSupport/DeviceOrientationClientQt.cpp: Added.
    (WebCore::DeviceOrientationClientQt::DeviceOrientationClientQt):
    (WebCore::DeviceOrientationClientQt::setController):
    (WebCore::DeviceOrientationClientQt::startUpdating):
    (WebCore::DeviceOrientationClientQt::stopUpdating):
    (WebCore::DeviceOrientationClientQt::lastOrientation):
    (WebCore::DeviceOrientationClientQt::deviceOrientationControllerDestroyed):
    * WebCoreSupport/DeviceOrientationClientQt.h: Added.
    (WebCore::DeviceOrientationClientQt::~DeviceOrientationClientQt):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68978 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index ce4e91b..118093f 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,14 @@
+2010-10-02  Diego Gonzalez  <diegohcg at webkit.org>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [Qt] Provide Qt support for DeviceMotion/Orientation clients
+        https://bugs.webkit.org/show_bug.cgi?id=47051
+
+        Add Qt DeviceMotion/Orientation dummy clients in build system.
+
+        * WebCore.pro:
+
 2010-10-01  Nikolas Zimmermann  <nzimmermann at rim.com>
 
         Reviewed by Dirk Schulze.
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index 2f31ffb..a8452e4 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -3266,6 +3266,17 @@ contains(DEFINES, ENABLE_GEOLOCATION=1) {
     }
 }
 
+contains(DEFINES, ENABLE_DEVICE_ORIENTATION=1) {
+    HEADERS += \
+        ../WebKit/qt/WebCoreSupport/DeviceMotionClientQt.h \
+        ../WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.h \
+        bindings/generic/RuntimeEnabledFeatures.h
+    SOURCES += \
+        ../WebKit/qt/WebCoreSupport/DeviceMotionClientQt.cpp \
+        ../WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.cpp \
+        bindings/generic/RuntimeEnabledFeatures.cpp
+}
+
 contains(DEFINES, ENABLE_SVG=1) {
     !v8 {
         SOURCES += \
diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp
index 932103d..1439468 100644
--- a/WebKit/qt/Api/qwebpage.cpp
+++ b/WebKit/qt/Api/qwebpage.cpp
@@ -45,6 +45,8 @@
 #include "ChromeClientQt.h"
 #include "ContextMenu.h"
 #include "ContextMenuClientQt.h"
+#include "DeviceMotionClientQt.h"
+#include "DeviceOrientationClientQt.h"
 #include "DocumentLoader.h"
 #include "DragClientQt.h"
 #include "DragController.h"
@@ -298,6 +300,10 @@ QWebPagePrivate::QWebPagePrivate(QWebPage *qq)
     pageClients.editorClient = new EditorClientQt(q);
     pageClients.dragClient = new DragClientQt(q);
     pageClients.inspectorClient = new InspectorClientQt(q);
+#if ENABLE(DEVICE_ORIENTATION)
+    pageClients.deviceOrientationClient = new DeviceOrientationClientQt(q);
+    pageClients.deviceMotionClient = new DeviceMotionClientQt(q);
+#endif
     page = new Page(pageClients);
 
     settings = new QWebSettings(page->settings());
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 01db1eb..b7ce89c 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,35 @@
+2010-10-02  Diego Gonzalez  <diegohcg at webkit.org>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [Qt] Provide Qt support for DeviceMotion/Orientation clients
+        https://bugs.webkit.org/show_bug.cgi?id=47051
+
+        Dummy implementation of DeviceMotion/Orientation client classes
+        to make possible to hook up motion/orientation data
+        in further implementations.
+
+        * Api/qwebpage.cpp:
+        (QWebPagePrivate::QWebPagePrivate):
+        * WebCoreSupport/DeviceMotionClientQt.cpp: Added.
+        (WebCore::DeviceMotionClientQt::DeviceMotionClientQt):
+        (WebCore::DeviceMotionClientQt::setController):
+        (WebCore::DeviceMotionClientQt::startUpdating):
+        (WebCore::DeviceMotionClientQt::stopUpdating):
+        (WebCore::DeviceMotionClientQt::currentDeviceMotion):
+        (WebCore::DeviceMotionClientQt::deviceMotionControllerDestroyed):
+        * WebCoreSupport/DeviceMotionClientQt.h: Added.
+        (WebCore::DeviceMotionClientQt::~DeviceMotionClientQt):
+        * WebCoreSupport/DeviceOrientationClientQt.cpp: Added.
+        (WebCore::DeviceOrientationClientQt::DeviceOrientationClientQt):
+        (WebCore::DeviceOrientationClientQt::setController):
+        (WebCore::DeviceOrientationClientQt::startUpdating):
+        (WebCore::DeviceOrientationClientQt::stopUpdating):
+        (WebCore::DeviceOrientationClientQt::lastOrientation):
+        (WebCore::DeviceOrientationClientQt::deviceOrientationControllerDestroyed):
+        * WebCoreSupport/DeviceOrientationClientQt.h: Added.
+        (WebCore::DeviceOrientationClientQt::~DeviceOrientationClientQt):
+
 2010-09-30  Robert Hogan  <robert at webkit.org>
 
         Reviewed by Andreas Kling.
diff --git a/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.cpp b/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.cpp
new file mode 100644
index 0000000..825da3e
--- /dev/null
+++ b/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.cpp
@@ -0,0 +1,60 @@
+/*
+ * 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 "DeviceMotionClientQt.h"
+
+#include "qwebpage.h"
+
+namespace WebCore {
+
+DeviceMotionClientQt::DeviceMotionClientQt(QWebPage* page)
+    : m_page(page)
+    , m_controller(0)
+{
+}
+
+void DeviceMotionClientQt::setController(DeviceMotionController* controller)
+{
+    m_controller = controller;
+}
+
+void DeviceMotionClientQt::startUpdating()
+{
+    // call start method from a motion provider.
+}
+
+void DeviceMotionClientQt::stopUpdating()
+{
+    // call stop method from a motion provider.
+}
+
+DeviceMotionData* DeviceMotionClientQt::currentDeviceMotion() const
+{
+    return 0;
+}
+
+void DeviceMotionClientQt::deviceMotionControllerDestroyed()
+{
+    delete this;
+}
+
+} // namespace WebCore
+
+#include "moc_DeviceMotionClientQt.cpp"
diff --git a/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.h b/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.h
new file mode 100644
index 0000000..29abe96
--- /dev/null
+++ b/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.h
@@ -0,0 +1,51 @@
+/*
+ * 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 DeviceMotionClientQt_h
+#define DeviceMotionClientQt_h
+
+#include "DeviceMotionClient.h"
+#include "DeviceMotionData.h"
+
+#include <QObject>
+
+class QWebPage;
+
+namespace WebCore {
+
+class DeviceMotionClientQt : public QObject, public DeviceMotionClient {
+    Q_OBJECT
+public:
+    DeviceMotionClientQt(QWebPage*);
+    virtual ~DeviceMotionClientQt() {}
+
+    virtual void setController(DeviceMotionController*);
+    virtual void startUpdating();
+    virtual void stopUpdating();
+    virtual DeviceMotionData* currentDeviceMotion() const;
+    virtual void deviceMotionControllerDestroyed();
+
+private:
+    QWebPage* m_page;
+    DeviceMotionController* m_controller;
+};
+
+} // namespece WebCore
+
+#endif // DeviceMotionClientQt_h
diff --git a/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.cpp b/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.cpp
new file mode 100644
index 0000000..88003da
--- /dev/null
+++ b/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.cpp
@@ -0,0 +1,60 @@
+/*
+ * 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 "DeviceOrientationClientQt.h"
+
+#include "qwebpage.h"
+
+namespace WebCore {
+
+DeviceOrientationClientQt::DeviceOrientationClientQt(QWebPage* page)
+    : m_page(page)
+    , m_controller(0)
+{
+}
+
+void DeviceOrientationClientQt::setController(DeviceOrientationController* controller)
+{
+    m_controller = controller;
+}
+
+void DeviceOrientationClientQt::startUpdating()
+{
+    // call start method from a orientation provider.
+}
+
+void DeviceOrientationClientQt::stopUpdating()
+{
+    // call stop method from a orientation provider.
+}
+
+DeviceOrientation* DeviceOrientationClientQt::lastOrientation() const
+{
+    return 0;
+}
+
+void DeviceOrientationClientQt::deviceOrientationControllerDestroyed()
+{
+    delete this;
+}
+
+} // namespace WebCore
+
+#include "moc_DeviceOrientationClientQt.cpp"
diff --git a/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.h b/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.h
new file mode 100644
index 0000000..c338ff5
--- /dev/null
+++ b/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.h
@@ -0,0 +1,51 @@
+/*
+ * 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 DeviceOrientationClientQt_h
+#define DeviceOrientationClientQt_h
+
+#include "DeviceOrientation.h"
+#include "DeviceOrientationClient.h"
+
+#include <QObject>
+
+class QWebPage;
+
+namespace WebCore {
+
+class DeviceOrientationClientQt : public QObject, public DeviceOrientationClient {
+    Q_OBJECT
+public:
+    DeviceOrientationClientQt(QWebPage*);
+    virtual ~DeviceOrientationClientQt() {}
+
+    virtual void setController(DeviceOrientationController*);
+    virtual void startUpdating();
+    virtual void stopUpdating();
+    virtual DeviceOrientation* lastOrientation() const;
+    virtual void deviceOrientationControllerDestroyed();
+
+private:
+    QWebPage* m_page;
+    DeviceOrientationController* m_controller;
+};
+
+} // namespace WebCore
+
+#endif // DeviceOrientationClientQt_h

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list