WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
New patch with corrections and shared files
bug-118358-20130705170825.patch (text/plain), 115.92 KB, created by
Luciano Wolf
on 2013-07-05 13:10:34 PDT
(
hide
)
Description:
New patch with corrections and shared files
Filename:
MIME Type:
Creator:
Luciano Wolf
Created:
2013-07-05 13:10:34 PDT
Size:
115.92 KB
patch
obsolete
>Subversion Revision: 152419 >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index 4a5d76e65c07661d3980c9eee2d40b41082c8240..bd589b5b1a2ecbc854821fa9c3aeb6dcf7866f2d 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,16 @@ >+2013-07-05 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 NOBODY (OOPS!). >+ >+ 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-07-05 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> > > A lot of code duplication within StringImpl 'equal' functions >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 9a63ecaf07c9baccd4c19861c3388977916382cd..01bac28c907478f0576ebdb2bbb69bfe41d47d5c 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,46 @@ >+2013-07-05 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 NOBODY (OOPS!). >+ >+ 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/glib/ErrorsGLib.cpp: Added. >+ * platform/glib/ErrorsGLib.h: Added. >+ * platform/glib/FileSystemGLib.cpp: Added. >+ * platform/glib/MIMETypeRegistryGLib.cpp: Added. >+ * platform/glib/RunLoopGLib.cpp: Added. >+ * platform/glib/SharedTimerGLib.cpp: Added. >+ * platform/glib/TemporaryLinkStubs.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-07-05 Benjamin Dupont <bdupont@nds.com> > > Segmentation fault occurred when ICU data library doesn't embed the expected encoding. >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/glib/ErrorsGLib.cpp b/Source/WebCore/platform/glib/ErrorsGLib.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..ab59b1fa23d0a984dd2e41b26ec970277d865de8 >--- /dev/null >+++ b/Source/WebCore/platform/glib/ErrorsGLib.cpp >@@ -0,0 +1,110 @@ >+/* >+ * Copyright (C) 2012 Intel Corporation. All rights reserved. >+ * 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 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 "ErrorsGLib.h" >+ >+#include "DocumentLoader.h" >+#include "Frame.h" >+#include "PrintContext.h" >+#include "ResourceError.h" >+#include "ResourceRequest.h" >+#include "ResourceResponse.h" >+ >+namespace WebCore { >+ >+ResourceError cancelledError(const ResourceRequest& request) >+{ >+ return ResourceError(errorDomainNetwork, NetworkErrorCancelled, request.url().string(), ASCIILiteral("Load request cancelled")); >+} >+ >+ResourceError blockedError(const ResourceRequest& request) >+{ >+ return ResourceError(errorDomainPolicy, PolicyErrorCannotUseRestrictedPort, request.url().string(), ASCIILiteral("Not allowed to use restricted network port")); >+} >+ >+ResourceError cannotShowURLError(const ResourceRequest& request) >+{ >+ return ResourceError(errorDomainPolicy, PolicyErrorCannotShowURL, request.url().string(), ASCIILiteral("URL cannot be shown")); >+} >+ >+ResourceError interruptedForPolicyChangeError(const ResourceRequest& request) >+{ >+ return ResourceError(errorDomainPolicy, PolicyErrorFrameLoadInterruptedByPolicyChange, request.url().string(), ASCIILiteral("Frame load was interrupted")); >+} >+ >+ResourceError cannotShowMIMETypeError(const ResourceResponse& response) >+{ >+ return ResourceError(errorDomainPolicy, PolicyErrorCannotShowMimeType, response.url().string(), ASCIILiteral("Content with the specified MIME type cannot be shown")); >+} >+ >+ResourceError fileDoesNotExistError(const ResourceResponse& response) >+{ >+ return ResourceError(errorDomainNetwork, NetworkErrorFileDoesNotExist, response.url().string(), ASCIILiteral("File does not exist")); >+} >+ >+ResourceError pluginWillHandleLoadError(const ResourceResponse& response) >+{ >+ return ResourceError(errorDomainPlugin, PluginErrorWillHandleLoad, response.url().string(), ASCIILiteral("Plugin will handle load")); >+} >+ >+ResourceError downloadNetworkError(const ResourceError& networkError) >+{ >+ return ResourceError(errorDomainDownload, DownloadErrorNetwork, networkError.failingURL(), networkError.localizedDescription()); >+} >+ >+ResourceError downloadCancelledByUserError(const ResourceResponse& response) >+{ >+ return ResourceError(errorDomainDownload, DownloadErrorCancelledByUser, response.url().string(), ASCIILiteral("User cancelled the download")); >+} >+ >+ResourceError downloadDestinationError(const ResourceResponse& response, const String& errorMessage) >+{ >+ return ResourceError(errorDomainDownload, DownloadErrorDestination, response.url().string(), errorMessage); >+} >+ >+ResourceError printError(const PrintContext* printContext, const String& errorMessage) >+{ >+ DocumentLoader* documentLoader = printContext->frame()->loader()->documentLoader(); >+ >+ return ResourceError(errorDomainPrint, PrintErrorGeneral, documentLoader ? documentLoader->url() : KURL(), errorMessage); >+} >+ >+ResourceError printerNotFoundError(const PrintContext* printContext) >+{ >+ DocumentLoader* documentLoader = printContext->frame()->loader()->documentLoader(); >+ >+ return ResourceError(errorDomainPrint, PrintErrorPrinterNotFound, documentLoader ? documentLoader->url() : KURL(), ASCIILiteral("Printer not found")); >+} >+ >+ResourceError invalidPageRangeToPrint(const PrintContext* printContext) >+{ >+ DocumentLoader* documentLoader = printContext->frame()->loader()->documentLoader(); >+ >+ return ResourceError(errorDomainPrint, PrintErrorInvalidPageRange, documentLoader ? documentLoader->url() : KURL(), ASCIILiteral("Invalid page range")); >+} >+ >+} // namespace WebCore >diff --git a/Source/WebCore/platform/glib/ErrorsGLib.h b/Source/WebCore/platform/glib/ErrorsGLib.h >new file mode 100644 >index 0000000000000000000000000000000000000000..e2514367bbfe93ef41042d959d6bc5071d13759b >--- /dev/null >+++ b/Source/WebCore/platform/glib/ErrorsGLib.h >@@ -0,0 +1,100 @@ >+/* >+ * Copyright (C) 2012 Intel Corporation. All rights reserved. >+ * 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 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. >+ */ >+ >+#ifndef ErrorsGLib_h >+#define ErrorsGLib_h >+ >+#include <wtf/text/WTFString.h> >+ >+namespace WebCore { >+ >+class PrintContext; >+class ResourceError; >+class ResourceRequest; >+class ResourceResponse; >+ >+static const char errorDomainNetwork[] = "WebKitNetworkError"; >+static const char errorDomainPolicy[] = "WebKitPolicyError"; >+static const char errorDomainPlugin[] = "WebKitPluginError"; >+static const char errorDomainDownload[] = "WebKitDownloadError"; >+static const char errorDomainPrint[] = "WebKitPrintError"; >+ >+enum NetworkError { >+ NetworkErrorFailed = 399, >+ NetworkErrorTransport = 300, >+ NetworkErrorUnknownProtocol = 301, >+ NetworkErrorCancelled = 302, >+ NetworkErrorFileDoesNotExist = 303 >+}; >+ >+// Sync'd with Mac's WebKit Errors at: >+// Source/WebKit/mac/Misc/WebKitErrors[Private].h >+enum PolicyError { >+ PolicyErrorFailed = 199, >+ PolicyErrorCannotShowMimeType = 100, >+ PolicyErrorCannotShowURL = 101, >+ PolicyErrorFrameLoadInterruptedByPolicyChange = 102, >+ PolicyErrorCannotUseRestrictedPort = 103 >+}; >+ >+enum PluginError { >+ PluginErrorFailed = 299, >+ PluginErrorCannotFindPlugin = 200, >+ PluginErrorCannotLoadPlugin = 201, >+ PluginErrorJavaUnavailable = 202, >+ PluginErrorConnectionCancelled = 203, >+ PluginErrorWillHandleLoad = 204 >+}; >+ >+enum DownloadError { >+ DownloadErrorNetwork = 499, >+ DownloadErrorCancelledByUser = 400, >+ DownloadErrorDestination = 401 >+}; >+ >+enum PrintError { >+ PrintErrorGeneral = 599, >+ PrintErrorPrinterNotFound = 500, >+ PrintErrorInvalidPageRange = 501 >+}; >+ >+ResourceError cancelledError(const ResourceRequest&); >+ResourceError blockedError(const ResourceRequest&); >+ResourceError cannotShowURLError(const ResourceRequest&); >+ResourceError interruptedForPolicyChangeError(const ResourceRequest&); >+ResourceError cannotShowMIMETypeError(const ResourceResponse&); >+ResourceError fileDoesNotExistError(const ResourceResponse&); >+ResourceError pluginWillHandleLoadError(const ResourceResponse&); >+ResourceError downloadNetworkError(const ResourceError&); >+ResourceError downloadCancelledByUserError(const ResourceResponse&); >+ResourceError downloadDestinationError(const ResourceResponse&, const String& errorMessage); >+ResourceError printError(const PrintContext*, const String& errorMessage); >+ResourceError printerNotFoundError(const PrintContext*); >+ResourceError invalidPageRangeToPrint(const PrintContext*); >+ >+} >+ >+#endif // ErrorsGLib_h >diff --git a/Source/WebCore/platform/glib/FileSystemGLib.cpp b/Source/WebCore/platform/glib/FileSystemGLib.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..f018b7780c1ca3ae80655b1a713d854ffdb7f697 >--- /dev/null >+++ b/Source/WebCore/platform/glib/FileSystemGLib.cpp >@@ -0,0 +1,367 @@ >+/* >+ * Copyright (C) 2007, 2009 Holger Hans Peter Freyther >+ * Copyright (C) 2008 Collabora, Ltd. >+ * Copyright (C) 2008 Apple Inc. All rights reserved. >+ * Portions Copyright (c) 2010 Motorola Mobility, Inc. All rights reserved. >+ * >+ * 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 "FileSystem.h" >+ >+#include "FileMetadata.h" >+#include "UUID.h" >+#include <gio/gio.h> >+#include <glib.h> >+#include <glib/gstdio.h> >+#include <wtf/gobject/GOwnPtr.h> >+#include <wtf/gobject/GRefPtr.h> >+#include <wtf/gobject/GlibUtilities.h> >+#include <wtf/text/CString.h> >+#include <wtf/text/WTFString.h> >+ >+namespace WebCore { >+ >+// On linux file names are just raw bytes, so also strings that cannot be encoded in any way >+// are valid file names. This mean that we cannot just store a file name as-is in a String >+// but we have to escape it. >+// On Windows the GLib file name encoding is always UTF-8 so we can optimize this case. >+String filenameToString(const char* filename) >+{ >+ if (!filename) >+ return String(); >+ >+#if OS(WINDOWS) >+ return String::fromUTF8(filename); >+#else >+ GOwnPtr<gchar> escapedString(g_uri_escape_string(filename, "/:", false)); >+ return escapedString.get(); >+#endif >+} >+ >+CString fileSystemRepresentation(const String& path) >+{ >+#if OS(WINDOWS) >+ return path.utf8(); >+#else >+ GOwnPtr<gchar> filename(g_uri_unescape_string(path.utf8().data(), 0)); >+ return filename.get(); >+#endif >+} >+ >+// Converts a string to something suitable to be displayed to the user. >+String filenameForDisplay(const String& string) >+{ >+#if OS(WINDOWS) >+ return string; >+#else >+ CString filename = fileSystemRepresentation(string); >+ GOwnPtr<gchar> display(g_filename_to_utf8(filename.data(), 0, 0, 0, 0)); >+ if (!display) >+ return string; >+ >+ return String::fromUTF8(display.get()); >+#endif >+} >+ >+bool fileExists(const String& path) >+{ >+ bool result = false; >+ CString filename = fileSystemRepresentation(path); >+ >+ if (!filename.isNull()) >+ result = g_file_test(filename.data(), G_FILE_TEST_EXISTS); >+ >+ return result; >+} >+ >+bool deleteFile(const String& path) >+{ >+ bool result = false; >+ CString filename = fileSystemRepresentation(path); >+ >+ if (!filename.isNull()) >+ result = !g_remove(filename.data()); >+ >+ return result; >+} >+ >+bool deleteEmptyDirectory(const String& path) >+{ >+ bool result = false; >+ CString filename = fileSystemRepresentation(path); >+ >+ if (!filename.isNull()) >+ result = !g_rmdir(filename.data()); >+ >+ return result; >+} >+ >+bool getFileSize(const String& path, long long& resultSize) >+{ >+ CString filename = fileSystemRepresentation(path); >+ if (filename.isNull()) >+ return false; >+ >+ GStatBuf statResult; >+ gint result = g_stat(filename.data(), &statResult); >+ if (result) >+ return false; >+ >+ resultSize = statResult.st_size; >+ return true; >+} >+ >+bool getFileModificationTime(const String& path, time_t& modifiedTime) >+{ >+ CString filename = fileSystemRepresentation(path); >+ if (filename.isNull()) >+ return false; >+ >+ GStatBuf statResult; >+ gint result = g_stat(filename.data(), &statResult); >+ if (result) >+ return false; >+ >+ modifiedTime = statResult.st_mtime; >+ return true; >+ >+} >+ >+bool getFileMetadata(const String& path, FileMetadata& metadata) >+{ >+ CString filename = fileSystemRepresentation(path); >+ if (filename.isNull()) >+ return false; >+ >+ struct stat statResult; >+ gint result = g_stat(filename.data(), &statResult); >+ if (result) >+ return false; >+ >+ metadata.modificationTime = statResult.st_mtime; >+ metadata.length = statResult.st_size; >+ metadata.type = S_ISDIR(statResult.st_mode) ? FileMetadata::TypeDirectory : FileMetadata::TypeFile; >+ return true; >+ >+} >+ >+String pathByAppendingComponent(const String& path, const String& component) >+{ >+ if (path.endsWith(G_DIR_SEPARATOR_S)) >+ return path + component; >+ return path + G_DIR_SEPARATOR_S + component; >+} >+ >+bool makeAllDirectories(const String& path) >+{ >+ CString filename = fileSystemRepresentation(path); >+ if (filename.isNull()) >+ return false; >+ >+ gint result = g_mkdir_with_parents(filename.data(), S_IRWXU); >+ >+ return !result; >+} >+ >+String homeDirectoryPath() >+{ >+ return filenameToString(g_get_home_dir()); >+} >+ >+String pathGetFileName(const String& pathName) >+{ >+ if (pathName.isEmpty()) >+ return pathName; >+ >+ CString tmpFilename = fileSystemRepresentation(pathName); >+ GOwnPtr<gchar> baseName(g_path_get_basename(tmpFilename.data())); >+ return String::fromUTF8(baseName.get()); >+} >+ >+CString applicationDirectoryPath() >+{ >+ CString path = getCurrentExecutablePath(); >+ if (!path.isNull()) >+ return path; >+ >+ // If the above fails, check the PATH env variable. >+ GOwnPtr<char> currentExePath(g_find_program_in_path(g_get_prgname())); >+ if (!currentExePath.get()) >+ return CString(); >+ >+ GOwnPtr<char> dirname(g_path_get_dirname(currentExePath.get())); >+ return dirname.get(); >+} >+ >+CString sharedResourcesPath() >+{ >+ static CString cachedPath; >+ if (!cachedPath.isNull()) >+ return cachedPath; >+ >+#if OS(WINDOWS) >+ HMODULE hmodule = 0; >+ GetModuleHandleExA(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, reinterpret_cast<char*>(sharedResourcesPath), &hmodule); >+ >+ GOwnPtr<gchar> runtimeDir(g_win32_get_package_installation_directory_of_module(hmodule)); >+ GOwnPtr<gchar> dataPath(g_build_filename(runtimeDir.get(), "share", "webkitgtk-"WEBKITGTK_API_VERSION_STRING, NULL)); >+#else >+ >+#if PLATFORM(GTK) >+ GOwnPtr<gchar> dataPath(g_build_filename(DATA_DIR, "webkitgtk-" WEBKITGTK_API_VERSION_STRING, NULL)); >+#elif PLATFORM(NIX) >+ GOwnPtr<gchar> dataPath(g_build_filename(DATA_DIR, "webkitnix", NULL)); >+#endif >+ >+#endif >+ >+ cachedPath = dataPath.get(); >+ return cachedPath; >+} >+ >+uint64_t getVolumeFreeSizeForPath(const char* path) >+{ >+ GRefPtr<GFile> file = adoptGRef(g_file_new_for_path(path)); >+ GRefPtr<GFileInfo> fileInfo = adoptGRef(g_file_query_filesystem_info(file.get(), G_FILE_ATTRIBUTE_FILESYSTEM_FREE, 0, 0)); >+ if (!fileInfo) >+ return 0; >+ >+ return g_file_info_get_attribute_uint64(fileInfo.get(), G_FILE_ATTRIBUTE_FILESYSTEM_FREE); >+} >+ >+String directoryName(const String& path) >+{ >+ // No null checking needed >+ GOwnPtr<char> dirname(g_path_get_dirname(fileSystemRepresentation(path).data())); >+ return String::fromUTF8(dirname.get()); >+} >+ >+Vector<String> listDirectory(const String& path, const String& filter) >+{ >+ Vector<String> entries; >+ >+ CString filename = fileSystemRepresentation(path); >+ GDir* dir = g_dir_open(filename.data(), 0, 0); >+ if (!dir) >+ return entries; >+ >+ GPatternSpec* pspec = g_pattern_spec_new((filter.utf8()).data()); >+ while (const char* name = g_dir_read_name(dir)) { >+ if (!g_pattern_match_string(pspec, name)) >+ continue; >+ >+ GOwnPtr<gchar> entry(g_build_filename(filename.data(), name, NULL)); >+ entries.append(filenameToString(entry.get())); >+ } >+ g_pattern_spec_free(pspec); >+ g_dir_close(dir); >+ >+ return entries; >+} >+ >+String openTemporaryFile(const String& prefix, PlatformFileHandle& handle) >+{ >+ GOwnPtr<gchar> filename(g_strdup_printf("%s%s", prefix.utf8().data(), createCanonicalUUIDString().utf8().data())); >+ GOwnPtr<gchar> tempPath(g_build_filename(g_get_tmp_dir(), filename.get(), NULL)); >+ GRefPtr<GFile> file = adoptGRef(g_file_new_for_path(tempPath.get())); >+ >+ handle = g_file_create_readwrite(file.get(), G_FILE_CREATE_NONE, 0, 0); >+ if (!isHandleValid(handle)) >+ return String(); >+ return String::fromUTF8(tempPath.get()); >+} >+ >+PlatformFileHandle openFile(const String& path, FileOpenMode mode) >+{ >+ CString fsRep = fileSystemRepresentation(path); >+ if (fsRep.isNull()) >+ return invalidPlatformFileHandle; >+ >+ GRefPtr<GFile> file = adoptGRef(g_file_new_for_path(fsRep.data())); >+ GFileIOStream* ioStream = 0; >+ if (mode == OpenForRead) >+ ioStream = g_file_open_readwrite(file.get(), 0, 0); >+ else if (mode == OpenForWrite) { >+ if (g_file_test(fsRep.data(), static_cast<GFileTest>(G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))) >+ ioStream = g_file_open_readwrite(file.get(), 0, 0); >+ else >+ ioStream = g_file_create_readwrite(file.get(), G_FILE_CREATE_NONE, 0, 0); >+ } >+ >+ return ioStream; >+} >+ >+void closeFile(PlatformFileHandle& handle) >+{ >+ if (!isHandleValid(handle)) >+ return; >+ >+ g_io_stream_close(G_IO_STREAM(handle), 0, 0); >+ g_object_unref(handle); >+ handle = invalidPlatformFileHandle; >+} >+ >+long long seekFile(PlatformFileHandle handle, long long offset, FileSeekOrigin origin) >+{ >+ GSeekType seekType = G_SEEK_SET; >+ switch (origin) { >+ case SeekFromBeginning: >+ seekType = G_SEEK_SET; >+ break; >+ case SeekFromCurrent: >+ seekType = G_SEEK_CUR; >+ break; >+ case SeekFromEnd: >+ seekType = G_SEEK_END; >+ break; >+ default: >+ ASSERT_NOT_REACHED(); >+ } >+ >+ if (!g_seekable_seek(G_SEEKABLE(g_io_stream_get_input_stream(G_IO_STREAM(handle))), offset, seekType, 0, 0)) >+ return -1; >+ return g_seekable_tell(G_SEEKABLE(g_io_stream_get_input_stream(G_IO_STREAM(handle)))); >+} >+ >+int writeToFile(PlatformFileHandle handle, const char* data, int length) >+{ >+ gsize bytesWritten; >+ g_output_stream_write_all(g_io_stream_get_output_stream(G_IO_STREAM(handle)), data, length, &bytesWritten, 0, 0); >+ return bytesWritten; >+} >+ >+int readFromFile(PlatformFileHandle handle, char* data, int length) >+{ >+ GOwnPtr<GError> error; >+ do { >+ gssize bytesRead = g_input_stream_read(g_io_stream_get_input_stream(G_IO_STREAM(handle)), data, length, 0, &error.outPtr()); >+ if (bytesRead >= 0) >+ return bytesRead; >+ } while (error && error->code == G_FILE_ERROR_INTR); >+ return -1; >+} >+ >+bool unloadModule(PlatformModule module) >+{ >+#if OS(WINDOWS) >+ return ::FreeLibrary(module); >+#else >+ return g_module_close(module); >+#endif >+} >+} >diff --git a/Source/WebCore/platform/glib/MIMETypeRegistryGLib.cpp b/Source/WebCore/platform/glib/MIMETypeRegistryGLib.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..62aea0ed5e38528a2ddf3c4d51ab4668e93d6887 >--- /dev/null >+++ b/Source/WebCore/platform/glib/MIMETypeRegistryGLib.cpp >@@ -0,0 +1,69 @@ >+/* >+ * Copyright (C) 2006 Zack Rusin <zack@kde.org> >+ * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. >+ * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) >+ * Copyright (C) 2008 Torch Mobile Inc. http://www.torchmobile.com/ >+ * 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 "MIMETypeRegistry.h" >+ >+#include <wtf/Assertions.h> >+#include <wtf/MainThread.h> >+ >+namespace WebCore { >+ >+struct ExtensionMap { >+ const char* extension; >+ const char* mimeType; >+}; >+ >+static const ExtensionMap extensionMap[] = { >+ { 0, 0 } >+}; >+ >+String MIMETypeRegistry::getMIMETypeForExtension(const String &ext) >+{ >+ ASSERT(isMainThread()); >+ >+ String s = ext.lower(); >+ const ExtensionMap *e = extensionMap; >+ while (e->extension) { >+ if (s == e->extension) >+ return e->mimeType; >+ ++e; >+ } >+ >+ return String(); >+} >+ >+bool MIMETypeRegistry::isApplicationPluginMIMEType(const String&) >+{ >+ return false; >+} >+ >+} >diff --git a/Source/WebCore/platform/glib/RunLoopGLib.cpp b/Source/WebCore/platform/glib/RunLoopGLib.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..071b6795a03a5f2fa1d40ee6f03ae0e280b722d5 >--- /dev/null >+++ b/Source/WebCore/platform/glib/RunLoopGLib.cpp >@@ -0,0 +1,170 @@ >+/* >+ * Copyright (C) 2010 Apple Inc. All rights reserved. >+ * Portions Copyright (c) 2010 Motorola Mobility, 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 "RunLoop.h" >+ >+#include <glib.h> >+ >+#include <wtf/MainThread.h> >+ >+namespace WebCore { >+ >+RunLoop::RunLoop() >+{ >+ // g_main_context_default() doesn't add an extra reference. >+ m_runLoopContext = isMainThread() ? g_main_context_default() : adoptGRef(g_main_context_new()); >+ ASSERT(m_runLoopContext); >+ GRefPtr<GMainLoop> innermostLoop = adoptGRef(g_main_loop_new(m_runLoopContext.get(), FALSE)); >+ ASSERT(innermostLoop); >+ m_runLoopMainLoops.append(innermostLoop); >+} >+ >+RunLoop::~RunLoop() >+{ >+ for (int i = m_runLoopMainLoops.size() - 1; i >= 0; --i) { >+ if (!g_main_loop_is_running(m_runLoopMainLoops[i].get())) >+ continue; >+ g_main_loop_quit(m_runLoopMainLoops[i].get()); >+ } >+} >+ >+void RunLoop::run() >+{ >+ RunLoop* mainRunLoop = RunLoop::current(); >+ GMainLoop* innermostLoop = mainRunLoop->innermostLoop(); >+ if (!g_main_loop_is_running(innermostLoop)) { >+ g_main_loop_run(innermostLoop); >+ return; >+ } >+ >+ // Create and run a nested loop if the innermost one was already running. >+ GMainLoop* nestedMainLoop = g_main_loop_new(0, FALSE); >+ mainRunLoop->pushNestedMainLoop(nestedMainLoop); >+ g_main_loop_run(nestedMainLoop); >+ mainRunLoop->popNestedMainLoop(); >+} >+ >+GMainLoop* RunLoop::innermostLoop() >+{ >+ // The innermost main loop should always be there. >+ ASSERT(!m_runLoopMainLoops.isEmpty()); >+ return m_runLoopMainLoops[0].get(); >+} >+ >+void RunLoop::pushNestedMainLoop(GMainLoop* nestedLoop) >+{ >+ // The innermost main loop should always be there. >+ ASSERT(!m_runLoopMainLoops.isEmpty()); >+ m_runLoopMainLoops.append(adoptGRef(nestedLoop)); >+} >+ >+void RunLoop::popNestedMainLoop() >+{ >+ // The innermost main loop should always be there. >+ ASSERT(!m_runLoopMainLoops.isEmpty()); >+ m_runLoopMainLoops.removeLast(); >+} >+ >+void RunLoop::stop() >+{ >+ // The innermost main loop should always be there. >+ ASSERT(!m_runLoopMainLoops.isEmpty()); >+ GRefPtr<GMainLoop> lastMainLoop = m_runLoopMainLoops.last(); >+ if (g_main_loop_is_running(lastMainLoop.get())) >+ g_main_loop_quit(lastMainLoop.get()); >+} >+ >+gboolean RunLoop::queueWork(RunLoop* runLoop) >+{ >+ runLoop->performWork(); >+ return FALSE; >+} >+ >+void RunLoop::wakeUp() >+{ >+ GRefPtr<GSource> source = adoptGRef(g_idle_source_new()); >+ g_source_set_priority(source.get(), G_PRIORITY_DEFAULT); >+ g_source_set_callback(source.get(), reinterpret_cast<GSourceFunc>(&RunLoop::queueWork), this, 0); >+ g_source_attach(source.get(), m_runLoopContext.get()); >+ >+ g_main_context_wakeup(m_runLoopContext.get()); >+} >+ >+RunLoop::TimerBase::TimerBase(RunLoop* runLoop) >+ : m_runLoop(runLoop) >+ , m_timerSource(0) >+{ >+} >+ >+RunLoop::TimerBase::~TimerBase() >+{ >+ stop(); >+} >+ >+void RunLoop::TimerBase::clearTimerSource() >+{ >+ m_timerSource = 0; >+} >+ >+gboolean RunLoop::TimerBase::timerFiredCallback(RunLoop::TimerBase* timer) >+{ >+ GSource* currentTimerSource = timer->m_timerSource.get(); >+ bool isRepeating = timer->isRepeating(); >+ // This can change the timerSource by starting a new timer within the callback. >+ if (!isRepeating && currentTimerSource == timer->m_timerSource.get()) >+ timer->clearTimerSource(); >+ >+ timer->fired(); >+ return isRepeating; >+} >+ >+void RunLoop::TimerBase::start(double fireInterval, bool repeat) >+{ >+ if (m_timerSource) >+ stop(); >+ >+ m_timerSource = adoptGRef(g_timeout_source_new(static_cast<guint>(fireInterval * 1000))); >+ m_isRepeating = repeat; >+ g_source_set_callback(m_timerSource.get(), reinterpret_cast<GSourceFunc>(&RunLoop::TimerBase::timerFiredCallback), this, 0); >+ g_source_attach(m_timerSource.get(), m_runLoop->m_runLoopContext.get()); >+} >+ >+void RunLoop::TimerBase::stop() >+{ >+ if (!m_timerSource) >+ return; >+ >+ g_source_destroy(m_timerSource.get()); >+ clearTimerSource(); >+} >+ >+bool RunLoop::TimerBase::isActive() const >+{ >+ return m_timerSource; >+} >+ >+} // namespace WebCore >diff --git a/Source/WebCore/platform/glib/SharedTimerGLib.cpp b/Source/WebCore/platform/glib/SharedTimerGLib.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..aa5b187cd102b2271dd8b8f33dd4242e18cabbab >--- /dev/null >+++ b/Source/WebCore/platform/glib/SharedTimerGLib.cpp >@@ -0,0 +1,73 @@ >+/* >+ * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. >+ * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com >+ * 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 "SharedTimer.h" >+ >+#define GDK_PRIORITY_REDRAW (G_PRIORITY_HIGH_IDLE + 20) >+#include <glib.h> >+#include <wtf/Assertions.h> >+#include <wtf/CurrentTime.h> >+ >+namespace WebCore { >+ >+static guint sharedTimer; >+static void (*sharedTimerFiredFunction)(); >+ >+void setSharedTimerFiredFunction(void (*f)()) >+{ >+ sharedTimerFiredFunction = f; >+} >+ >+static gboolean timeoutCallback(gpointer) >+{ >+ if (sharedTimerFiredFunction) >+ sharedTimerFiredFunction(); >+ return FALSE; >+} >+ >+void setSharedTimerFireInterval(double interval) >+{ >+ ASSERT(sharedTimerFiredFunction); >+ >+ guint intervalInMS = static_cast<guint>(interval * 1000); >+ >+ stopSharedTimer(); >+ sharedTimer = g_timeout_add_full(GDK_PRIORITY_REDRAW, intervalInMS, timeoutCallback, 0, 0); >+} >+ >+void stopSharedTimer() >+{ >+ if (!sharedTimer) >+ return; >+ >+ gboolean removedSource = g_source_remove(sharedTimer); >+ ASSERT_UNUSED(removedSource, removedSource); >+ sharedTimer = 0; >+} >+ >+} >diff --git a/Source/WebCore/platform/glib/TemporaryLinkStubs.cpp b/Source/WebCore/platform/glib/TemporaryLinkStubs.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..9e431ce15ce78f657b8d4cac26b6007759e2e7bb >--- /dev/null >+++ b/Source/WebCore/platform/glib/TemporaryLinkStubs.cpp >@@ -0,0 +1,55 @@ >+/* >+ * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. >+ * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com >+ * 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 "KURL.h" >+#include "NotImplemented.h" >+#include <float.h> >+ >+// Completely empty stubs (mostly to allow DRT to run) >+ >+namespace WebCore { >+ >+void getSupportedKeySizes(Vector<String>&) >+{ >+ notImplemented(); >+} >+ >+String signedPublicKeyAndChallengeString(unsigned, const String&, const KURL&) >+{ >+ return String(); >+} >+ >+float userIdleTime() >+{ >+ // Return an arbitrarily high userIdleTime so that releasing pages from the page cache isn't postponed. >+ notImplemented(); >+ return FLT_MAX; >+} >+ >+} >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..d9707c1f6bf2f35e9e6d7ebfccc6261b87bf15ac >--- /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 String("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..c25610c7e9de0fc2e82d8444853bc3e77bf8deba >--- /dev/null >+++ b/Source/WebCore/platform/nix/NixKeyboardUtilities.h >@@ -0,0 +1,45 @@ >+/* >+ * 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 WTF { >+class String; >+} >+ >+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