Reviewed by Martin Robinson.
[GTK] Add DeviceOrientation feature
https://bugs.webkit.org/show_bug.cgi?id=63720
Add configure option to enable/disable DeviceOrientation feature.
* configure.ac:
2011-07-01 Joone Hur <joone.hur@collabora.co.uk>
Reviewed by Martin Robinson.
[GTK] Add DeviceOrientation feature
https://bugs.webkit.org/show_bug.cgi?id=63720
Add DeviceMotionClientGtk.cpp and DeviceOrientationClientGtk.cpp to WebKitGtk+ build.
* GNUmakefile.am: Add DeviceMotionClientGtk.cpp, DeviceOrientationClientGtk.cpp.
2011-07-01 Joone Hur <joone.hur@collabora.co.uk>
Reviewed by Martin Robinson.
[GTK] Add DeviceOrientation feature
https://bugs.webkit.org/show_bug.cgi?id=63720
Add empty implementation of DeviceMotionClient and DeviceOrientationClient callback methods.
* GNUmakefile.am:
* WebCoreSupport/DeviceMotionClientGtk.cpp: Added.
(WebCore::DeviceMotionClientGtk::DeviceMotionClientGtk):
(WebCore::DeviceMotionClientGtk::~DeviceMotionClientGtk):
(WebCore::DeviceMotionClientGtk::deviceMotionControllerDestroyed):
(WebCore::DeviceMotionClientGtk::setController):
(WebCore::DeviceMotionClientGtk::startUpdating):
(WebCore::DeviceMotionClientGtk::stopUpdating):
(WebCore::DeviceMotionClientGtk::currentDeviceMotion):
* WebCoreSupport/DeviceMotionClientGtk.h: Added.
* WebCoreSupport/DeviceOrientationClientGtk.cpp: Added.
(WebCore::DeviceOrientationClientGtk::DeviceOrientationClientGtk):
(WebCore::DeviceOrientationClientGtk::~DeviceOrientationClientGtk):
(WebCore::DeviceOrientationClientGtk::deviceOrientationControllerDestroyed):
(WebCore::DeviceOrientationClientGtk::setController):
(WebCore::DeviceOrientationClientGtk::startUpdating):
(WebCore::DeviceOrientationClientGtk::stopUpdating):
(WebCore::DeviceOrientationClientGtk::lastOrientation):
* WebCoreSupport/DeviceOrientationClientGtk.h: Added.
* webkit/webkitwebview.cpp:
(webkit_web_view_init):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@90240
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-07-01 Joone Hur <joone.hur@collabora.co.uk>
+
+ Reviewed by Martin Robinson.
+
+ [GTK] Add DeviceOrientation feature
+ https://bugs.webkit.org/show_bug.cgi?id=63720
+
+ Add configure option to enable/disable DeviceOrientation feature.
+
+ * configure.ac:
+
2011-06-28 Joone Hur <joone.hur@collabora.co.uk>
Reviewed by Martin Robinson.
+2011-07-01 Joone Hur <joone.hur@collabora.co.uk>
+
+ Reviewed by Martin Robinson.
+
+ [GTK] Add DeviceOrientation feature
+ https://bugs.webkit.org/show_bug.cgi?id=63720
+
+ Add DeviceMotionClientGtk.cpp and DeviceOrientationClientGtk.cpp to WebKitGtk+ build.
+
+ * GNUmakefile.am: Add DeviceMotionClientGtk.cpp, DeviceOrientationClientGtk.cpp.
+
2011-07-01 Kentaro Hara <haraken@google.com>
Reviewed by Kent Tamura.
webcore_cppflags += -DENABLE_REGISTER_PROTOCOL_HANDLER=1
endif # END ENABLE_REGISTER_PROTOCOL_HANDLER
+# ---
+# DeviceOrientation support
+# ---
+if ENABLE_DEVICE_ORIENTATION
+FEATURE_DEFINES += ENABLE_DEVICE_ORIENTATION=1
+webcore_cppflags += -DENABLE_DEVICE_ORIENTATION=1
+endif # END ENABLE_DEVICE_ORIENTATION
+
DerivedSources/WebCore/CSSPropertyNames.cpp: DerivedSources/WebCore/CSSPropertyNames.h
DerivedSources/WebCore/CSSPropertyNames.h: $(WEBCORE_CSS_PROPERTY_NAMES) $(WebCore)/css/makeprop.pl
cat $(WEBCORE_CSS_PROPERTY_NAMES) > CSSPropertyNames.in
+2011-07-01 Joone Hur <joone.hur@collabora.co.uk>
+
+ Reviewed by Martin Robinson.
+
+ [GTK] Add DeviceOrientation feature
+ https://bugs.webkit.org/show_bug.cgi?id=63720
+
+ Add empty implementation of DeviceMotionClient and DeviceOrientationClient callback methods.
+
+ * GNUmakefile.am:
+ * WebCoreSupport/DeviceMotionClientGtk.cpp: Added.
+ (WebCore::DeviceMotionClientGtk::DeviceMotionClientGtk):
+ (WebCore::DeviceMotionClientGtk::~DeviceMotionClientGtk):
+ (WebCore::DeviceMotionClientGtk::deviceMotionControllerDestroyed):
+ (WebCore::DeviceMotionClientGtk::setController):
+ (WebCore::DeviceMotionClientGtk::startUpdating):
+ (WebCore::DeviceMotionClientGtk::stopUpdating):
+ (WebCore::DeviceMotionClientGtk::currentDeviceMotion):
+ * WebCoreSupport/DeviceMotionClientGtk.h: Added.
+ * WebCoreSupport/DeviceOrientationClientGtk.cpp: Added.
+ (WebCore::DeviceOrientationClientGtk::DeviceOrientationClientGtk):
+ (WebCore::DeviceOrientationClientGtk::~DeviceOrientationClientGtk):
+ (WebCore::DeviceOrientationClientGtk::deviceOrientationControllerDestroyed):
+ (WebCore::DeviceOrientationClientGtk::setController):
+ (WebCore::DeviceOrientationClientGtk::startUpdating):
+ (WebCore::DeviceOrientationClientGtk::stopUpdating):
+ (WebCore::DeviceOrientationClientGtk::lastOrientation):
+ * WebCoreSupport/DeviceOrientationClientGtk.h: Added.
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_init):
+
2011-06-28 Joone Hur <joone.hur@collabora.co.uk>
Reviewed by Martin Robinson.
Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h \
Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp \
Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h \
+ Source/WebKit/gtk/WebCoreSupport/DeviceMotionClientGtk.cpp \
+ Source/WebKit/gtk/WebCoreSupport/DeviceMotionClientGtk.h \
+ Source/WebKit/gtk/WebCoreSupport/DeviceOrientationClientGtk.cpp \
+ Source/WebKit/gtk/WebCoreSupport/DeviceOrientationClientGtk.h \
Source/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp \
Source/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.h \
Source/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp \
--- /dev/null
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2011 Collabora Ltd.
+ *
+ * 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"
+
+#if ENABLE(DEVICE_ORIENTATION)
+#include "DeviceMotionClientGtk.h"
+
+#include "NotImplemented.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+DeviceMotionClientGtk::DeviceMotionClientGtk()
+{
+}
+
+DeviceMotionClientGtk::~DeviceMotionClientGtk()
+{
+}
+
+void DeviceMotionClientGtk::deviceMotionControllerDestroyed()
+{
+ delete this;
+}
+
+void DeviceMotionClientGtk::setController(DeviceMotionController* controller)
+{
+ m_controller = controller;
+}
+
+void DeviceMotionClientGtk::startUpdating()
+{
+ notImplemented();
+}
+
+void DeviceMotionClientGtk::stopUpdating()
+{
+ notImplemented();
+}
+
+DeviceMotionData* DeviceMotionClientGtk::currentDeviceMotion() const
+{
+ notImplemented();
+ return 0;
+}
+
+} // namespece WebKit
+
+#endif
--- /dev/null
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2011 Collabora Ltd.
+ *
+ * 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 DeviceMotionClientGtk_h
+#define DeviceMotionClientGtk_h
+
+#include "DeviceMotionClient.h"
+#include "DeviceMotionData.h"
+
+namespace WebKit {
+
+class DeviceMotionClientGtk : public WebCore::DeviceMotionClient {
+public:
+ DeviceMotionClientGtk();
+ virtual ~DeviceMotionClientGtk();
+
+ virtual void setController(WebCore::DeviceMotionController*);
+ virtual void startUpdating();
+ virtual void stopUpdating();
+ virtual WebCore::DeviceMotionData* currentDeviceMotion() const;
+ virtual void deviceMotionControllerDestroyed();
+
+private:
+ WebCore::DeviceMotionController* m_controller;
+};
+
+} // namespece WebKit
+
+#endif // DeviceMotionClientGtk_h
--- /dev/null
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2011 Collabora Ltd.
+ *
+ * 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"
+
+#if ENABLE(DEVICE_ORIENTATION)
+#include "DeviceOrientationClientGtk.h"
+
+#include "NotImplemented.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+DeviceOrientationClientGtk::DeviceOrientationClientGtk()
+{
+}
+
+DeviceOrientationClientGtk::~DeviceOrientationClientGtk()
+{
+}
+
+void DeviceOrientationClientGtk::deviceOrientationControllerDestroyed()
+{
+ delete this;
+}
+
+void DeviceOrientationClientGtk::setController(DeviceOrientationController* controller)
+{
+ m_controller = controller;
+}
+
+void DeviceOrientationClientGtk::startUpdating()
+{
+ notImplemented();
+}
+
+void DeviceOrientationClientGtk::stopUpdating()
+{
+ notImplemented();
+}
+
+DeviceOrientation* DeviceOrientationClientGtk::lastOrientation() const
+{
+ notImplemented();
+ return 0;
+}
+
+} // namespace WebKit
+#endif
--- /dev/null
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2011 Collabora Ltd.
+ *
+ * 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 DeviceOrientationClientGtk_h
+#define DeviceOrientationClientGtk_h
+
+#include "DeviceOrientation.h"
+#include "DeviceOrientationClient.h"
+
+namespace WebKit {
+
+class DeviceOrientationClientGtk : public WebCore::DeviceOrientationClient {
+public:
+ DeviceOrientationClientGtk();
+ virtual ~DeviceOrientationClientGtk();
+
+ virtual void setController(WebCore::DeviceOrientationController*);
+ virtual void startUpdating();
+ virtual void stopUpdating();
+ virtual WebCore::DeviceOrientation* lastOrientation() const;
+ virtual void deviceOrientationControllerDestroyed();
+
+private:
+ WebCore::DeviceOrientationController* m_controller;
+};
+
+} // namespace WebKit
+
+#endif // DeviceOrientationClientGtk_h
#include <wtf/gobject/GOwnPtr.h>
#include <wtf/text/CString.h>
+#if ENABLE(DEVICE_ORIENTATION)
+#include "DeviceMotionClientGtk.h"
+#include "DeviceOrientationClientGtk.h"
+#endif
+
/**
* SECTION:webkitwebview
* @short_description: The central class of the WebKitGTK+ API
pageClients.editorClient = new WebKit::EditorClient(webView);
pageClients.dragClient = new WebKit::DragClient(webView);
pageClients.inspectorClient = new WebKit::InspectorClient(webView);
+
+#if ENABLE(DEVICE_ORIENTATION)
+ pageClients.deviceMotionClient = static_cast<WebCore::DeviceMotionClient*>(new DeviceMotionClientGtk);
+ pageClients.deviceOrientationClient = static_cast<WebCore::DeviceOrientationClient*>(new DeviceOrientationClientGtk);
+#endif
+
priv->corePage = new Page(pageClients);
// Pages within a same session need to be linked together otherwise some functionalities such
[],[enable_register_protocol_handler="no"])
AC_MSG_RESULT([$enable_register_protocol_handler])
+# check whether to enable DeviceOrientation support
+AC_MSG_CHECKING([whether to enable DeviceOrientation])
+AC_ARG_ENABLE(device_orientation,
+ AC_HELP_STRING([--enable-device-orientation],
+ [enable support for DeviceOrientation (experimental and incomplete) [default=no]]),
+ [],[enable_device_orientation="no"])
+AC_MSG_RESULT([$enable_device_orientation])
+
G_IR_SCANNER=
G_IR_COMPILER=
G_IR_GENERATE=
AM_CONDITIONAL([ENABLE_ANIMATION_API],[test "$enable_animation_api" = "yes"])
AM_CONDITIONAL([ENABLE_TOUCH_ICON_LOADING],[test "$enable_touch_icon_loading" = "yes"])
AM_CONDITIONAL([ENABLE_REGISTER_PROTOCOL_HANDLER],[test "$enable_register_protocol_handler" = "yes"])
+AM_CONDITIONAL([ENABLE_DEVICE_ORIENTATION],[test "$enable_device_orientation" = "yes"])
# Gtk conditionals
AM_CONDITIONAL([ENABLE_INTROSPECTION],[test "$enable_introspection" = "yes"])
3D Rendering : $enable_3d_rendering
WebGL : $enable_webgl
Blob support : $enable_blob
+ DeviceOrientation support : $enable_device_orientation
Directory upload : $enable_directory_upload
Fast Mobile Scrolling : $enable_fast_mobile_scrolling
JIT compilation : $enable_jit