WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Rebased patch
bug-118358-20130909110744.patch (text/plain), 81.88 KB, created by
Luciano Wolf
on 2013-09-09 07:07:47 PDT
(
hide
)
Description:
Rebased patch
Filename:
MIME Type:
Creator:
Luciano Wolf
Created:
2013-09-09 07:07:47 PDT
Size:
81.88 KB
patch
obsolete
>Subversion Revision: 155345 >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index 9a3770565e44992f97b44b2f15b31aa69cca5ee7..d7811c50b7d921f2c6da8fa4088ba508a284810d 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,16 @@ >+2013-09-09 Luciano Wolf <luciano.wolf@openbossa.org> >+ >+ Nix upstreaming - Adding stubs and Nix specific platform files >+ https://bugs.webkit.org/show_bug.cgi?id=118358 >+ >+ Reviewed by Benjamin Poulain. >+ >+ Basically adding all files that have "Nix" in their names and >+ are related to WebCore module. >+ >+ * wtf/nix/FeatureDefinesNix.h: Added. >+ * wtf/nix/PlatformNix.h: Added. >+ > 2013-09-09 Julien Brianceau <jbriance@cisco.com> > > [Qt] Remove FastAllocBase.h from WTF.pro. >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 4c047dff00ddbc3d2f52df32f3c70373580e8dce..26fb6070792d8c4a9d5dfe19dfa6c939fd58eaa5 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,39 @@ >+2013-09-09 Luciano Wolf <luciano.wolf@openbossa.org> >+ >+ Nix upstreaming - Adding stubs and Nix specific platform files >+ https://bugs.webkit.org/show_bug.cgi?id=118358 >+ >+ Reviewed by Benjamin Poulain. >+ >+ Basically adding all files that have "Nix" in their names and >+ are related to WebCore module. >+ >+ No new tests. They will be uploaded on another patch during the >+ upstreaming process. >+ >+ * css/mediaControlsNix.css: Added. >+ * css/mediaControlsNixFullscreen.css: Added. >+ * page/nix/EventHandlerNix.cpp: Added. >+ * platform/graphics/egl/GLContextFromCurrentEGL.cpp: Added. >+ * platform/graphics/egl/GLContextFromCurrentEGL.h: Added. >+ * platform/graphics/gstreamer/PlatformVideoWindowNix.cpp: Added. >+ * platform/graphics/nix/IconNix.cpp: Added. >+ * platform/graphics/nix/ImageNix.cpp: Added. >+ * platform/nix/CursorNix.cpp: Added. >+ * platform/nix/DragDataNix.cpp: Added. >+ * platform/nix/DragImageNix.cpp: Added. >+ * platform/nix/GamepadsNix.cpp: Added. >+ * platform/nix/LanguageNix.cpp: Added. >+ * platform/nix/LocalizedStringsNix.cpp: Added. >+ * platform/nix/NixKeyboardUtilities.cpp: Added. >+ * platform/nix/NixKeyboardUtilities.h: Added. >+ * platform/nix/PasteboardNix.cpp: Added. >+ * platform/nix/PlatformKeyboardEventNix.cpp: Added. >+ * platform/nix/PlatformScreenNix.cpp: Added. >+ * platform/nix/SoundNix.cpp: Added. >+ * platform/nix/WidgetNix.cpp: Added. >+ * platform/text/nix/TextBreakIteratorInternalICUNix.cpp: Added. >+ > 2013-09-09 Antti Koivisto <antti@apple.com> > > Hide Document::renderer() >diff --git a/Source/WTF/wtf/nix/FeatureDefinesNix.h b/Source/WTF/wtf/nix/FeatureDefinesNix.h >new file mode 100644 >index 0000000000000000000000000000000000000000..3432ad0ed2614a412266bab63d94fc2beee3a450 >--- /dev/null >+++ b/Source/WTF/wtf/nix/FeatureDefinesNix.h >@@ -0,0 +1,281 @@ >+/* >+* Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies). >+* >+* Redistribution and use in source and binary forms, with or without >+* modification, are permitted provided that the following conditions >+* are met: >+* 1. Redistributions of source code must retain the above copyright >+* notice, this list of conditions and the following disclaimer. >+* 2. Redistributions in binary form must reproduce the above copyright >+* notice, this list of conditions and the following disclaimer in the >+* documentation and/or other materials provided with the distribution. >+* >+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR >+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT >+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, >+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT >+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+*/ >+ >+#ifndef WTF_FeatureDefinesNix_h >+#define WTF_FeatureDefinesNix_h >+ >+#if !defined(ENABLE_3D_RENDERING) >+#define ENABLE_3D_RENDERING 1 >+#endif >+ >+#if !defined(ENABLE_ACCELERATED_2D_CANVAS) >+#define ENABLE_ACCELERATED_2D_CANVAS 0 >+#endif >+ >+#if !defined(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) >+#define ENABLE_ACCELERATED_OVERFLOW_SCROLLING 1 >+#endif >+ >+#if !defined(ENABLE_BLOB) >+#define ENABLE_BLOB 1 >+#endif >+ >+#if !defined(ENABLE_CHANNEL_MESSAGING) >+#define ENABLE_CHANNEL_MESSAGING 1 >+#endif >+ >+#if !defined(ENABLE_CONTEXT_MENUS) >+#define ENABLE_CONTEXT_MENUS 1 >+#endif >+ >+#if !defined(ENABLE_CSS3_TEXT) >+#define ENABLE_CSS3_TEXT 1 >+#endif >+ >+#if !defined(ENABLE_CSS_BOX_DECORATION_BREAK) >+#define ENABLE_CSS_BOX_DECORATION_BREAK 1 >+#endif >+ >+#if !defined(ENABLE_CSS_EXCLUSIONS) >+#define ENABLE_CSS_EXCLUSIONS 1 >+#endif >+ >+#if !defined(ENABLE_CSS_FILTERS) >+#define ENABLE_CSS_FILTERS 1 >+#endif >+ >+#if !defined(ENABLE_CSS_IMAGE_ORIENTATION) >+#define ENABLE_CSS_IMAGE_ORIENTATION 1 >+#endif >+ >+#if !defined(ENABLE_CSS_IMAGE_RESOLUTION) >+#define ENABLE_CSS_IMAGE_RESOLUTION 1 >+#endif >+ >+#if !defined(ENABLE_CSS_IMAGE_SET) >+#define ENABLE_CSS_IMAGE_SET 1 >+#endif >+ >+#if !defined(ENABLE_CSS_REGIONS) >+#define ENABLE_CSS_REGIONS 1 >+#endif >+ >+#if !defined(ENABLE_CSS_SHADERS) >+#define ENABLE_CSS_SHADERS 1 >+#endif >+ >+#if !defined(ENABLE_CSS_VARIABLES) >+#define ENABLE_CSS_VARIABLES 1 >+#endif >+ >+#if !defined(ENABLE_DATALIST_ELEMENT) >+#define ENABLE_DATALIST_ELEMENT 1 >+#endif >+ >+#if !defined(ENABLE_DETAILS_ELEMENT) >+#define ENABLE_DETAILS_ELEMENT 1 >+#endif >+ >+#if !defined(ENABLE_DRAG_SUPPORT) >+#define ENABLE_DRAG_SUPPORT 0 >+#endif >+ >+#if !defined(ENABLE_FAST_MOBILE_SCROLLING) >+#define ENABLE_FAST_MOBILE_SCROLLING 1 >+#endif >+ >+#if !defined(ENABLE_FILTERS) >+#define ENABLE_FILTERS 1 >+#endif >+ >+#if !defined(ENABLE_FTPDIR) >+#define ENABLE_FTPDIR 1 >+#endif >+ >+#if !defined(ENABLE_FULLSCREEN_API) >+#define ENABLE_FULLSCREEN_API 0 >+#endif >+ >+#if !defined(ENABLE_GAMEPAD) >+#define ENABLE_GAMEPAD 1 >+#endif >+ >+#if !defined(ENABLE_GESTURE_EVENTS) >+#define ENABLE_GESTURE_EVENTS 1 >+#endif >+ >+#if !defined(ENABLE_ICONDATABASE) >+#define ENABLE_ICONDATABASE 1 >+#endif >+ >+#if !defined(ENABLE_IFRAME_SEAMLESS) >+#define ENABLE_IFRAME_SEAMLESS 1 >+#endif >+ >+#if !defined(ENABLE_INDEXED_DATABASE) >+#define ENABLE_INDEXED_DATABASE 1 >+#endif >+ >+#if !defined(ENABLE_INSPECTOR) >+#define ENABLE_INSPECTOR 1 >+#endif >+ >+#if !defined(ENABLE_INSPECTOR_SERVER) >+#define ENABLE_INSPECTOR_SERVER 1 >+#endif >+ >+#if !defined(ENABLE_JAVASCRIPT_DEBUGGER) >+#define ENABLE_JAVASCRIPT_DEBUGGER 1 >+#endif >+ >+#if !defined(ENABLE_JIT) >+#define ENABLE_JIT 1 >+#endif >+ >+#if !defined(ENABLE_LEGACY_VENDOR_PREFIXES) >+#define ENABLE_LEGACY_VENDOR_PREFIXES 0 >+#endif >+ >+#if !defined(ENABLE_LEGACY_VIEWPORT_ADAPTION) >+#define ENABLE_LEGACY_VIEWPORT_ADAPTION 1 >+#endif >+ >+#if !defined(ENABLE_LEGACY_WEB_AUDIO) >+#define ENABLE_LEGACY_WEB_AUDIO 1 >+#endif >+ >+#if !defined(ENABLE_LLINT) >+#define ENABLE_LLINT 1 >+#endif >+ >+#if !defined(ENABLE_MATHML) >+#define ENABLE_MATHML 1 >+#endif >+ >+#if !defined(ENABLE_METER_ELEMENT) >+#define ENABLE_METER_ELEMENT 1 >+#endif >+ >+#if !defined(ENABLE_MICRODATA) >+#define ENABLE_MICRODATA 1 >+#endif >+ >+#if !defined(ENABLE_NAVIGATOR_CONTENT_UTILS) >+#define ENABLE_NAVIGATOR_CONTENT_UTILS 1 >+#endif >+ >+#if !defined(ENABLE_NETSCAPE_PLUGIN_API) >+#define ENABLE_NETSCAPE_PLUGIN_API 0 >+#endif >+ >+#if !defined(ENABLE_NETWORK_INFO) >+#define ENABLE_NETWORK_INFO 1 >+#endif >+ >+#if !defined(ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH) >+#define ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH 1 >+#endif >+ >+#if !defined(ENABLE_POPUP_MENUS) >+#define ENABLE_POPUP_MENUS 1 >+#endif >+ >+#if !defined(ENABLE_PROGRESS_ELEMENT) >+#define ENABLE_PROGRESS_ELEMENT 1 >+#endif >+ >+#if !defined(ENABLE_REQUEST_ANIMATION_FRAME) >+#define ENABLE_REQUEST_ANIMATION_FRAME 1 >+#endif >+ >+#if !defined(ENABLE_CSS_SHAPES) >+#define ENABLE_CSS_SHAPES 1 >+#endif >+ >+#if !defined(ENABLE_SHARED_WORKERS) >+#define ENABLE_SHARED_WORKERS 1 >+#endif >+ >+#if !defined(ENABLE_SQL_DATABASE) >+#define ENABLE_SQL_DATABASE 1 >+#endif >+ >+#if !defined(ENABLE_SVG) >+#define ENABLE_SVG 1 >+#endif >+ >+#if !defined(ENABLE_SVG_FONTS) >+#define ENABLE_SVG_FONTS 1 >+#endif >+ >+#if !defined(ENABLE_TOUCH_ADJUSTMENT) >+#define ENABLE_TOUCH_ADJUSTMENT 1 >+#endif >+ >+#if !defined(ENABLE_TOUCH_EVENTS) >+#define ENABLE_TOUCH_EVENTS 1 >+#endif >+ >+#if !defined(ENABLE_UNDO_MANAGER) >+#define ENABLE_UNDO_MANAGER 0 >+#endif >+ >+#if !defined(ENABLE_VIDEO) >+#define ENABLE_VIDEO 0 >+#endif >+ >+#if !defined(ENABLE_VIEW_MODE_CSS_MEDIA) >+#define ENABLE_VIEW_MODE_CSS_MEDIA 1 >+#endif >+ >+#if !defined(ENABLE_WEB_AUDIO) >+#define ENABLE_WEB_AUDIO 1 >+#endif >+ >+#if !defined(ENABLE_WEBGL) >+#define ENABLE_WEBGL 1 >+#endif >+ >+#if !defined(ENABLE_WEB_SOCKETS) >+#define ENABLE_WEB_SOCKETS 1 >+#endif >+ >+#if !defined(ENABLE_WEB_TIMING) >+#define ENABLE_WEB_TIMING 1 >+#endif >+ >+#if !defined(ENABLE_WORKERS) >+#define ENABLE_WORKERS 1 >+#endif >+ >+#if !defined(ENABLE_XHR_RESPONSE_BLOB) >+#define ENABLE_XHR_RESPONSE_BLOB 1 >+#endif >+ >+#if !defined(ENABLE_XSLT) >+#define ENABLE_XSLT 1 >+#endif >+ >+#endif >diff --git a/Source/WTF/wtf/nix/PlatformNix.h b/Source/WTF/wtf/nix/PlatformNix.h >new file mode 100644 >index 0000000000000000000000000000000000000000..710be4437a6cdc1626a643562172cb3fa81debdf >--- /dev/null >+++ b/Source/WTF/wtf/nix/PlatformNix.h >@@ -0,0 +1,63 @@ >+/* >+* Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies). >+* >+* Redistribution and use in source and binary forms, with or without >+* modification, are permitted provided that the following conditions >+* are met: >+* 1. Redistributions of source code must retain the above copyright >+* notice, this list of conditions and the following disclaimer. >+* 2. Redistributions in binary form must reproduce the above copyright >+* notice, this list of conditions and the following disclaimer in the >+* documentation and/or other materials provided with the distribution. >+* >+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR >+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT >+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, >+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT >+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+*/ >+ >+#ifndef WTF_PlatformNix_h >+#define WTF_PlatformNix_h >+ >+#define WTF_PLATFORM_NIX 1 >+#define ENABLE_GLOBAL_FASTMALLOC_NEW 0 >+ >+#define WTF_USE_3D_GRAPHICS 1 >+#define WTF_USE_ACCELERATED_COMPOSITING 1 >+#define WTF_USE_CAIRO 1 >+#define WTF_USE_COORDINATED_GRAPHICS 1 >+#define WTF_USE_CROSS_PLATFORM_CONTEXT_MENUS 1 >+#define WTF_USE_FREETYPE 1 >+#define WTF_USE_GLIB 1 >+#define WTF_USE_HARFBUZZ 1 >+#define WTF_USE_HARFBUZZ_NG 1 >+#define WTF_USE_ICU_UNICODE 1 >+#define WTF_USE_IOSURFACE_CANVAS_BACKING_STORE 1 >+#define WTF_USE_LEVELDB 1 >+#define WTF_USE_PTHREADS 1 >+#define WTF_USE_TEXTURE_MAPPER 1 >+#define WTF_USE_TEXTURE_MAPPER_GL 1 >+#define WTF_USE_TILED_BACKING_STORE 1 >+#define WTF_USE_UNIX_DOMAIN_SOCKETS 1 >+ >+#if !defined(WTF_USE_OPENGL_ES_2) || !WTF_USE_OPENGL_ES_2 >+#define WTF_USE_OPENGL 1 >+#define WTF_USE_GLX 1 >+#define WTF_PLATFORM_X11 1 >+#define WTF_USE_GRAPHICS_SURFACE 1 >+#else >+#define WTF_USE_EGL 1 >+#endif >+ >+#if !defined(WTF_USE_CURL) || !WTF_USE_CURL >+#define WTF_USE_SOUP 1 >+#endif >+ >+#endif >diff --git a/Source/WebCore/css/mediaControlsNix.css b/Source/WebCore/css/mediaControlsNix.css >new file mode 100644 >index 0000000000000000000000000000000000000000..b5b366527b7e058194c541715ef5788ed027749b >--- /dev/null >+++ b/Source/WebCore/css/mediaControlsNix.css >@@ -0,0 +1,203 @@ >+/* >+ * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. >+ * Copyright (C) 2011 Samsung Electronics >+ * Copyright (C) 2012-2013 Nokia Corporation and/or its subsidiary(-ies). >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+/* NixWebKit media controls. Extends mediaControls.css */ >+ >+audio { >+ width: 300px; >+ height: 20px; >+} >+ >+audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel { >+ display: -webkit-box; >+ -webkit-box-orient: horizontal; >+ -webkit-box-align: center; >+ -webkit-user-select: none; >+ position: relative; >+ bottom: 0; >+ width: 100%; >+ z-index: 0; >+ overflow: hidden; >+ height: 20px; >+ text-align: right; >+} >+ >+video:-webkit-full-page-media::-webkit-media-controls-panel { >+ bottom: 0px; >+} >+ >+audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button { >+ -webkit-appearance: media-mute-button; >+ display: -webkit-box; >+ width: 20px; >+ height: 20px; >+ position: relative; >+ z-index: 2; >+ background-color: initial; >+ border: initial; >+ color: inherit; >+} >+ >+audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button { >+ -webkit-appearance: media-play-button; >+ display: -webkit-box; >+ width: 20px; >+ height: 20px; >+ background-color: initial; >+ border: initial; >+ color: inherit; >+} >+ >+audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container { >+ -webkit-appearance: media-controls-background; >+ display: -webkit-box; >+ -webkit-box-orient: horizontal; >+ -webkit-box-align: center; >+ -webkit-box-pack: end; >+ -webkit-box-flex: 1; >+ -webkit-user-select: none; >+ height: 20px; >+} >+ >+audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display { >+ -webkit-appearance: media-current-time-display; >+ -webkit-user-select: none; >+ display: -webkit-box; >+ height: 20px; >+ >+ padding: 4px; >+ >+ text-align: center; >+ font-size: 10px; >+ >+ color: black; >+ letter-spacing: normal; >+ word-spacing: normal; >+ line-height: normal; >+ text-transform: none; >+ text-indent: 0; >+ text-shadow: none; >+ text-decoration: none; >+ font-style: normal; >+ font-weight: normal; >+ font-family: serif; >+} >+ >+audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display { >+ display: none; >+} >+ >+audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline { >+ -webkit-appearance: media-slider; >+ display: -webkit-box; >+ -webkit-box-flex: 1; >+ height: 20px; >+ padding: 0px 2px; >+ background-color: initial; >+ border: initial; >+ color: inherit; >+ margin: initial; >+} >+ >+audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container { >+ -webkit-appearance: media-volume-slider-container; >+ position: absolute; >+ height: 100px; >+ width: 20px; >+ bottom: 20px; >+ z-index: 1; >+} >+ >+audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider { >+ -webkit-appearance: media-volume-slider; >+ display: none; >+ background-color: initial; >+ border: initial; >+ color: inherit; >+ margin: initial; >+} >+ >+audio::-webkit-media-controls-seek-back-button, video::-webkit-media-controls-seek-back-button { >+ -webkit-appearance: media-seek-back-button; >+ display: -webkit-box; >+ width: 20px; >+ height: 20px; >+ background-color: initial; >+ border: initial; >+ color: inherit; >+} >+ >+audio::-webkit-media-controls-seek-forward-button, video::-webkit-media-controls-seek-forward-button { >+ -webkit-appearance: media-seek-forward-button; >+ display: -webkit-box; >+ width: 20px; >+ height: 20px; >+ background-color: initial; >+ border: initial; >+ color: inherit; >+} >+ >+audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-fullscreen-button { >+ -webkit-appearance: media-fullscreen-button; >+ display: -webkit-box; >+ width: 20px; >+ height: 20px; >+ background-color: initial; >+ border: initial; >+ color: inherit; >+} >+ >+audio::-webkit-media-controls-rewind-button, video::-webkit-media-controls-rewind-button { >+ display: none; >+ background-color: initial; >+ border: initial; >+ color: inherit; >+} >+ >+audio::-webkit-media-controls-return-to-realtime-button, video::-webkit-media-controls-return-to-realtime-button { >+ display: none; >+ background-color: initial; >+ border: initial; >+ color: inherit; >+} >+ >+audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button { >+ -webkit-appearance: media-toggle-closed-captions-button; >+ display: -webkit-box; >+ width: 20px; >+ height: 20px; >+ background-color: initial; >+ border: initial; >+ color: inherit; >+} >+ >+audio::-webkit-media-controls-volume-slider-mute-button, video::-webkit-media-controls-volume-slider-mute-button { >+ -webkit-appearance: media-volume-slider-mute-button; >+ display: none; >+ background-color: initial; >+ border: initial; >+ color: inherit; >+} >diff --git a/Source/WebCore/css/mediaControlsNixFullscreen.css b/Source/WebCore/css/mediaControlsNixFullscreen.css >new file mode 100644 >index 0000000000000000000000000000000000000000..633d707dcaeefc3ebd05acca6f050d34783f9f66 >--- /dev/null >+++ b/Source/WebCore/css/mediaControlsNixFullscreen.css >@@ -0,0 +1,129 @@ >+/* >+ * Copyright (C) 2012 Samsung Electronics >+ * Copyright (C) 2012-2013 Nokia Corporation and/or its subsidiary(-ies). >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+/* NixWebKit media controls for fullscreen. */ >+ >+video::-webkit-media-controls-panel { >+ display: -webkit-box; >+ -webkit-box-orient: horizontal; >+ -webkit-box-align: center; >+ -webkit-user-select: none; >+ position: relative; >+ bottom: 0; >+ width: 100%; >+ z-index: 0; >+ overflow: hidden; >+ height: 20px; >+ text-align: right; >+} >+ >+video:-webkit-full-page-media::-webkit-media-controls-panel { >+ display: none; >+} >+ >+video::-webkit-media-controls-mute-button { >+ display: none; >+} >+ >+video::-webkit-media-controls-play-button { >+ -webkit-appearance: media-play-button; >+ display: -webkit-box; >+ width: 20px; >+ height: 20px; >+ background-color: initial; >+ border: initial; >+ color: inherit; >+} >+ >+video::-webkit-media-controls-timeline-container { >+ -webkit-appearance: media-controls-background; >+ display: -webkit-box; >+ -webkit-box-orient: horizontal; >+ -webkit-box-align: center; >+ -webkit-box-pack: end; >+ -webkit-box-flex: 1; >+ -webkit-user-select: none; >+ height: 20px; >+} >+ >+video::-webkit-media-controls-current-time-display { >+ -webkit-appearance: media-current-time-display; >+ -webkit-user-select: none; >+ display: inline-block; >+ height: 20px; >+ padding: 4px; >+ text-align: center; >+ font-size: 10px; >+} >+ >+video::-webkit-media-controls-time-remaining-display { >+ display: none; >+} >+ >+video::-webkit-media-controls-timeline { >+ -webkit-appearance: media-slider; >+ display: -webkit-box; >+ -webkit-box-flex: 1; >+ height: 20px; >+ padding: 0px 2px; >+ background-color: initial; >+ border: initial; >+ color: inherit; >+ margin: initial; >+} >+ >+video::-webkit-media-controls-volume-slider-container { >+ -webkit-appearance: media-volume-slider-container; >+ display: none; >+} >+ >+video::-webkit-media-controls-volume-slider { >+ -webkit-appearance: media-volume-slider; >+ display: none; >+} >+ >+video::-webkit-media-controls-seek-back-button { >+ display: none; >+} >+ >+video::-webkit-media-controls-seek-forward-button { >+ display: none; >+} >+ >+video::-webkit-media-controls-fullscreen-button { >+ display: none; >+} >+ >+video::-webkit-media-controls-rewind-button { >+ display: none; >+} >+ >+video::-webkit-media-controls-return-to-realtime-button { >+ display: none; >+} >+ >+video::-webkit-media-controls-toggle-closed-captions-button { >+ display: none; >+} >diff --git a/Source/WebCore/page/nix/EventHandlerNix.cpp b/Source/WebCore/page/nix/EventHandlerNix.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..01974188b01dfe632b6d5c7d06181ed4157e4a7e >--- /dev/null >+++ b/Source/WebCore/page/nix/EventHandlerNix.cpp >@@ -0,0 +1,130 @@ >+/* >+ * Copyright (C) 2006 Zack Rusin <zack@kde.org> >+ * Copyright (C) 2008 INdT - Instituto Nokia de Tecnologia >+ * Copyright (C) 2009,2010 ProFUSION embedded systems >+ * Copyright (C) 2009,2010 Samsung Electronics >+ * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "EventHandler.h" >+ >+#include "Clipboard.h" >+#include "EventNames.h" >+#include "FloatPoint.h" >+#include "FocusController.h" >+#include "Frame.h" >+#include "FrameView.h" >+#include "KeyboardEvent.h" >+#include "MouseEventWithHitTestResults.h" >+#include "NotImplemented.h" >+#include "Page.h" >+#include "PlatformKeyboardEvent.h" >+#include "PlatformWheelEvent.h" >+#include "RenderWidget.h" >+#include "Scrollbar.h" >+ >+namespace WebCore { >+ >+#if ENABLE(DRAG_SUPPORT) >+const double EventHandler::TextDragDelay = 0.0; >+#endif >+ >+bool EventHandler::tabsToAllFormControls(KeyboardEvent*) const >+{ >+ return true; >+} >+ >+void EventHandler::focusDocumentView() >+{ >+ if (Page* page = m_frame->page()) >+ page->focusController()->setFocusedFrame(m_frame); >+} >+ >+bool EventHandler::passWidgetMouseDownEventToWidget(const MouseEventWithHitTestResults& event) >+{ >+ RenderObject* target = event.targetNode() ? event.targetNode()->renderer() : 0; >+ >+ if (!target || !target->isWidget()) >+ return false; >+ >+ return passMouseDownEventToWidget(static_cast<RenderWidget*>(target)->widget()); >+} >+ >+bool EventHandler::passWidgetMouseDownEventToWidget(RenderWidget* renderWidget) >+{ >+ return passMouseDownEventToWidget(renderWidget->widget()); >+} >+ >+bool EventHandler::passMouseDownEventToWidget(Widget*) >+{ >+ notImplemented(); >+ return false; >+} >+ >+bool EventHandler::eventActivatedView(const PlatformMouseEvent&) const >+{ >+ notImplemented(); >+ return false; >+} >+ >+bool EventHandler::passWheelEventToWidget(const PlatformWheelEvent& event, Widget* widget) >+{ >+ ASSERT(widget); >+ if (!widget->isFrameView()) >+ return false; >+ >+ return static_cast<FrameView*>(widget)->frame()->eventHandler()->handleWheelEvent(event); >+} >+ >+#if ENABLE(DRAG_SUPPORT) >+PassRefPtr<Clipboard> EventHandler::createDraggingClipboard() const >+{ >+ return Clipboard::createForDragAndDrop(); >+} >+#endif >+ >+bool EventHandler::passMousePressEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe) >+{ >+ subframe->eventHandler()->handleMousePressEvent(mev.event()); >+ return true; >+} >+ >+bool EventHandler::passMouseMoveEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe, HitTestResult* hoveredNode) >+{ >+ subframe->eventHandler()->handleMouseMoveEvent(mev.event(), hoveredNode); >+ return true; >+} >+ >+bool EventHandler::passMouseReleaseEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe) >+{ >+ subframe->eventHandler()->handleMouseReleaseEvent(mev.event()); >+ return true; >+} >+ >+unsigned EventHandler::accessKeyModifiers() >+{ >+ return PlatformEvent::AltKey; >+} >+} >diff --git a/Source/WebCore/platform/graphics/egl/GLContextFromCurrentEGL.cpp b/Source/WebCore/platform/graphics/egl/GLContextFromCurrentEGL.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..bfb6ef1b652d724696bffd65c350542eacbed30a >--- /dev/null >+++ b/Source/WebCore/platform/graphics/egl/GLContextFromCurrentEGL.cpp >@@ -0,0 +1,64 @@ >+/* >+ * Copyright (C) 2012-2013 Nokia Corporation and/or its subsidiary(-ies). >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "GLContextFromCurrentEGL.h" >+ >+#include "OpenGLShims.h" >+ >+namespace WebCore { >+ >+PassOwnPtr<GLContextFromCurrentEGL> GLContextFromCurrentEGL::createFromCurrentGLContext() >+{ >+ if (!initialize()) >+ return nullptr; >+ return adoptPtr(new GLContextFromCurrentEGL()); >+} >+ >+GLContextFromCurrentEGL::GLContextFromCurrentEGL() >+ : m_display(eglGetCurrentDisplay()) >+ , m_surface(eglGetCurrentSurface(EGL_DRAW)) >+ , m_context(eglGetCurrentContext()) >+{ >+} >+ >+bool GLContextFromCurrentEGL::makeContextCurrent() >+{ >+ GLContext::makeContextCurrent(); >+ return eglMakeCurrent(m_display, m_surface, m_surface, m_context); >+} >+ >+bool GLContextFromCurrentEGL::initialize() >+{ >+ static bool initialized = false; >+ static bool success = true; >+ if (!initialized) { >+ success = initializeOpenGLShims(); >+ initialized = true; >+ } >+ return success; >+} >+ >+} // namespace WebCore >diff --git a/Source/WebCore/platform/graphics/egl/GLContextFromCurrentEGL.h b/Source/WebCore/platform/graphics/egl/GLContextFromCurrentEGL.h >new file mode 100644 >index 0000000000000000000000000000000000000000..1b28dc679deff8630333f1b50b7411966864ebb2 >--- /dev/null >+++ b/Source/WebCore/platform/graphics/egl/GLContextFromCurrentEGL.h >@@ -0,0 +1,62 @@ >+/* >+ * Copyright (C) 2012-2013 Nokia Corporation and/or its subsidiary(-ies). >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#ifndef GLContextFromCurrentEGL_h >+#define GLContextFromCurrentEGL_h >+ >+#include "GLContext.h" >+#include <EGL/egl.h> >+ >+namespace WebCore { >+ >+class GLContextFromCurrentEGL : public GLContext { >+ WTF_MAKE_NONCOPYABLE(GLContextFromCurrentEGL); >+public: >+ static PassOwnPtr<GLContextFromCurrentEGL> createFromCurrentGLContext(); >+ >+ virtual bool makeContextCurrent() OVERRIDE; >+ >+ virtual void swapBuffers() OVERRIDE { } >+ virtual IntSize defaultFrameBufferSize() OVERRIDE { return IntSize(); } >+ virtual cairo_device_t* cairoDevice() OVERRIDE { return 0; } >+ >+ virtual bool canRenderToDefaultFramebuffer() OVERRIDE { return false; } >+ >+ virtual PlatformGraphicsContext3D platformContext() OVERRIDE { return this; } >+ virtual void waitNative() OVERRIDE { } >+ >+private: >+ static bool initialize(); >+ >+ GLContextFromCurrentEGL(); >+ >+ EGLDisplay m_display; >+ EGLSurface m_surface; >+ EGLContext m_context; >+}; >+ >+} // namespace WebCore >+ >+#endif // GLContextFromCurrentEGL_h >diff --git a/Source/WebCore/platform/graphics/gstreamer/PlatformVideoWindowNix.cpp b/Source/WebCore/platform/graphics/gstreamer/PlatformVideoWindowNix.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..2d9da2f90d6b603714330f396f415b08673d0640 >--- /dev/null >+++ b/Source/WebCore/platform/graphics/gstreamer/PlatformVideoWindowNix.cpp >@@ -0,0 +1,44 @@ >+/* >+ * Copyright (C) 2010 Samsung Electronics >+ * Copyright (C) 2012 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 "PlatformVideoWindow.h" >+ >+#if USE(GSTREAMER) && !defined(GST_API_VERSION_1) >+ >+#include "NotImplemented.h" >+ >+using namespace WebCore; >+ >+PlatformVideoWindow::PlatformVideoWindow() >+{ >+ notImplemented(); >+} >+ >+PlatformVideoWindow::~PlatformVideoWindow() >+{ >+ notImplemented(); >+} >+ >+void PlatformVideoWindow::prepareForOverlay(GstMessage*) >+{ >+} >+ >+#endif // USE(GSTREAMER) && !defined(GST_API_VERSION_1) >diff --git a/Source/WebCore/platform/graphics/nix/IconNix.cpp b/Source/WebCore/platform/graphics/nix/IconNix.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..5d3f8d32e4d30b44dc0361789549c3ba72b9a2b9 >--- /dev/null >+++ b/Source/WebCore/platform/graphics/nix/IconNix.cpp >@@ -0,0 +1,52 @@ >+/* >+ * Copyright (C) 2012-2013 Nokia Corporation and/or its subsidiary(-ies). >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+ >+#include "Icon.h" >+ >+#include "GraphicsContext.h" >+#include "NotImplemented.h" >+#include <wtf/PassRefPtr.h> >+#include <wtf/text/WTFString.h> >+ >+namespace WebCore { >+ >+Icon::~Icon() >+{ >+} >+ >+PassRefPtr<Icon> Icon::createIconForFiles(const Vector<String>&) >+{ >+ notImplemented(); >+ return 0; >+} >+ >+void Icon::paint(GraphicsContext*, const IntRect&) >+{ >+ notImplemented(); >+} >+ >+} >diff --git a/Source/WebCore/platform/graphics/nix/ImageNix.cpp b/Source/WebCore/platform/graphics/nix/ImageNix.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..3c6e13b42b4618b5cecac506645b0e6369a50bfb >--- /dev/null >+++ b/Source/WebCore/platform/graphics/nix/ImageNix.cpp >@@ -0,0 +1,63 @@ >+/* >+ * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. >+ * Copyright (C) 2008 Kenneth Rohde Christiansen. All rights reserved. >+ * Copyright (C) 2009-2010 ProFUSION embedded systems >+ * Copyright (C) 2009-2010 Samsung Electronics >+ * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "Image.h" >+ >+#include "BitmapImage.h" >+#include "SharedBuffer.h" >+ >+namespace WebCore { >+ >+void BitmapImage::invalidatePlatformData() >+{ >+} >+ >+static PassRefPtr<SharedBuffer> loadResourceSharedBufferFallback() >+{ >+ return SharedBuffer::create(); // FIXME: fallback image? >+} >+ >+static PassRefPtr<SharedBuffer> loadResourceSharedBuffer(const char* name) >+{ >+ RefPtr<SharedBuffer> buffer = SharedBuffer::createWithContentsOfFile(makeString(DATA_DIR "/webkit-1.0/images/", name, ".png")); >+ if (buffer) >+ return buffer.release(); >+ return loadResourceSharedBufferFallback(); >+} >+ >+PassRefPtr<Image> Image::loadPlatformResource(const char* name) >+{ >+ RefPtr<BitmapImage> img = BitmapImage::create(); >+ RefPtr<SharedBuffer> buffer = loadResourceSharedBuffer(name); >+ img->setData(buffer.release(), true); >+ return img.release(); >+} >+ >+} >diff --git a/Source/WebCore/platform/nix/CursorNix.cpp b/Source/WebCore/platform/nix/CursorNix.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..177ef0cce3be97feaad48f67870556db8a1152c4 >--- /dev/null >+++ b/Source/WebCore/platform/nix/CursorNix.cpp >@@ -0,0 +1,120 @@ >+/* >+ * Copyright (C) 2006 Dirk Mueller <mueller@kde.org> >+ * Copyright (C) 2006 George Staikos <staikos@kde.org> >+ * Copyright (C) 2006 Charles Samuels <charles@kde.org> >+ * Copyright (C) 2008 Holger Hans Peter Freyther >+ * Copyright (C) 2008 Kenneth Rohde Christiansen >+ * Copyright (C) 2009-2010 ProFUSION embedded systems >+ * Copyright (C) 2009-2010 Samsung Electronics >+ * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). >+ * >+ * All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "Cursor.h" >+ >+#include "NotImplemented.h" >+ >+namespace WebCore { >+ >+Cursor::Cursor(const Cursor& other) >+ : m_type(other.m_type) >+ , m_image(other.m_image) >+ , m_hotSpot(other.m_hotSpot) >+ , m_platformCursor(other.m_platformCursor) >+{ >+} >+ >+Cursor::~Cursor() >+{ >+} >+ >+Cursor& Cursor::operator=(const Cursor& other) >+{ >+ m_type = other.m_type; >+ m_image = other.m_image; >+ m_hotSpot = other.m_hotSpot; >+ m_platformCursor = other.m_platformCursor; >+ return *this; >+} >+ >+static const char* cursorString(Cursor::Type type) >+{ >+ static const char* cursorStrings[] = { >+ "cursor/pointer", >+ "cursor/cross", >+ "cursor/hand", >+ "cursor/i_beam", >+ "cursor/wait", >+ "cursor/help", >+ "cursor/east_resize", >+ "cursor/north_resize", >+ "cursor/north_east_resize", >+ "cursor/north_west_resize", >+ "cursor/south_resize", >+ "cursor/south_east_resize", >+ "cursor/south_west_resize", >+ "cursor/west_resize", >+ "cursor/north_south_resize", >+ "cursor/east_west_resize", >+ "cursor/north_east_south_west_resize", >+ "cursor/north_west_south_east_resize", >+ "cursor/column_resize", >+ "cursor/row_resize", >+ "cursor/middle_panning", >+ "cursor/east_panning", >+ "cursor/north_panning", >+ "cursor/north_east_panning", >+ "cursor/north_west_panning", >+ "cursor/south_panning", >+ "cursor/south_east_panning", >+ "cursor/south_west_panning", >+ "cursor/west_panning", >+ "cursor/move", >+ "cursor/vertical_text", >+ "cursor/cell", >+ "cursor/context_menu", >+ "cursor/alias", >+ "cursor/progress", >+ "cursor/no_drop", >+ "cursor/copy", >+ "cursor/none", >+ "cursor/not_allowed", >+ "cursor/zoom_in", >+ "cursor/zoom_out", >+ "cursor/grab", >+ "cursor/grabbing", >+ ""}; // FIXME: Just return "" for custom type. We don't support it now. >+ return cursorStrings[type]; >+} >+ >+void Cursor::ensurePlatformCursor() const >+{ >+ if (m_platformCursor) >+ return; >+ m_platformCursor = cursorString(m_type); >+} >+ >+} >diff --git a/Source/WebCore/platform/nix/DragDataNix.cpp b/Source/WebCore/platform/nix/DragDataNix.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..9ffb6986afa4f21eb027577b6f1ac1649715c775 >--- /dev/null >+++ b/Source/WebCore/platform/nix/DragDataNix.cpp >@@ -0,0 +1,93 @@ >+/* >+ * Copyright (C) 2012-2013 Nokia Corporation and/or its subsidiary(-ies). >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "DragData.h" >+ >+#include "Document.h" >+#include "DocumentFragment.h" >+ >+namespace WebCore { >+ >+bool DragData::canSmartReplace() const >+{ >+ return false; >+} >+ >+bool DragData::containsColor() const >+{ >+ return false; >+} >+ >+bool DragData::containsFiles() const >+{ >+ return false; >+} >+ >+unsigned DragData::numberOfFiles() const >+{ >+ return 0; >+} >+ >+void DragData::asFilenames(Vector<String>&) const >+{ >+} >+ >+bool DragData::containsPlainText() const >+{ >+ return false; >+} >+ >+String DragData::asPlainText(Frame*) const >+{ >+ return String(); >+} >+ >+Color DragData::asColor() const >+{ >+ return Color(); >+} >+ >+bool DragData::containsCompatibleContent() const >+{ >+ return false; >+} >+ >+bool DragData::containsURL(Frame*, FilenameConversionPolicy) const >+{ >+ return false; >+} >+ >+String DragData::asURL(Frame*, FilenameConversionPolicy, String*) const >+{ >+ return String(); >+} >+ >+PassRefPtr<DocumentFragment> DragData::asFragment(Frame*, PassRefPtr<Range>, bool, bool&) const >+{ >+ return 0; >+} >+ >+} >diff --git a/Source/WebCore/platform/nix/DragImageNix.cpp b/Source/WebCore/platform/nix/DragImageNix.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..ddac8612c13bf59f5e543916d1287fefcf8bf05c >--- /dev/null >+++ b/Source/WebCore/platform/nix/DragImageNix.cpp >@@ -0,0 +1,70 @@ >+/* >+ * Copyright (C) 2012-2013 Nokia Corporation and/or its subsidiary(-ies). >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "DragImage.h" >+ >+#include "CachedImage.h" >+#include "Image.h" >+#include "NotImplemented.h" >+ >+namespace WebCore { >+ >+IntSize dragImageSize(DragImageRef) >+{ >+ notImplemented(); >+ return IntSize(0, 0); >+} >+ >+void deleteDragImage(DragImageRef) >+{ >+ notImplemented(); >+} >+ >+DragImageRef scaleDragImage(DragImageRef image, FloatSize) >+{ >+ notImplemented(); >+ return image; >+} >+ >+DragImageRef dissolveDragImageToFraction(DragImageRef image, float) >+{ >+ notImplemented(); >+ return image; >+} >+ >+DragImageRef createDragImageFromImage(Image*, RespectImageOrientationEnum) >+{ >+ notImplemented(); >+ return 0; >+} >+ >+DragImageRef createDragImageIconForCachedImage(CachedImage*) >+{ >+ notImplemented(); >+ return 0; >+} >+ >+} >diff --git a/Source/WebCore/platform/nix/GamepadsNix.cpp b/Source/WebCore/platform/nix/GamepadsNix.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..3e77c7ce716d3fe0738ddb1e93c1578a30d5bfdf >--- /dev/null >+++ b/Source/WebCore/platform/nix/GamepadsNix.cpp >@@ -0,0 +1,63 @@ >+/* >+ * Copyright (C) 2011, Google Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions are met: >+ * >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND >+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE >+ * ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE >+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL >+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR >+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER >+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT >+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY >+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH >+ * DAMAGE. >+ */ >+ >+#include "config.h" >+#include "Gamepads.h" >+ >+#if ENABLE(GAMEPAD) >+ >+#include "GamepadList.h" >+#include <public/Platform.h> >+ >+namespace WebCore { >+ >+class GamepadList; >+ >+void sampleGamepads(GamepadList* into) >+{ >+ WebKit::WebGamepads gamepads; >+ >+ WebKit::Platform::current()->sampleGamepads(gamepads); >+ >+ for (unsigned i = 0; i < WebKit::WebGamepads::itemsLengthCap; ++i) { >+ WebKit::WebGamepad& webGamepad = gamepads.items[i]; >+ if (i < gamepads.length && webGamepad.connected) { >+ RefPtr<Gamepad> gamepad = into->item(i); >+ if (!gamepad) >+ gamepad = Gamepad::create(); >+ gamepad->id(webGamepad.id); >+ gamepad->index(i); >+ gamepad->timestamp(webGamepad.timestamp); >+ gamepad->axes(webGamepad.axesLength, webGamepad.axes); >+ gamepad->buttons(webGamepad.buttonsLength, webGamepad.buttons); >+ into->set(i, gamepad); >+ } else >+ into->set(i, 0); >+ } >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/platform/nix/LanguageNix.cpp b/Source/WebCore/platform/nix/LanguageNix.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..e1cba40d8f9f2220497b6b5803bc8636c3a4de86 >--- /dev/null >+++ b/Source/WebCore/platform/nix/LanguageNix.cpp >@@ -0,0 +1,62 @@ >+/* >+ * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved. >+ * Copyright (C) 2008 INdT - Instituto Nokia de Tecnologia >+ * Copyright (C) 2009-2010 ProFUSION embedded systems >+ * Copyright (C) 2009-2010 Samsung Electronics >+ * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "Language.h" >+ >+#include <locale.h> >+#include <wtf/Vector.h> >+#include <wtf/text/WTFString.h> >+ >+namespace WebCore { >+ >+static String platformLanguage() >+{ >+ char* localeDefault = setlocale(LC_CTYPE, 0); >+ >+ if (!localeDefault) >+ return ASCIIString("c"); >+ >+ String locale = String(localeDefault); >+ locale.replace('_', '-'); >+ size_t position = locale.find('.'); >+ if (position != notFound) >+ locale = locale.left(position); >+ >+ return locale; >+} >+ >+Vector<String> platformUserPreferredLanguages() >+{ >+ Vector<String> userPreferredLanguages; >+ userPreferredLanguages.append(platformLanguage()); >+ return userPreferredLanguages; >+} >+ >+} >diff --git a/Source/WebCore/platform/nix/LocalizedStringsNix.cpp b/Source/WebCore/platform/nix/LocalizedStringsNix.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..13ec3b5ed0e77085f336255e19eb050b1a2e9abc >--- /dev/null >+++ b/Source/WebCore/platform/nix/LocalizedStringsNix.cpp >@@ -0,0 +1,47 @@ >+/* >+ * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. >+ * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com >+ * Copyright (C) 2007 Holger Hans Peter Freyther >+ * Copyright (C) 2008 Christian Dywan <christian@imendio.com> >+ * Copyright (C) 2008 Nuanti Ltd. >+ * Copyright (C) 2008 INdT Instituto Nokia de Tecnologia >+ * Copyright (C) 2009-2010 ProFUSION embedded systems >+ * Copyright (C) 2009-2010 Samsung Electronics >+ * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "LocalizedStrings.h" >+ >+#include "NotImplemented.h" >+#include <wtf/text/WTFString.h> >+ >+namespace WebCore { >+ >+String localizedString(const char* key) >+{ >+ return String::fromUTF8(key, strlen(key)); >+} >+ >+} >diff --git a/Source/WebCore/platform/nix/NixKeyboardUtilities.cpp b/Source/WebCore/platform/nix/NixKeyboardUtilities.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..5e2514c6bd3b57abe5bdc368a7f2c28148fc438f >--- /dev/null >+++ b/Source/WebCore/platform/nix/NixKeyboardUtilities.cpp >@@ -0,0 +1,204 @@ >+/* >+ * Copyright (C) 2011 Samsung Electronics >+ * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). >+ * >+ * All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "NixKeyboardUtilities.h" >+ >+#include "KeyboardEvent.h" >+#include "WindowsKeyboardCodes.h" >+#include <wtf/HashMap.h> >+#include <wtf/text/StringHash.h> >+#include <wtf/text/WTFString.h> >+ >+namespace WebCore { >+ >+typedef HashMap<String, String> KeyMap; >+typedef HashMap<String, int> WindowsKeyMap; >+typedef HashMap<int, const char*> KeyCommandMap; >+ >+static KeyMap& keyMap() >+{ >+ DEFINE_STATIC_LOCAL(KeyMap, keyMap, ()); >+ return keyMap; >+} >+ >+static WindowsKeyMap& windowsKeyMap() >+{ >+ DEFINE_STATIC_LOCAL(WindowsKeyMap, windowsKeyMap, ()); >+ return windowsKeyMap; >+} >+ >+static KeyCommandMap& keyDownCommandsMap() >+{ >+ DEFINE_STATIC_LOCAL(KeyCommandMap, keyDownCommandsMap, ()); >+ return keyDownCommandsMap; >+} >+ >+static KeyCommandMap& keyPressCommandsMap() >+{ >+ DEFINE_STATIC_LOCAL(KeyCommandMap, keyPressCommandsMap, ()); >+ return keyPressCommandsMap; >+} >+ >+static inline void addCharactersToKeyMap(const char from, const char to) >+{ >+ for (char c = from; c <= to; c++) >+ keyMap().set(String(&c, 1), String::format("U+%04X", c)); >+} >+ >+static inline void addCharactersToWinKeyMap(const char from, const char to, const int baseCode) >+{ >+ int i = 0; >+ for (char c = from; c <= to; c++, i++) >+ windowsKeyMap().set(String(&c, 1), baseCode + i); >+} >+ >+static const unsigned CtrlKey = 1 << 0; >+static const unsigned AltKey = 1 << 1; >+static const unsigned ShiftKey = 1 << 2; >+ >+struct KeyDownEntry { >+ unsigned virtualKey; >+ unsigned modifiers; >+ const char* name; >+}; >+ >+struct KeyPressEntry { >+ unsigned charCode; >+ unsigned modifiers; >+ const char* name; >+}; >+ >+static const KeyDownEntry keyDownEntries[] = { >+ { VK_LEFT, 0, "MoveLeft" }, >+ { VK_LEFT, ShiftKey, "MoveLeftAndModifySelection" }, >+ { VK_LEFT, CtrlKey, "MoveWordLeft" }, >+ { VK_LEFT, CtrlKey | ShiftKey, "MoveWordLeftAndModifySelection" }, >+ { VK_RIGHT, 0, "MoveRight" }, >+ { VK_RIGHT, ShiftKey, "MoveRightAndModifySelection" }, >+ { VK_RIGHT, CtrlKey, "MoveWordRight" }, >+ { VK_RIGHT, CtrlKey | ShiftKey, "MoveWordRightAndModifySelection" }, >+ { VK_UP, 0, "MoveUp" }, >+ { VK_UP, ShiftKey, "MoveUpAndModifySelection" }, >+ { VK_PRIOR, ShiftKey, "MovePageUpAndModifySelection" }, >+ { VK_DOWN, 0, "MoveDown" }, >+ { VK_DOWN, ShiftKey, "MoveDownAndModifySelection" }, >+ { VK_NEXT, ShiftKey, "MovePageDownAndModifySelection" }, >+ { VK_PRIOR, 0, "MovePageUp" }, >+ { VK_NEXT, 0, "MovePageDown" }, >+ { VK_HOME, 0, "MoveToBeginningOfLine" }, >+ { VK_HOME, ShiftKey, "MoveToBeginningOfLineAndModifySelection" }, >+ { VK_HOME, CtrlKey, "MoveToBeginningOfDocument" }, >+ { VK_HOME, CtrlKey | ShiftKey, "MoveToBeginningOfDocumentAndModifySelection" }, >+ >+ { VK_END, 0, "MoveToEndOfLine" }, >+ { VK_END, ShiftKey, "MoveToEndOfLineAndModifySelection" }, >+ { VK_END, CtrlKey, "MoveToEndOfDocument" }, >+ { VK_END, CtrlKey | ShiftKey, "MoveToEndOfDocumentAndModifySelection" }, >+ >+ { VK_BACK, 0, "DeleteBackward" }, >+ { VK_BACK, ShiftKey, "DeleteBackward" }, >+ { VK_DELETE, 0, "DeleteForward" }, >+ { VK_BACK, CtrlKey, "DeleteWordBackward" }, >+ { VK_DELETE, CtrlKey, "DeleteWordForward" }, >+ >+ { 'B', CtrlKey, "ToggleBold" }, >+ { 'I', CtrlKey, "ToggleItalic" }, >+ >+ { VK_ESCAPE, 0, "Cancel" }, >+ { VK_OEM_PERIOD, CtrlKey, "Cancel" }, >+ { VK_TAB, 0, "InsertTab" }, >+ { VK_TAB, ShiftKey, "InsertBacktab" }, >+ { VK_RETURN, 0, "InsertNewline" }, >+ { VK_RETURN, CtrlKey, "InsertNewline" }, >+ { VK_RETURN, AltKey, "InsertNewline" }, >+ { VK_RETURN, AltKey | ShiftKey, "InsertNewline" }, >+}; >+ >+static const KeyPressEntry keyPressEntries[] = { >+ { '\t', 0, "InsertTab" }, >+ { '\t', ShiftKey, "InsertBacktab" }, >+ { '\r', 0, "InsertNewline" }, >+ { '\r', CtrlKey, "InsertNewline" }, >+ { '\r', AltKey, "InsertNewline" }, >+ { '\r', AltKey | ShiftKey, "InsertNewline" }, >+}; >+ >+static void createKeyDownCommandMap() >+{ >+ for (size_t i = 0; i < WTF_ARRAY_LENGTH(keyDownEntries); ++i) >+ keyDownCommandsMap().set(keyDownEntries[i].modifiers << 16 | keyDownEntries[i].virtualKey, keyDownEntries[i].name); >+} >+ >+static void createKeyPressCommandMap() >+{ >+ for (size_t i = 0; i < WTF_ARRAY_LENGTH(keyPressEntries); ++i) >+ keyPressCommandsMap().set(keyPressEntries[i].modifiers << 16 | keyPressEntries[i].charCode, keyPressEntries[i].name); >+} >+ >+const char* getKeyDownCommandName(const KeyboardEvent* event) >+{ >+ unsigned modifiers = 0; >+ if (event->shiftKey()) >+ modifiers |= ShiftKey; >+ if (event->altKey()) >+ modifiers |= AltKey; >+ if (event->ctrlKey()) >+ modifiers |= CtrlKey; >+ >+ int mapKey = modifiers << 16 | event->keyCode(); >+ if (!mapKey) >+ return 0; >+ >+ if (keyDownCommandsMap().isEmpty()) >+ createKeyDownCommandMap(); >+ >+ return keyDownCommandsMap().get(mapKey); >+} >+ >+const char* getKeyPressCommandName(const KeyboardEvent* event) >+{ >+ unsigned modifiers = 0; >+ if (event->shiftKey()) >+ modifiers |= ShiftKey; >+ if (event->altKey()) >+ modifiers |= AltKey; >+ if (event->ctrlKey()) >+ modifiers |= CtrlKey; >+ >+ int mapKey = modifiers << 16 | event->charCode(); >+ if (!mapKey) >+ return 0; >+ >+ if (keyPressCommandsMap().isEmpty()) >+ createKeyPressCommandMap(); >+ >+ return keyPressCommandsMap().get(mapKey); >+} >+ >+} // namespace WebCore >diff --git a/Source/WebCore/platform/nix/NixKeyboardUtilities.h b/Source/WebCore/platform/nix/NixKeyboardUtilities.h >new file mode 100644 >index 0000000000000000000000000000000000000000..ee2cae8603b033ec341bf715e9d1888cb2464916 >--- /dev/null >+++ b/Source/WebCore/platform/nix/NixKeyboardUtilities.h >@@ -0,0 +1,41 @@ >+/* >+ * Copyright (C) 2011 Samsung Electronics >+ * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). >+ * >+ * All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#ifndef NixKeyboardUtilities_h >+#define NixKeyboardUtilities_h >+ >+namespace WebCore { >+ >+class KeyboardEvent; >+ >+const char* getKeyDownCommandName(const KeyboardEvent*); >+const char* getKeyPressCommandName(const KeyboardEvent*); >+ >+} // namespace WebCore >+ >+#endif // NixKeyboardUtilities_h >diff --git a/Source/WebCore/platform/nix/PasteboardNix.cpp b/Source/WebCore/platform/nix/PasteboardNix.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..f83cdf74e67abc2fa81e09af6067226ed859afdf >--- /dev/null >+++ b/Source/WebCore/platform/nix/PasteboardNix.cpp >@@ -0,0 +1,161 @@ >+/* >+ * Copyright (C) 2007 Holger Hans Peter Freyther >+ * Copyright (C) 2007 Alp Toker <alp@atoker.com> >+ * Copyright (C) 2008 INdT - Instituto Nokia de Tecnologia >+ * Copyright (C) 2009-2010 ProFUSION embedded systems >+ * Copyright (C) 2009-2010 Samsung Electronics >+ * Copyright (C) 2013 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 Lesser 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 >+ * Lesser General Public License for more details. >+ * >+ * You should have received a copy of the GNU Lesser General Public >+ * License along with this library; if not, write to the Free Software >+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA >+ */ >+ >+#include "config.h" >+#include "Pasteboard.h" >+ >+#include "DocumentFragment.h" >+#include "NotImplemented.h" >+#include <wtf/text/StringHash.h> >+ >+namespace WebCore { >+ >+Pasteboard* Pasteboard::generalPasteboard() >+{ >+ static Pasteboard* pasteboard = new Pasteboard(); >+ return pasteboard; >+} >+ >+Pasteboard::Pasteboard() >+{ >+ notImplemented(); >+} >+ >+void Pasteboard::writePlainText(const String&, SmartReplaceOption) >+{ >+ notImplemented(); >+} >+ >+void Pasteboard::writeSelection(Range*, bool, Frame*, ShouldSerializeSelectedTextForClipboard) >+{ >+ notImplemented(); >+} >+ >+void Pasteboard::writeURL(const KURL&, const String&, Frame*) >+{ >+ notImplemented(); >+} >+ >+void Pasteboard::writeImage(Node*, const KURL&, const String&) >+{ >+ notImplemented(); >+} >+ >+void Pasteboard::writeClipboard(Clipboard*) >+{ >+ notImplemented(); >+} >+ >+void Pasteboard::clear() >+{ >+ notImplemented(); >+} >+ >+bool Pasteboard::canSmartReplace() >+{ >+ notImplemented(); >+ return false; >+} >+ >+PassRefPtr<DocumentFragment> Pasteboard::documentFragment(Frame*, PassRefPtr<Range>, bool, bool&) >+{ >+ notImplemented(); >+ return 0; >+} >+ >+String Pasteboard::plainText(Frame*) >+{ >+ notImplemented(); >+ return String(); >+} >+ >+PassOwnPtr<Pasteboard> Pasteboard::createForCopyAndPaste() >+{ >+ return adoptPtr(new Pasteboard); >+} >+ >+PassOwnPtr<Pasteboard> Pasteboard::createPrivate() >+{ >+ return createForCopyAndPaste(); >+} >+ >+#if ENABLE(DRAG_SUPPORT) >+PassOwnPtr<Pasteboard> Pasteboard::createForDragAndDrop() >+{ >+ return createForCopyAndPaste(); >+} >+ >+PassOwnPtr<Pasteboard> Pasteboard::createForDragAndDrop(const DragData&) >+{ >+ return createForCopyAndPaste(); >+} >+#endif >+ >+bool Pasteboard::hasData() >+{ >+ notImplemented(); >+ return false; >+} >+ >+void Pasteboard::clear(const String&) >+{ >+ notImplemented(); >+} >+ >+String Pasteboard::readString(const String&) >+{ >+ notImplemented(); >+ return String(); >+} >+ >+bool Pasteboard::writeString(const String&, const String&) >+{ >+ notImplemented(); >+ return false; >+} >+ >+ListHashSet<String> Pasteboard::types() >+{ >+ notImplemented(); >+ return ListHashSet<String>(); >+} >+ >+Vector<String> Pasteboard::readFilenames() >+{ >+ notImplemented(); >+ return Vector<String>(); >+} >+ >+#if ENABLE(DRAG_SUPPORT) >+void Pasteboard::setDragImage(DragImageRef, const IntPoint&) >+{ >+ notImplemented(); >+} >+#endif >+ >+void Pasteboard::writePasteboard(const Pasteboard&) >+{ >+ notImplemented(); >+} >+ >+} >diff --git a/Source/WebCore/platform/nix/PlatformKeyboardEventNix.cpp b/Source/WebCore/platform/nix/PlatformKeyboardEventNix.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..2d0ef6c340c9803afeafaff0177a6723a31aa8f5 >--- /dev/null >+++ b/Source/WebCore/platform/nix/PlatformKeyboardEventNix.cpp >@@ -0,0 +1,69 @@ >+/* >+ * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> >+ * Copyright (C) 2008 Diego Hidalgo C. Gonzalez >+ * Copyright (C) 2009-2010 ProFUSION embedded systems >+ * Copyright (C) 2009-2010 Samsung Electronics >+ * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "PlatformKeyboardEvent.h" >+ >+#include "NotImplemented.h" >+#include "TextEncoding.h" >+#include <stdio.h> >+#include <wtf/CurrentTime.h> >+ >+namespace WebCore { >+ >+void PlatformKeyboardEvent::disambiguateKeyDownEvent(Type type, bool) >+{ >+ ASSERT(m_type == KeyDown); >+ m_type = type; >+ >+ if (type == PlatformEvent::RawKeyDown) { >+ m_text = String(); >+ m_unmodifiedText = String(); >+ } else { >+ m_keyIdentifier = String(); >+ m_windowsVirtualKeyCode = 0; >+ } >+} >+ >+bool PlatformKeyboardEvent::currentCapsLockState() >+{ >+ notImplemented(); >+ return false; >+} >+ >+void PlatformKeyboardEvent::getCurrentModifierState(bool& shiftKey, bool& ctrlKey, bool& altKey, bool& metaKey) >+{ >+ notImplemented(); >+ shiftKey = false; >+ ctrlKey = false; >+ altKey = false; >+ metaKey = false; >+} >+ >+} >diff --git a/Source/WebCore/platform/nix/PlatformScreenNix.cpp b/Source/WebCore/platform/nix/PlatformScreenNix.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..8bfb3ac3ed21430ad1eaa2ebe40b96f8f4a5106c >--- /dev/null >+++ b/Source/WebCore/platform/nix/PlatformScreenNix.cpp >@@ -0,0 +1,84 @@ >+/* >+ * Copyright (C) 2012-2013 Nokia Corporation and/or its subsidiary(-ies). >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "PlatformScreen.h" >+ >+#include "FloatRect.h" >+#include "NotImplemented.h" >+#include "Widget.h" >+#include <wtf/text/CString.h> >+#include <wtf/text/WTFString.h> >+ >+namespace WebCore { >+ >+int screenHorizontalDPI(Widget*) >+{ >+ notImplemented(); >+ return 0; >+} >+ >+int screenVerticalDPI(Widget*) >+{ >+ notImplemented(); >+ return 0; >+} >+ >+int screenDepth(Widget*) >+{ >+ notImplemented(); >+ return 0; >+} >+ >+int screenDepthPerComponent(Widget*) >+{ >+ notImplemented(); >+ return 0; >+} >+ >+bool screenIsMonochrome(Widget*) >+{ >+ notImplemented(); >+ return false; >+} >+ >+FloatRect screenRect(Widget*) >+{ >+ notImplemented(); >+ return FloatRect(0, 0, 1024, 768); >+} >+ >+FloatRect screenAvailableRect(Widget* widget) >+{ >+ notImplemented(); >+ return screenRect(widget); >+} >+ >+void screenColorProfile(ColorProfile&) >+{ >+ notImplemented(); >+} >+ >+} >diff --git a/Source/WebCore/platform/nix/SoundNix.cpp b/Source/WebCore/platform/nix/SoundNix.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..de1bbeffe49c03df3d10ed0f4e564628f8ae725a >--- /dev/null >+++ b/Source/WebCore/platform/nix/SoundNix.cpp >@@ -0,0 +1,38 @@ >+/* >+ * Copyright (C) 2012-2013 Nokia Corporation and/or its subsidiary(-ies). >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "Sound.h" >+ >+#include "NotImplemented.h" >+ >+namespace WebCore { >+ >+void systemBeep() >+{ >+ notImplemented(); >+} >+ >+} >diff --git a/Source/WebCore/platform/nix/WidgetNix.cpp b/Source/WebCore/platform/nix/WidgetNix.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..18d30973d2005462b2e8cf336fa22b30fdf554fb >--- /dev/null >+++ b/Source/WebCore/platform/nix/WidgetNix.cpp >@@ -0,0 +1,98 @@ >+/* >+ * Copyright (C) 2012-2013 Nokia Corporation and/or its subsidiary(-ies). >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "Widget.h" >+ >+#include "ChromeClient.h" >+#include "Cursor.h" >+#include "Frame.h" >+#include "FrameView.h" >+#include "GraphicsContext.h" >+#include "IntRect.h" >+#include "NotImplemented.h" >+#include "Page.h" >+ >+namespace WebCore { >+ >+Widget::Widget(PlatformWidget widget) >+ : m_parent(0) >+ , m_widget(0) >+ , m_selfVisible(false) >+ , m_parentVisible(false) >+ , m_frame(0, 0, 0, 0) >+{ >+ init(widget); >+} >+ >+Widget::~Widget() >+{ >+ ASSERT(!parent()); >+} >+ >+IntRect Widget::frameRect() const >+{ >+ return m_frame; >+} >+ >+void Widget::setFrameRect(const IntRect& rect) >+{ >+ m_frame = rect; >+ Widget::frameRectsChanged(); >+} >+ >+void Widget::setFocus(bool) >+{ >+} >+ >+void Widget::setCursor(const Cursor& cursor) >+{ >+ ScrollView* view = root(); >+ if (!view) >+ return; >+ view->hostWindow()->setCursor(cursor); >+} >+ >+void Widget::show() >+{ >+ notImplemented(); >+} >+ >+void Widget::hide() >+{ >+ notImplemented(); >+} >+ >+void Widget::paint(GraphicsContext*, const IntRect&) >+{ >+ notImplemented(); >+} >+ >+void Widget::setIsSelected(bool) >+{ >+ notImplemented(); >+} >+ >+} >diff --git a/Source/WebCore/platform/text/nix/TextBreakIteratorInternalICUNix.cpp b/Source/WebCore/platform/text/nix/TextBreakIteratorInternalICUNix.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..77fa77388df7c6afd71ad1267869ef0504b466ee >--- /dev/null >+++ b/Source/WebCore/platform/text/nix/TextBreakIteratorInternalICUNix.cpp >@@ -0,0 +1,41 @@ >+/* >+ * Copyright (C) 2012-2013 Nokia Corporation and/or its subsidiary(-ies). >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "TextBreakIteratorInternalICU.h" >+ >+namespace WebCore { >+ >+const char* currentSearchLocaleID() >+{ >+ return ""; >+} >+ >+const char* currentTextBreakLocaleID() >+{ >+ return "en_us"; >+} >+ >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 118358
:
206001
|
206003
|
206020
|
206105
|
206168
|
206241
|
206410
|
206457
|
206465
| 211038