[PlayStation] Enable WebCore
authordon.olmstead@sony.com <don.olmstead@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Dec 2018 23:25:47 +0000 (23:25 +0000)
committerdon.olmstead@sony.com <don.olmstead@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Dec 2018 23:25:47 +0000 (23:25 +0000)
https://bugs.webkit.org/show_bug.cgi?id=192384

Reviewed by Brent Fulgham.

.:

Adds CMake options for building WebCore on PlayStation.

* Source/cmake/FindLibPSL.cmake:
* Source/cmake/FindNghttp2.cmake: Copied from Source/cmake/FindWPE.cmake.
* Source/cmake/FindPixman.cmake: Added.
* Source/cmake/FindWPE.cmake:
* Source/cmake/OptionsPlayStation.cmake:

Source/WebCore:

Implements WebCore for the PlayStation platform.

* PlatformPlayStation.cmake: Added.
* loader/cache/CachedResourceLoader.cpp:
* platform/generic/KeyedDecoderGeneric.cpp: Added.
(WebCore::KeyedDecoder::decoder):
(WebCore::KeyedDecoderGeneric::KeyedDecoderGeneric):
(WebCore::KeyedDecoderGeneric::~KeyedDecoderGeneric):
(WebCore::KeyedDecoderGeneric::decodeBytes):
(WebCore::KeyedDecoderGeneric::decodeBool):
(WebCore::KeyedDecoderGeneric::decodeUInt32):
(WebCore::KeyedDecoderGeneric::decodeUInt64):
(WebCore::KeyedDecoderGeneric::decodeInt32):
(WebCore::KeyedDecoderGeneric::decodeInt64):
(WebCore::KeyedDecoderGeneric::decodeFloat):
(WebCore::KeyedDecoderGeneric::decodeDouble):
(WebCore::KeyedDecoderGeneric::decodeString):
(WebCore::KeyedDecoderGeneric::beginObject):
(WebCore::KeyedDecoderGeneric::endObject):
(WebCore::KeyedDecoderGeneric::beginArray):
(WebCore::KeyedDecoderGeneric::beginArrayElement):
(WebCore::KeyedDecoderGeneric::endArrayElement):
(WebCore::KeyedDecoderGeneric::endArray):
* platform/generic/KeyedDecoderGeneric.h: Added.
* platform/generic/KeyedEncoderGeneric.cpp: Added.
(WebCore::KeyedEncoder::encoder):
(WebCore::KeyedEncoderGeneric::KeyedEncoderGeneric):
(WebCore::KeyedEncoderGeneric::~KeyedEncoderGeneric):
(WebCore::KeyedEncoderGeneric::encodeBytes):
(WebCore::KeyedEncoderGeneric::encodeBool):
(WebCore::KeyedEncoderGeneric::encodeUInt32):
(WebCore::KeyedEncoderGeneric::encodeUInt64):
(WebCore::KeyedEncoderGeneric::encodeInt32):
(WebCore::KeyedEncoderGeneric::encodeInt64):
(WebCore::KeyedEncoderGeneric::encodeFloat):
(WebCore::KeyedEncoderGeneric::encodeDouble):
(WebCore::KeyedEncoderGeneric::encodeString):
(WebCore::KeyedEncoderGeneric::beginObject):
(WebCore::KeyedEncoderGeneric::endObject):
(WebCore::KeyedEncoderGeneric::beginArray):
(WebCore::KeyedEncoderGeneric::beginArrayElement):
(WebCore::KeyedEncoderGeneric::endArrayElement):
(WebCore::KeyedEncoderGeneric::endArray):
(WebCore::KeyedEncoderGeneric::finishEncoding):
* platform/generic/KeyedEncoderGeneric.h: Added.
* platform/network/curl/NetworkStorageSessionCurl.cpp:
(WebCore::defaultCookieJarPath):
* platform/network/playstation/CurlSSLHandlePlayStation.cpp: Added.
(WebCore::getCACertPathEnv):
(WebCore::CurlSSLHandle::platformInitialize):
* platform/network/playstation/NetworkStateNotifierPlayStation.cpp: Added.
(WebCore::NetworkStateNotifier::updateStateWithoutNotifying):
(WebCore::NetworkStateNotifier::startObserving):
* platform/playstation/EventLoopPlayStation.cpp: Added.
(WebCore::EventLoop::cycle):
* platform/playstation/MIMETypeRegistryPlayStation.cpp: Added.
(WebCore::MIMETypeRegistry::getMIMETypeForExtension):
(WebCore::MIMETypeRegistry::isApplicationPluginMIMEType):
(WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
* platform/playstation/PlatformScreenPlayStation.cpp: Added.
(WebCore::screenDepth):
(WebCore::screenDepthPerComponent):
(WebCore::screenIsMonochrome):
(WebCore::screenHasInvertedColors):
(WebCore::screenRect):
(WebCore::screenAvailableRect):
(WebCore::screenSupportsExtendedColor):
* platform/playstation/ScrollbarThemePlayStation.cpp: Added.
(WebCore::ScrollbarTheme::nativeTheme):
(WebCore::ScrollbarThemePlayStation::scrollbarThickness):
(WebCore::ScrollbarThemePlayStation::hasButtons):
(WebCore::ScrollbarThemePlayStation::hasThumb):
(WebCore::ScrollbarThemePlayStation::backButtonRect):
(WebCore::ScrollbarThemePlayStation::forwardButtonRect):
(WebCore::ScrollbarThemePlayStation::trackRect):
(WebCore::ScrollbarThemePlayStation::paintTrackBackground):
(WebCore::ScrollbarThemePlayStation::paintThumb):
* platform/playstation/ScrollbarThemePlayStation.h: Added.
* platform/playstation/UserAgentPlayStation.cpp: Added.
(WebCore::standardUserAgent):
(WebCore::standardUserAgentForURL):
* rendering/RenderThemePlayStation.cpp: Added.
(WebCore::RenderTheme::singleton):
(WebCore::RenderThemePlayStation::updateCachedSystemFontDescription const):
* rendering/RenderThemePlayStation.h: Added.

Source/WebCore/PAL:

Implements PAL for the PlayStation platform.

* pal/PlatformPlayStation.cmake: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238913 268f45cc-cd09-0410-ab3c-d52691b4dbfc

26 files changed:
ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/pal/PlatformPlayStation.cmake [new file with mode: 0644]
Source/WebCore/PlatformPlayStation.cmake [new file with mode: 0644]
Source/WebCore/loader/cache/CachedResourceLoader.cpp
Source/WebCore/platform/generic/KeyedDecoderGeneric.cpp [new file with mode: 0644]
Source/WebCore/platform/generic/KeyedDecoderGeneric.h [new file with mode: 0644]
Source/WebCore/platform/generic/KeyedEncoderGeneric.cpp [new file with mode: 0644]
Source/WebCore/platform/generic/KeyedEncoderGeneric.h [new file with mode: 0644]
Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp
Source/WebCore/platform/network/playstation/CurlSSLHandlePlayStation.cpp [new file with mode: 0644]
Source/WebCore/platform/network/playstation/NetworkStateNotifierPlayStation.cpp [new file with mode: 0644]
Source/WebCore/platform/playstation/EventLoopPlayStation.cpp [new file with mode: 0644]
Source/WebCore/platform/playstation/MIMETypeRegistryPlayStation.cpp [new file with mode: 0644]
Source/WebCore/platform/playstation/PlatformScreenPlayStation.cpp [new file with mode: 0644]
Source/WebCore/platform/playstation/ScrollbarThemePlayStation.cpp [new file with mode: 0644]
Source/WebCore/platform/playstation/ScrollbarThemePlayStation.h [new file with mode: 0644]
Source/WebCore/platform/playstation/UserAgentPlayStation.cpp [new file with mode: 0644]
Source/WebCore/rendering/RenderThemePlayStation.cpp [new file with mode: 0644]
Source/WebCore/rendering/RenderThemePlayStation.h [new file with mode: 0644]
Source/cmake/FindLibPSL.cmake
Source/cmake/FindNghttp2.cmake [new file with mode: 0644]
Source/cmake/FindPixman.cmake [new file with mode: 0644]
Source/cmake/FindWPE.cmake
Source/cmake/OptionsPlayStation.cmake

index 2d0046f..3efe875 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2018-12-05  Don Olmstead  <don.olmstead@sony.com>
+
+        [PlayStation] Enable WebCore
+        https://bugs.webkit.org/show_bug.cgi?id=192384
+
+        Reviewed by Brent Fulgham.
+
+        Adds CMake options for building WebCore on PlayStation.
+
+        * Source/cmake/FindLibPSL.cmake:
+        * Source/cmake/FindNghttp2.cmake: Copied from Source/cmake/FindWPE.cmake.
+        * Source/cmake/FindPixman.cmake: Added.
+        * Source/cmake/FindWPE.cmake:
+        * Source/cmake/OptionsPlayStation.cmake:
+
 2018-12-04  Carlos Eduardo Ramalho  <cadubentzen@gmail.com>
 
         [WPE] Add gtk-doc
index 09db9d3..d3e4d46 100644 (file)
@@ -1,3 +1,96 @@
+2018-12-05  Don Olmstead  <don.olmstead@sony.com>
+
+        [PlayStation] Enable WebCore
+        https://bugs.webkit.org/show_bug.cgi?id=192384
+
+        Reviewed by Brent Fulgham.
+
+        Implements WebCore for the PlayStation platform.
+
+        * PlatformPlayStation.cmake: Added.
+        * loader/cache/CachedResourceLoader.cpp:
+        * platform/generic/KeyedDecoderGeneric.cpp: Added.
+        (WebCore::KeyedDecoder::decoder):
+        (WebCore::KeyedDecoderGeneric::KeyedDecoderGeneric):
+        (WebCore::KeyedDecoderGeneric::~KeyedDecoderGeneric):
+        (WebCore::KeyedDecoderGeneric::decodeBytes):
+        (WebCore::KeyedDecoderGeneric::decodeBool):
+        (WebCore::KeyedDecoderGeneric::decodeUInt32):
+        (WebCore::KeyedDecoderGeneric::decodeUInt64):
+        (WebCore::KeyedDecoderGeneric::decodeInt32):
+        (WebCore::KeyedDecoderGeneric::decodeInt64):
+        (WebCore::KeyedDecoderGeneric::decodeFloat):
+        (WebCore::KeyedDecoderGeneric::decodeDouble):
+        (WebCore::KeyedDecoderGeneric::decodeString):
+        (WebCore::KeyedDecoderGeneric::beginObject):
+        (WebCore::KeyedDecoderGeneric::endObject):
+        (WebCore::KeyedDecoderGeneric::beginArray):
+        (WebCore::KeyedDecoderGeneric::beginArrayElement):
+        (WebCore::KeyedDecoderGeneric::endArrayElement):
+        (WebCore::KeyedDecoderGeneric::endArray):
+        * platform/generic/KeyedDecoderGeneric.h: Added.
+        * platform/generic/KeyedEncoderGeneric.cpp: Added.
+        (WebCore::KeyedEncoder::encoder):
+        (WebCore::KeyedEncoderGeneric::KeyedEncoderGeneric):
+        (WebCore::KeyedEncoderGeneric::~KeyedEncoderGeneric):
+        (WebCore::KeyedEncoderGeneric::encodeBytes):
+        (WebCore::KeyedEncoderGeneric::encodeBool):
+        (WebCore::KeyedEncoderGeneric::encodeUInt32):
+        (WebCore::KeyedEncoderGeneric::encodeUInt64):
+        (WebCore::KeyedEncoderGeneric::encodeInt32):
+        (WebCore::KeyedEncoderGeneric::encodeInt64):
+        (WebCore::KeyedEncoderGeneric::encodeFloat):
+        (WebCore::KeyedEncoderGeneric::encodeDouble):
+        (WebCore::KeyedEncoderGeneric::encodeString):
+        (WebCore::KeyedEncoderGeneric::beginObject):
+        (WebCore::KeyedEncoderGeneric::endObject):
+        (WebCore::KeyedEncoderGeneric::beginArray):
+        (WebCore::KeyedEncoderGeneric::beginArrayElement):
+        (WebCore::KeyedEncoderGeneric::endArrayElement):
+        (WebCore::KeyedEncoderGeneric::endArray):
+        (WebCore::KeyedEncoderGeneric::finishEncoding):
+        * platform/generic/KeyedEncoderGeneric.h: Added.
+        * platform/network/curl/NetworkStorageSessionCurl.cpp:
+        (WebCore::defaultCookieJarPath):
+        * platform/network/playstation/CurlSSLHandlePlayStation.cpp: Added.
+        (WebCore::getCACertPathEnv):
+        (WebCore::CurlSSLHandle::platformInitialize):
+        * platform/network/playstation/NetworkStateNotifierPlayStation.cpp: Added.
+        (WebCore::NetworkStateNotifier::updateStateWithoutNotifying):
+        (WebCore::NetworkStateNotifier::startObserving):
+        * platform/playstation/EventLoopPlayStation.cpp: Added.
+        (WebCore::EventLoop::cycle):
+        * platform/playstation/MIMETypeRegistryPlayStation.cpp: Added.
+        (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
+        (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType):
+        (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
+        * platform/playstation/PlatformScreenPlayStation.cpp: Added.
+        (WebCore::screenDepth):
+        (WebCore::screenDepthPerComponent):
+        (WebCore::screenIsMonochrome):
+        (WebCore::screenHasInvertedColors):
+        (WebCore::screenRect):
+        (WebCore::screenAvailableRect):
+        (WebCore::screenSupportsExtendedColor):
+        * platform/playstation/ScrollbarThemePlayStation.cpp: Added.
+        (WebCore::ScrollbarTheme::nativeTheme):
+        (WebCore::ScrollbarThemePlayStation::scrollbarThickness):
+        (WebCore::ScrollbarThemePlayStation::hasButtons):
+        (WebCore::ScrollbarThemePlayStation::hasThumb):
+        (WebCore::ScrollbarThemePlayStation::backButtonRect):
+        (WebCore::ScrollbarThemePlayStation::forwardButtonRect):
+        (WebCore::ScrollbarThemePlayStation::trackRect):
+        (WebCore::ScrollbarThemePlayStation::paintTrackBackground):
+        (WebCore::ScrollbarThemePlayStation::paintThumb):
+        * platform/playstation/ScrollbarThemePlayStation.h: Added.
+        * platform/playstation/UserAgentPlayStation.cpp: Added.
+        (WebCore::standardUserAgent):
+        (WebCore::standardUserAgentForURL):
+        * rendering/RenderThemePlayStation.cpp: Added.
+        (WebCore::RenderTheme::singleton):
+        (WebCore::RenderThemePlayStation::updateCachedSystemFontDescription const):
+        * rendering/RenderThemePlayStation.h: Added.
+
 2018-12-05  Ryosuke Niwa  <rniwa@webkit.org>
 
         Null pointer crash in DocumentOrderedMap::getElementById via FormAssociatedElement::findAssociatedForm
index c5bdd16..d2f77e2 100644 (file)
@@ -1,3 +1,14 @@
+2018-12-05  Don Olmstead  <don.olmstead@sony.com>
+
+        [PlayStation] Enable WebCore
+        https://bugs.webkit.org/show_bug.cgi?id=192384
+
+        Reviewed by Brent Fulgham.
+
+        Implements PAL for the PlayStation platform.
+
+        * pal/PlatformPlayStation.cmake: Added.
+
 2018-12-02  Zalan Bujtas  <zalan@apple.com>
 
         Add a runtime feature flag for LayoutFormattingContext.
diff --git a/Source/WebCore/PAL/pal/PlatformPlayStation.cmake b/Source/WebCore/PAL/pal/PlatformPlayStation.cmake
new file mode 100644 (file)
index 0000000..610c798
--- /dev/null
@@ -0,0 +1,14 @@
+list(APPEND PAL_SOURCES
+    crypto/openssl/CryptoDigestOpenSSL.cpp
+
+    system/ClockGeneric.cpp
+    system/Sound.cpp
+
+    text/KillRing.cpp
+
+    unix/LoggingUnix.cpp
+)
+
+list(APPEND PAL_SYSTEM_INCLUDE_DIRECTORIES ${OPENSSL_INCLUDE_DIR})
+
+list(APPEND PAL_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY})
diff --git a/Source/WebCore/PlatformPlayStation.cmake b/Source/WebCore/PlatformPlayStation.cmake
new file mode 100644 (file)
index 0000000..184363f
--- /dev/null
@@ -0,0 +1,100 @@
+include(platform/Cairo.cmake)
+include(platform/Curl.cmake)
+include(platform/FreeType.cmake)
+include(platform/ImageDecoders.cmake)
+include(platform/TextureMapper.cmake)
+
+list(APPEND WebCore_INCLUDE_DIRECTORIES
+    ${THIRDPARTY_DIR}/ANGLE/
+    ${THIRDPARTY_DIR}/ANGLE/include/KHR
+    ${WEBCORE_DIR}/platform
+    ${WEBCORE_DIR}/platform/generic
+    ${WEBCORE_DIR}/platform/graphics/egl
+    ${WEBCORE_DIR}/platform/graphics/opengl
+    ${WEBCORE_DIR}/platform/graphics/libwpe
+    ${WEBCORE_DIR}/platform/mediacapabilities
+)
+
+list(APPEND WebCore_SOURCES
+    editing/libwpe/EditorLibWPE.cpp
+
+    page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp
+    page/scrolling/coordinatedgraphics/ScrollingStateNodeCoordinatedGraphics.cpp
+    page/scrolling/coordinatedgraphics/ScrollingTreeCoordinatedGraphics.cpp
+    page/scrolling/coordinatedgraphics/ScrollingTreeFixedNode.cpp
+    page/scrolling/coordinatedgraphics/ScrollingTreeFrameScrollingNodeCoordinatedGraphics.cpp
+    page/scrolling/coordinatedgraphics/ScrollingTreeStickyNode.cpp
+
+    page/scrolling/generic/ScrollingThreadGeneric.cpp
+
+    platform/ScrollAnimationKinetic.cpp
+    platform/ScrollAnimationSmooth.cpp
+    platform/UserAgentQuirks.cpp
+
+    platform/generic/KeyedDecoderGeneric.cpp
+    platform/generic/KeyedEncoderGeneric.cpp
+    platform/generic/ScrollAnimatorGeneric.cpp
+
+    platform/graphics/GLContext.cpp
+    platform/graphics/GraphicsContext3DPrivate.cpp
+    platform/graphics/PlatformDisplay.cpp
+
+    platform/graphics/egl/GLContextEGL.cpp
+    platform/graphics/egl/GLContextEGLLibWPE.cpp
+
+    platform/graphics/libwpe/PlatformDisplayLibWPE.cpp
+
+    platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
+    platform/graphics/opengl/Extensions3DOpenGLES.cpp
+    platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
+    platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp
+    platform/graphics/opengl/TemporaryOpenGLSetting.cpp
+
+    platform/libwpe/PasteboardLibWPE.cpp
+    platform/libwpe/PlatformKeyboardEventLibWPE.cpp
+    platform/libwpe/PlatformPasteboardLibWPE.cpp
+
+    platform/network/playstation/CurlSSLHandlePlayStation.cpp
+    platform/network/playstation/NetworkStateNotifierPlayStation.cpp
+
+    platform/playstation/EventLoopPlayStation.cpp
+    platform/playstation/MIMETypeRegistryPlayStation.cpp
+    platform/playstation/PlatformScreenPlayStation.cpp
+    platform/playstation/ScrollbarThemePlayStation.cpp
+    platform/playstation/UserAgentPlayStation.cpp
+
+    platform/posix/FileSystemPOSIX.cpp
+    platform/posix/SharedBufferPOSIX.cpp
+
+    platform/text/Hyphenation.cpp
+    platform/text/LocaleICU.cpp
+
+    platform/unix/LoggingUnix.cpp
+
+    rendering/RenderThemePlayStation.cpp
+)
+
+list(APPEND WebCore_USER_AGENT_STYLE_SHEETS
+    ${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsBase.css
+)
+
+set(WebCore_USER_AGENT_SCRIPTS
+    ${WEBCORE_DIR}/en.lproj/mediaControlsLocalizedStrings.js
+    ${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsBase.js
+)
+
+list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
+    ${ICU_INCLUDE_DIRS}
+    ${LIBXML2_INCLUDE_DIR}
+    ${SQLITE_INCLUDE_DIR}
+    ${ZLIB_INCLUDE_DIRS}
+    ${WPE_INCLUDE_DIRS}
+)
+
+list(APPEND WebCore_LIBRARIES
+    ${ICU_LIBRARIES}
+    ${LIBXML2_LIBRARIES}
+    ${SQLITE_LIBRARIES}
+    ${ZLIB_LIBRARIES}
+    ${WPE_LIBRARIES}
+)
index 7dc49b7..d3fedc8 100644 (file)
@@ -41,6 +41,7 @@
 #include "ContentExtensionError.h"
 #include "ContentExtensionRule.h"
 #include "ContentSecurityPolicy.h"
+#include "CrossOriginAccessControl.h"
 #include "DOMWindow.h"
 #include "DiagnosticLoggingClient.h"
 #include "DiagnosticLoggingKeys.h"
diff --git a/Source/WebCore/platform/generic/KeyedDecoderGeneric.cpp b/Source/WebCore/platform/generic/KeyedDecoderGeneric.cpp
new file mode 100644 (file)
index 0000000..ecdfeed
--- /dev/null
@@ -0,0 +1,117 @@
+/*
+ * Copyright (C) 2018 Sony Interactive Entertainment Inc.
+ *
+ * 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 "KeyedDecoderGeneric.h"
+
+namespace WebCore {
+
+// FIXME: https://bugs.webkit.org/show_bug.cgi?id=186410
+std::unique_ptr<KeyedDecoder> KeyedDecoder::decoder(const uint8_t* data, size_t size)
+{
+    return std::make_unique<KeyedDecoderGeneric>(data, size);
+}
+
+KeyedDecoderGeneric::KeyedDecoderGeneric(const uint8_t*, size_t)
+{
+}
+
+KeyedDecoderGeneric::~KeyedDecoderGeneric()
+{
+}
+
+bool KeyedDecoderGeneric::decodeBytes(const String&, const uint8_t*&, size_t&)
+{
+    return false;
+}
+
+bool KeyedDecoderGeneric::decodeBool(const String&, bool&)
+{
+    return false;
+}
+
+bool KeyedDecoderGeneric::decodeUInt32(const String&, uint32_t&)
+{
+    return false;
+}
+
+bool KeyedDecoderGeneric::decodeUInt64(const String&, uint64_t&)
+{
+    return false;
+}
+
+bool KeyedDecoderGeneric::decodeInt32(const String&, int32_t&)
+{
+    return false;
+}
+
+bool KeyedDecoderGeneric::decodeInt64(const String&, int64_t&)
+{
+    return false;
+}
+
+bool KeyedDecoderGeneric::decodeFloat(const String&, float&)
+{
+    return false;
+}
+
+bool KeyedDecoderGeneric::decodeDouble(const String&, double&)
+{
+    return false;
+}
+
+bool KeyedDecoderGeneric::decodeString(const String&, String&)
+{
+    return false;
+}
+
+bool KeyedDecoderGeneric::beginObject(const String&)
+{
+    return false;
+}
+
+void KeyedDecoderGeneric::endObject()
+{
+}
+
+bool KeyedDecoderGeneric::beginArray(const String&)
+{
+    return false;
+}
+
+bool KeyedDecoderGeneric::beginArrayElement()
+{
+    return false;
+}
+
+void KeyedDecoderGeneric::endArrayElement()
+{
+}
+
+void KeyedDecoderGeneric::endArray()
+{
+}
+
+} // namespace WebCore
diff --git a/Source/WebCore/platform/generic/KeyedDecoderGeneric.h b/Source/WebCore/platform/generic/KeyedDecoderGeneric.h
new file mode 100644 (file)
index 0000000..9b22b33
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2018 Sony Interactive Entertainment Inc.
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include "KeyedCoding.h"
+
+namespace WebCore {
+
+class KeyedDecoderGeneric final : public KeyedDecoder {
+public:
+    KeyedDecoderGeneric(const uint8_t* data, size_t);
+    ~KeyedDecoderGeneric() override;
+
+private:
+    bool decodeBytes(const String& key, const uint8_t*&, size_t&) override;
+    bool decodeBool(const String& key, bool&) override;
+    bool decodeUInt32(const String& key, uint32_t&) override;
+    bool decodeUInt64(const String& key, uint64_t&) override;
+    bool decodeInt32(const String& key, int32_t&) override;
+    bool decodeInt64(const String& key, int64_t&) override;
+    bool decodeFloat(const String& key, float&) override;
+    bool decodeDouble(const String& key, double&) override;
+    bool decodeString(const String& key, String&) override;
+
+    bool beginObject(const String& key) override;
+    void endObject() override;
+
+    bool beginArray(const String& key) override;
+    bool beginArrayElement() override;
+    void endArrayElement() override;
+    void endArray() override;
+};
+
+} // namespace WebCore
diff --git a/Source/WebCore/platform/generic/KeyedEncoderGeneric.cpp b/Source/WebCore/platform/generic/KeyedEncoderGeneric.cpp
new file mode 100644 (file)
index 0000000..09cf5c2
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ * Copyright (C) 2018 Sony Interactive Entertainment Inc.
+ *
+ * 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 "KeyedEncoderGeneric.h"
+
+#include "SharedBuffer.h"
+
+namespace WebCore {
+
+// FIXME: https://bugs.webkit.org/show_bug.cgi?id=186410
+std::unique_ptr<KeyedEncoder> KeyedEncoder::encoder()
+{
+    return std::make_unique<KeyedEncoderGeneric>();
+}
+
+KeyedEncoderGeneric::KeyedEncoderGeneric()
+{
+}
+
+KeyedEncoderGeneric::~KeyedEncoderGeneric()
+{
+}
+
+void KeyedEncoderGeneric::encodeBytes(const String&, const uint8_t*, size_t)
+{
+}
+
+void KeyedEncoderGeneric::encodeBool(const String&, bool)
+{
+}
+
+void KeyedEncoderGeneric::encodeUInt32(const String&, uint32_t)
+{
+}
+
+void KeyedEncoderGeneric::encodeUInt64(const String&, uint64_t)
+{
+}
+
+void KeyedEncoderGeneric::encodeInt32(const String&, int32_t)
+{
+}
+
+void KeyedEncoderGeneric::encodeInt64(const String&, int64_t)
+{
+}
+
+void KeyedEncoderGeneric::encodeFloat(const String&, float)
+{
+}
+
+void KeyedEncoderGeneric::encodeDouble(const String&, double)
+{
+}
+
+void KeyedEncoderGeneric::encodeString(const String&, const String&)
+{
+}
+
+void KeyedEncoderGeneric::beginObject(const String&)
+{
+}
+
+void KeyedEncoderGeneric::endObject()
+{
+}
+
+void KeyedEncoderGeneric::beginArray(const String&)
+{
+}
+
+void KeyedEncoderGeneric::beginArrayElement()
+{
+}
+
+void KeyedEncoderGeneric::endArrayElement()
+{
+}
+
+void KeyedEncoderGeneric::endArray()
+{
+}
+
+RefPtr<SharedBuffer> KeyedEncoderGeneric::finishEncoding()
+{
+    return nullptr;
+}
+
+} // namespace WebCore
diff --git a/Source/WebCore/platform/generic/KeyedEncoderGeneric.h b/Source/WebCore/platform/generic/KeyedEncoderGeneric.h
new file mode 100644 (file)
index 0000000..b8c5447
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2018 Sony Interactive Entertainment Inc.
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include "KeyedCoding.h"
+#include <wtf/Vector.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+class SharedBuffer;
+
+class KeyedEncoderGeneric final : public KeyedEncoder {
+public:
+    KeyedEncoderGeneric();
+    ~KeyedEncoderGeneric();
+
+private:
+    RefPtr<SharedBuffer> finishEncoding() override;
+
+    void encodeBytes(const String& key, const uint8_t*, size_t) override;
+    void encodeBool(const String& key, bool) override;
+    void encodeUInt32(const String& key, uint32_t) override;
+    void encodeUInt64(const String& key, uint64_t) override;
+    void encodeInt32(const String& key, int32_t) override;
+    void encodeInt64(const String& key, int64_t) override;
+    void encodeFloat(const String& key, float) override;
+    void encodeDouble(const String& key, double) override;
+    void encodeString(const String& key, const String&) override;
+
+    void beginObject(const String& key) override;
+    void endObject() override;
+
+    void beginArray(const String& key) override;
+    void beginArrayElement() override;
+    void endArrayElement() override;
+    void endArray() override;
+};
+
+} // namespace WebCore
index 247a527..25f1ec2 100644 (file)
@@ -51,7 +51,12 @@ static String defaultCookieJarPath()
     if (cookieJarPath)
         return cookieJarPath;
 
+#if PLATFORM(WIN)
     return FileSystem::pathByAppendingComponent(FileSystem::localUserSpecificStorageDirectory(), defaultFileName);
+#else
+    // FIXME: https://bugs.webkit.org/show_bug.cgi?id=192417
+    return defaultFileName;
+#endif
 }
 
 NetworkStorageSession::NetworkStorageSession(PAL::SessionID sessionID, NetworkingContext* context)
diff --git a/Source/WebCore/platform/network/playstation/CurlSSLHandlePlayStation.cpp b/Source/WebCore/platform/network/playstation/CurlSSLHandlePlayStation.cpp
new file mode 100644 (file)
index 0000000..3e1e287
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2018 Sony Interactive Entertainment Inc.
+ *
+ * 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 "CurlSSLHandle.h"
+
+namespace WebCore {
+
+static String getCACertPathEnv()
+{
+    char* envPath = getenv("CURL_CA_BUNDLE_PATH");
+    if (envPath)
+        return { envPath };
+
+    return emptyString();
+}
+
+void CurlSSLHandle::platformInitialize()
+{
+    auto caCertPath = getCACertPathEnv();
+    if (!caCertPath.isEmpty())
+        setCACertPath(WTFMove(caCertPath));
+}
+
+} // namespace WebCore
diff --git a/Source/WebCore/platform/network/playstation/NetworkStateNotifierPlayStation.cpp b/Source/WebCore/platform/network/playstation/NetworkStateNotifierPlayStation.cpp
new file mode 100644 (file)
index 0000000..acca8fc
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2018 Sony Interactive Entertainment Inc.
+ *
+ * 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 "NetworkStateNotifier.h"
+
+#include "NotImplemented.h"
+
+namespace WebCore {
+
+void NetworkStateNotifier::updateStateWithoutNotifying()
+{
+    notImplemented();
+}
+
+void NetworkStateNotifier::startObserving()
+{
+    notImplemented();
+}
+
+} // namespace WebCore
diff --git a/Source/WebCore/platform/playstation/EventLoopPlayStation.cpp b/Source/WebCore/platform/playstation/EventLoopPlayStation.cpp
new file mode 100644 (file)
index 0000000..d433fb1
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2018 Sony Interactive Entertainment Inc.
+ *
+ * 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 "EventLoop.h"
+
+#include <wtf/RunLoop.h>
+
+namespace WebCore {
+
+void EventLoop::cycle()
+{
+    RunLoop::iterate();
+}
+
+} // namespace WebCore
diff --git a/Source/WebCore/platform/playstation/MIMETypeRegistryPlayStation.cpp b/Source/WebCore/platform/playstation/MIMETypeRegistryPlayStation.cpp
new file mode 100644 (file)
index 0000000..132c43e
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2018 Sony Interactive Entertainment Inc.
+ *
+ * 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 "MIMETypeRegistry.h"
+
+namespace WebCore {
+
+struct TypeExtensionPair {
+    ASCIILiteral type;
+    ASCIILiteral extension;
+};
+
+const TypeExtensionPair commonMediaTypes[] = {
+    { "bmp"_s, "image/bmp"_s },
+    { "css"_s, "text/css"_s },
+    { "gif"_s, "image/gif"_s },
+    { "html"_s, "text/html"_s },
+    { "htm"_s, "text/html"_s },
+    { "ico"_s, "image/x-icon"_s },
+    { "jpeg"_s, "image/jpeg"_s },
+    { "jpg"_s, "image/jpeg"_s },
+    { "js"_s, "application/x-javascript"_s },
+    { "pdf"_s, "application/pdf"_s },
+    { "png"_s, "image/png"_s },
+    { "rss"_s, "application/rss+xml"_s },
+    { "svg"_s, "image/svg+xml"_s },
+    { "swf"_s, "application/x-shockwave-flash"_s },
+    { "text"_s, "text/plain"_s },
+    { "txt"_s, "text/plain"_s },
+    { "xbm"_s, "image/x-xbitmap"_s },
+    { "xml"_s, "text/xml"_s },
+    { "xsl"_s, "text/xsl"_s },
+    { "xhtml"_s, "application/xhtml+xml"_s },
+    { "wml"_s, "text/vnd.wap.wml"_s },
+    { "wmlc"_s, "application/vnd.wap.wmlc"_s },
+};
+
+String MIMETypeRegistry::getMIMETypeForExtension(const String& extension)
+{
+    for (auto& entry : commonMediaTypes) {
+        if (equalIgnoringASCIICase(extension, entry.extension.characters()))
+            return entry.type;
+    }
+    return emptyString();
+}
+
+bool MIMETypeRegistry::isApplicationPluginMIMEType(const String&)
+{
+    return false;
+}
+
+String MIMETypeRegistry::getPreferredExtensionForMIMEType(const String& mimeType)
+{
+    for (auto& entry : commonMediaTypes) {
+        if (equalIgnoringASCIICase(mimeType, entry.type.characters()))
+            return entry.extension;
+    }
+    return emptyString();
+}
+
+} // namespace WebCore
diff --git a/Source/WebCore/platform/playstation/PlatformScreenPlayStation.cpp b/Source/WebCore/platform/playstation/PlatformScreenPlayStation.cpp
new file mode 100644 (file)
index 0000000..8601d01
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2018 Sony Interactive Entertainment Inc.
+ *
+ * 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 "PlatformScreen.h"
+
+#include "FloatRect.h"
+#include "NotImplemented.h"
+
+namespace WebCore {
+
+int screenDepth(Widget*)
+{
+    notImplemented();
+    return 24;
+}
+
+int screenDepthPerComponent(Widget*)
+{
+    notImplemented();
+    return 8;
+}
+
+bool screenIsMonochrome(Widget*)
+{
+    notImplemented();
+    return false;
+}
+
+bool screenHasInvertedColors()
+{
+    return false;
+}
+
+FloatRect screenRect(Widget*)
+{
+    notImplemented();
+    return { 0, 0, 1920, 1080 };
+}
+
+FloatRect screenAvailableRect(Widget*)
+{
+    notImplemented();
+    return { 0, 0, 1920, 1080 };
+}
+
+bool screenSupportsExtendedColor(Widget*)
+{
+    return false;
+}
+
+} // namespace WebCore
diff --git a/Source/WebCore/platform/playstation/ScrollbarThemePlayStation.cpp b/Source/WebCore/platform/playstation/ScrollbarThemePlayStation.cpp
new file mode 100644 (file)
index 0000000..18b45dc
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2018 Sony Interactive Entertainment Inc.
+ *
+ * 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 "ScrollbarThemePlayStation.h"
+
+#include "HostWindow.h"
+#include "NotImplemented.h"
+#include "ScrollView.h"
+#include "Scrollbar.h"
+
+namespace WebCore {
+
+ScrollbarTheme& ScrollbarTheme::nativeTheme()
+{
+    static ScrollbarThemePlayStation theme;
+    return theme;
+}
+
+int ScrollbarThemePlayStation::scrollbarThickness(ScrollbarControlSize, ScrollbarExpansionState)
+{
+    return 7;
+}
+
+bool ScrollbarThemePlayStation::hasButtons(Scrollbar&)
+{
+    notImplemented();
+    return true;
+}
+
+bool ScrollbarThemePlayStation::hasThumb(Scrollbar&)
+{
+    notImplemented();
+    return true;
+}
+
+IntRect ScrollbarThemePlayStation::backButtonRect(Scrollbar&, ScrollbarPart, bool)
+{
+    notImplemented();
+    return { };
+}
+
+IntRect ScrollbarThemePlayStation::forwardButtonRect(Scrollbar&, ScrollbarPart, bool)
+{
+    notImplemented();
+    return { };
+}
+
+IntRect ScrollbarThemePlayStation::trackRect(Scrollbar& scrollbar, bool)
+{
+    return scrollbar.frameRect();
+}
+
+void ScrollbarThemePlayStation::paintTrackBackground(GraphicsContext& context, Scrollbar& scrollbar, const IntRect& trackRect)
+{
+    context.fillRect(trackRect, scrollbar.enabled() ? Color::lightGray : Color(0xFFE0E0E0));
+}
+
+void ScrollbarThemePlayStation::paintThumb(GraphicsContext& context, Scrollbar& scrollbar, const IntRect& thumbRect)
+{
+    if (scrollbar.enabled())
+        context.fillRect(thumbRect, Color::darkGray);
+}
+
+} // namespace WebCore
diff --git a/Source/WebCore/platform/playstation/ScrollbarThemePlayStation.h b/Source/WebCore/platform/playstation/ScrollbarThemePlayStation.h
new file mode 100644 (file)
index 0000000..0436b9f
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2018 Sony Interactive Entertainment Inc.
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include "ScrollbarThemeComposite.h"
+
+namespace WebCore {
+
+class ScrollbarThemePlayStation : public ScrollbarThemeComposite {
+public:
+    ScrollbarThemePlayStation() = default;
+    virtual ~ScrollbarThemePlayStation() = default;
+
+    int scrollbarThickness(ScrollbarControlSize = RegularScrollbar, ScrollbarExpansionState = ScrollbarExpansionState::Expanded) override;
+
+    bool hasButtons(Scrollbar&) override;
+    bool hasThumb(Scrollbar&) override;
+
+    IntRect backButtonRect(Scrollbar&, ScrollbarPart, bool painting = false) override;
+    IntRect forwardButtonRect(Scrollbar&, ScrollbarPart, bool painting = false) override;
+    IntRect trackRect(Scrollbar&, bool painting = false) override;
+
+    void paintTrackBackground(GraphicsContext&, Scrollbar&, const IntRect&) override;
+    void paintThumb(GraphicsContext&, Scrollbar&, const IntRect&) override;
+};
+
+} // namespace WebCore
diff --git a/Source/WebCore/platform/playstation/UserAgentPlayStation.cpp b/Source/WebCore/platform/playstation/UserAgentPlayStation.cpp
new file mode 100644 (file)
index 0000000..a56e551
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2018 Sony Interactive Entertainment Inc.
+ *
+ * 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. ``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
+ * 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 "UserAgent.h"
+
+namespace WebCore {
+
+String standardUserAgent(const String&, const String&)
+{
+    return emptyString();
+}
+
+String standardUserAgentForURL(const URL&)
+{
+    // The null string means we don't need a specific UA for the given URL.
+    return emptyString();
+}
+
+} // namespace WebCore
diff --git a/Source/WebCore/rendering/RenderThemePlayStation.cpp b/Source/WebCore/rendering/RenderThemePlayStation.cpp
new file mode 100644 (file)
index 0000000..0601da8
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2018 Sony Interactive Entertainment Inc.
+ *
+ * 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 "RenderThemePlayStation.h"
+
+#include "NotImplemented.h"
+
+namespace WebCore {
+
+RenderTheme& RenderTheme::singleton()
+{
+    static NeverDestroyed<RenderThemePlayStation> theme;
+    return theme;
+}
+
+void RenderThemePlayStation::updateCachedSystemFontDescription(CSSValueID, FontCascadeDescription&) const
+{
+    notImplemented();
+}
+
+} // namespace WebCore
diff --git a/Source/WebCore/rendering/RenderThemePlayStation.h b/Source/WebCore/rendering/RenderThemePlayStation.h
new file mode 100644 (file)
index 0000000..3584cc6
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2018 Sony Interactive Entertainment Inc.
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include "RenderTheme.h"
+
+namespace WebCore {
+
+class RenderThemePlayStation final : public RenderTheme {
+public:
+    friend NeverDestroyed<RenderThemePlayStation>;
+
+private:
+    void updateCachedSystemFontDescription(CSSValueID systemFontID, FontCascadeDescription&) const final;
+};
+
+} // namespace WebCore
index cf4b3fa..04032ea 100644 (file)
@@ -54,12 +54,9 @@ if (LIBPSL_INCLUDE_DIRS)
     endif ()
 endif ()
 
-if ("${LibPSL_FIND_VERSION}" VERSION_GREATER "${LIBPSL_VERSION}")
-    message(FATAL_ERROR "Required version (" ${LibPSL_FIND_VERSION} ") is higher than found version (" ${LIBPSL_VERSION} ")")
-endif ()
-
 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(LIBPSL REQUIRED_VARS LIBPSL_INCLUDE_DIRS LIBPSL_LIBRARIES)
+find_package_handle_standard_args(LibPSL REQUIRED_VARS LIBPSL_INCLUDE_DIRS LIBPSL_LIBRARIES
+                                         VERSION_VAR LIBPSL_VERSION)
 
 mark_as_advanced(
     LIBPSL_INCLUDE_DIRS
diff --git a/Source/cmake/FindNghttp2.cmake b/Source/cmake/FindNghttp2.cmake
new file mode 100644 (file)
index 0000000..c89bc9b
--- /dev/null
@@ -0,0 +1,63 @@
+# - Try to find nghttp2
+# This module defines the following variables:
+#
+#  NGHTTP2_FOUND - nghttp2 was found
+#  NGHTTP2_INCLUDE_DIRS - the nghttp2 include directories
+#  NGHTTP2_LIBRARIES - link these to use nghttp2
+#
+# Copyright (C) 2018 Sony Interactive Entertainment Inc.
+#
+# 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 HOLDER 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 THE COPYRIGHT HOLDER 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.
+
+find_package(PkgConfig)
+pkg_check_modules(PC_NGHTTP2 QUIET nghttp2)
+
+find_path(NGHTTP2_INCLUDE_DIRS
+    NAMES nghttp2.h
+    HINTS ${PC_NGHTTP2_INCLUDEDIR}
+          ${PC_NGHTTP2_INCLUDE_DIRS}
+    PATH_SUFFIXES nghttp2
+)
+
+find_library(NGHTTP2_LIBRARIES
+    NAMES nghttp2
+    HINTS ${PC_NGHTTP2_LIBDIR}
+          ${PC_NGHTTP2_LIBRARY_DIRS}
+)
+
+if (NGHTTP2_INCLUDE_DIRS)
+    if (EXISTS "${NGHTTP2_INCLUDE_DIRS}/nghttp2ver.h")
+        file(READ "${NGHTTP2_INCLUDE_DIRS}/nghttp2ver.h" _nghttp2_version_content)
+
+        string(REGEX MATCH "#define +NGHTTP2_VERSION +\"([0-9]+\.[0-9]+\.[0-9]+)\"" _dummy "${_nghttp2_version_content}")
+        set(NGHTTP2_VERSION "${CMAKE_MATCH_1}")
+    endif ()
+endif ()
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Nghttp2 REQUIRED_VARS NGHTTP2_INCLUDE_DIRS NGHTTP2_LIBRARIES
+                                          VERSION_VAR NGHTTP2_VERSION)
+
+mark_as_advanced(
+    NGHTTP2_INCLUDE_DIRS
+    NGHTTP2_LIBRARIES
+)
diff --git a/Source/cmake/FindPixman.cmake b/Source/cmake/FindPixman.cmake
new file mode 100644 (file)
index 0000000..c4d1fa1
--- /dev/null
@@ -0,0 +1,64 @@
+# - Try to find Pixman
+# This module defines the following variables:
+#
+#  PIXMAN_FOUND - Pixman was found
+#  PIXMAN_INCLUDE_DIRS - the Pixman include directories
+#  PIXMAN_LIBRARIES - link these to use Pixman
+#
+# Copyright (C) 2018 Sony Interactive Entertainment Inc.
+#
+# 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.
+
+find_path(PIXMAN_INCLUDE_DIRS
+    NAMES pixman.h
+    PATH_SUFFIXES pixman-1
+)
+
+find_library(PIXMAN_LIBRARIES
+    NAMES pixman-1
+)
+
+if (PIXMAN_INCLUDE_DIRS)
+    if (EXISTS "${PIXMAN_INCLUDE_DIRS}/pixman-version.h")
+        file(READ "${PIXMAN_INCLUDE_DIRS}/pixman-version.h" PIXMAN_VERSION_CONTENT)
+
+        string(REGEX MATCH "#define +PIXMAN_VERSION_MAJOR +([0-9]+)" _dummy "${PIXMAN_VERSION_CONTENT}")
+        set(PIXMAN_VERSION_MAJOR "${CMAKE_MATCH_1}")
+
+        string(REGEX MATCH "#define +PIXMAN_VERSION_MINOR +([0-9]+)" _dummy "${PIXMAN_VERSION_CONTENT}")
+        set(PIXMAN_VERSION_MINOR "${CMAKE_MATCH_1}")
+
+        string(REGEX MATCH "#define +PIXMAN_VERSION_MICRO +([0-9]+)" _dummy "${PIXMAN_VERSION_CONTENT}")
+        set(PIXMAN_VERSION_MICRO "${CMAKE_MATCH_1}")
+
+        set(PIXMAN_VERSION "${PIXMAN_VERSION_MAJOR}.${PIXMAN_VERSION_MINOR}.${PIXMAN_VERSION_MICRO}")
+    endif ()
+endif ()
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Pixman REQUIRED_VARS PIXMAN_INCLUDE_DIRS PIXMAN_LIBRARIES
+                                         VERSION_VAR PIXMAN_VERSION)
+
+mark_as_advanced(
+    PIXMAN_INCLUDE_DIRS
+    PIXMAN_LIBRARIES
+)
index cb395c8..3a76569 100644 (file)
@@ -37,7 +37,7 @@ find_path(WPE_INCLUDE_DIRS
 )
 
 find_library(WPE_LIBRARIES
-    NAMES wpe-0.2
+    NAMES wpe-0.2 wpe
     HINTS ${PC_WPE_LIBDIR} ${PC_WPE_LIBRARY_DIRS}
 )
 
index 85194a2..501d048 100644 (file)
@@ -12,6 +12,40 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DFG_JIT PRIVATE OFF)
 # Disable Remote Inspector until implementation lands
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_REMOTE_INSPECTOR PRIVATE OFF)
 
+# Enabled features
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ASYNC_SCROLLING PRIVATE ON)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SMOOTH_SCROLLING PRIVATE ON)
+
+# Experimental features
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_APPLICATION_MANIFEST PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CSS_PAINTING_API PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FILTERS_LEVEL_2 PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SERVICE_WORKER PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_VARIATION_FONTS PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBGL PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
+
+# Features to investigate
+#
+# Features that are temporarily turned off because an implementation is not
+# present at this time
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GAMEPAD PRIVATE OFF)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_AUDIO PRIVATE OFF)
+
+# No support planned
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FTPDIR PRIVATE OFF)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GEOLOCATION PRIVATE OFF)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ICONDATABASE PRIVATE OFF)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER PRIVATE OFF)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MATHML PRIVATE OFF)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_METER_ELEMENT PRIVATE OFF)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NETSCAPE_PLUGIN_API PRIVATE OFF)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NOTIFICATIONS PRIVATE OFF)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SVG_FONTS PRIVATE OFF)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_USERSELECT_ALL PRIVATE OFF)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_USER_MESSAGE_HANDLERS PRIVATE OFF)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_CRYPTO PRIVATE OFF)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_XSLT PRIVATE OFF)
+
 WEBKIT_OPTION_END()
 
 # Do not use a separate directory based on configuration when building
@@ -38,17 +72,62 @@ find_library(C_STD_LIBRARY c)
 find_library(KERNEL_LIBRARY kernel)
 find_library(POSIX_COMPATABILITY_LIBRARY posixex)
 
-find_package(Threads REQUIRED)
+find_package(Cairo REQUIRED)
+find_package(CURL REQUIRED)
+find_package(EGL REQUIRED)
+find_package(Fontconfig REQUIRED)
+find_package(Freetype REQUIRED)
+find_package(HarfBuzz REQUIRED)
 find_package(ICU REQUIRED)
+find_package(JPEG REQUIRED)
+find_package(LibPSL REQUIRED)
+find_package(LibXml2 REQUIRED)
+find_package(Nghttp2 REQUIRED)
+find_package(OpenSSL REQUIRED)
+find_package(Pixman REQUIRED)
+find_package(PNG REQUIRED)
+find_package(Sqlite REQUIRED)
+find_package(Threads REQUIRED)
+find_package(WebP REQUIRED)
+find_package(WPE REQUIRED)
+find_package(ZLIB REQUIRED)
+
+# Emulate what pkg-config would do with statically compiled libraries
+# FIXME: https://bugs.webkit.org/show_bug.cgi?id=192410
+list(APPEND CAIRO_LIBRARIES ${PIXMAN_LIBRARIES})
+list(APPEND CURL_LIBRARIES ${NGHTTP2_LIBRARIES})
+
+# Temporarily turn off Accessibility support
+SET_AND_EXPOSE_TO_BUILD(HAVE_ACCESSIBILITY OFF)
 
-SET_AND_EXPOSE_TO_BUILD(USE_EXPORT_MACROS ON)
 SET_AND_EXPOSE_TO_BUILD(HAVE_PTHREAD_SETNAME_NP ON)
 
+SET_AND_EXPOSE_TO_BUILD(USE_EXPORT_MACROS ON)
+
+SET_AND_EXPOSE_TO_BUILD(USE_CAIRO ON)
+SET_AND_EXPOSE_TO_BUILD(USE_CURL ON)
+SET_AND_EXPOSE_TO_BUILD(USE_FREETYPE ON)
+SET_AND_EXPOSE_TO_BUILD(USE_HARFBUZZ ON)
+SET_AND_EXPOSE_TO_BUILD(USE_LIBWPE ON)
+
+# Rendering options
+SET_AND_EXPOSE_TO_BUILD(ENABLE_GRAPHICS_CONTEXT_3D ON)
+SET_AND_EXPOSE_TO_BUILD(USE_COORDINATED_GRAPHICS ON)
+SET_AND_EXPOSE_TO_BUILD(USE_COORDINATED_GRAPHICS_THREADED ON)
+SET_AND_EXPOSE_TO_BUILD(USE_EGL ON)
+SET_AND_EXPOSE_TO_BUILD(USE_NICOSIA TRUE)
+SET_AND_EXPOSE_TO_BUILD(USE_OPENGL_ES ON)
+SET_AND_EXPOSE_TO_BUILD(USE_TEXTURE_MAPPER ON)
+SET_AND_EXPOSE_TO_BUILD(USE_TEXTURE_MAPPER_GL ON)
+SET_AND_EXPOSE_TO_BUILD(USE_TILED_BACKING_STORE ON)
+SET_AND_EXPOSE_TO_BUILD(USE_UNIX_DOMAIN_SOCKETS ON)
+
 set(WTF_LIBRARY_TYPE STATIC)
 set(JavaScriptCore_LIBRARY_TYPE SHARED)
+set(WebCore_LIBRARY_TYPE STATIC)
 
 set(ENABLE_API_TESTS ON)
-set(ENABLE_WEBCORE OFF)
+set(ENABLE_WEBCORE ON)
 set(ENABLE_WEBKIT OFF)
 set(ENABLE_WEBKIT_LEGACY OFF)