Title: [211027] trunk
Revision
211027
Author
mmaxfi...@apple.com
Date
2017-01-22 09:24:51 -0800 (Sun, 22 Jan 2017)

Log Message

Introducing the Platform Abstraction Layer (PAL)
https://bugs.webkit.org/show_bug.cgi?id=143358

Reviewed by Alex Christensen.

.:

* CMakeLists.txt:
* Source/CMakeLists.txt:
* Source/cmake/WebKitFS.cmake:

Source/WebCore:

In order to enforce layering and promote testability, WebCore/platform files
should be compiled in their own project. This new project can enforce layering
and can be tested with unit tests in addition to layout tests.

The name of this new project is the Platform Abstraction Layer, or "PAL."
This comprises of a new directory in WebCore which will be the destination
for files migrated from WebCore/platform. This new folder, and its associated
project, will maintain layering invariants. These invariants are enforced at
build-time by setting the #include path for PAL to not include the rest of
WebCore (which is the same layering enforcement mechanism for WTF). Files will
be migrated into this new target/directory piece-by-piece, and the migration
of a file will be performed as soon as it can be migrated without violating
layering.

Within WebCore, files should include PAL files using the convention
#include <pal/foo.h>. Symbols within PAL are placed within a new top-level
namespace, "PAL," and therefore when used should be referred to as PAL::Foo.

The first set of files to move into the new platform is the crypto/ subdirectory
because it is both simple but also includes platform-dependent files.

No new tests because there is no behavior change.

* CMakeLists.txt:
* Configurations/WebCore.xcconfig: Add PAL to the include path
* PAL/Configurations/Base.xcconfig: Added.
* PAL/Configurations/DebugRelease.xcconfig: Added.
* PAL/Configurations/PAL.xcconfig: Added. Sets up some PAL-specific
variables.
* PAL/Configurations/FeatureDefines.xcconfig: Added.
* PAL/Configurations/Version.xcconfig: Added.
* PAL/PAL.xcodeproj/project.pbxproj: Added. New project file.
* PAL/config.h: Added. Simplified from WebCore/config.h.
* PAL/pal/CMakeLists.txt: Added.
* PAL/pal/PlatformEfl.cmake: Added.
* PAL/pal/PlatformGTK.cmake: Added.
* PAL/pal/PlatformMac.cmake: Added.
* PAL/pal/PlatformWin.cmake: Added.
* PAL/pal/crypto/CryptoDigest.h: Renamed from Source/WebCore/platform/crypto/CryptoDigest.h.
* PAL/pal/crypto/commoncrypto/CryptoDigestCommonCrypto.cpp: Renamed from Source/WebCore/platform/crypto/commoncrypto/CryptoDigestCommonCrypto.cpp.
* PAL/pal/crypto/gcrypt/CryptoDigestGCrypt.cpp: Renamed from Source/WebCore/platform/crypto/gcrypt/CryptoDigestGCrypt.cpp.
* PAL/pal/crypto/gnutls/CryptoDigestGnuTLS.cpp: Renamed from Source/WebCore/platform/crypto/gnutls/CryptoDigestGnuTLS.cpp.
* PAL/pal/crypto/win/CryptoDigestWin.cpp: Renamed from Source/WebCore/platform/crypto/win/CryptoDigestWin.cpp.
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* PlatformMac.cmake:
* PlatformWin.cmake:
* WebCore.xcodeproj/project.pbxproj: Create a project link so WebCore
knows that it needs to build PAL as a dependency.
* crypto/algorithms/CryptoAlgorithmSHA1.cpp:
(WebCore::CryptoAlgorithmSHA1::digest): Update #include and namespace.
* crypto/algorithms/CryptoAlgorithmSHA224.cpp:
(WebCore::CryptoAlgorithmSHA224::digest): Ditto.
* crypto/algorithms/CryptoAlgorithmSHA256.cpp:
(WebCore::CryptoAlgorithmSHA256::digest): Ditto.
* crypto/algorithms/CryptoAlgorithmSHA384.cpp:
(WebCore::CryptoAlgorithmSHA384::digest): Ditto.
* crypto/algorithms/CryptoAlgorithmSHA512.cpp:
(WebCore::CryptoAlgorithmSHA512::digest): Ditto.
* crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
(WebCore::cryptoDigestAlgorithm): Ditto.
(WebCore::signRSASSA_PKCS1_v1_5): Ditto.
(WebCore::verifyRSASSA_PKCS1_v1_5): Ditto.
* inspector/InspectorDOMAgent.cpp:
(WebCore::computeContentSecurityPolicySHA256Hash): Ditto.
* page/csp/ContentSecurityPolicy.cpp:
(WebCore::toCryptoDigestAlgorithm): Ditto.
(WebCore::ContentSecurityPolicy::findHashOfContentInPolicies): Ditto.
* platform/network/soup/SoupNetworkSession.cpp:
(WebCore::HostTLSCertificateSet::computeCertificateHash): Ditto.

Modified Paths

Added Paths

Removed Paths

  • trunk/Source/WebCore/platform/crypto/

Diff

Modified: trunk/CMakeLists.txt (211026 => 211027)


--- trunk/CMakeLists.txt	2017-01-22 08:29:30 UTC (rev 211026)
+++ trunk/CMakeLists.txt	2017-01-22 17:24:51 UTC (rev 211027)
@@ -114,6 +114,7 @@
 endif ()
 
 set(_javascript_Core_LIBRARY_TYPE SHARED)
+set(PAL_LIBRARY_TYPE STATIC)
 set(WebKit_LIBRARY_TYPE SHARED)
 set(WebKit2_LIBRARY_TYPE SHARED)
 set(WebCoreTestSupport_LIBRARY_TYPE STATIC)

Modified: trunk/ChangeLog (211026 => 211027)


--- trunk/ChangeLog	2017-01-22 08:29:30 UTC (rev 211026)
+++ trunk/ChangeLog	2017-01-22 17:24:51 UTC (rev 211027)
@@ -1,3 +1,14 @@
+2017-01-22  Don Olmstead <don.olmst...@am.sony.com> and Myles C. Maxfield <mmaxfi...@apple.com>
+
+        Introducing the Platform Abstraction Layer (PAL)
+        https://bugs.webkit.org/show_bug.cgi?id=143358
+
+        Reviewed by Alex Christensen.
+
+        * CMakeLists.txt:
+        * Source/CMakeLists.txt:
+        * Source/cmake/WebKitFS.cmake:
+
 2017-01-20  Joseph Pecoraro  <pecor...@apple.com>
 
         Remove outdated ENABLE(CSP_NEXT) build flag

Modified: trunk/Source/CMakeLists.txt (211026 => 211027)


--- trunk/Source/CMakeLists.txt	2017-01-22 08:29:30 UTC (rev 211026)
+++ trunk/Source/CMakeLists.txt	2017-01-22 17:24:51 UTC (rev 211027)
@@ -46,6 +46,7 @@
 WEBKIT_SET_EXTRA_COMPILER_FLAGS(_javascript_Core ${ADDITIONAL_COMPILER_FLAGS})
 
 if (ENABLE_WEBCORE)
+    WEBKIT_SET_EXTRA_COMPILER_FLAGS(PAL ${ADDITIONAL_COMPILER_FLAGS})
     WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCoreTestSupport ${ADDITIONAL_COMPILER_FLAGS})
     WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCore ${ADDITIONAL_COMPILER_FLAGS})
     WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCoreDerivedSources ${ADDITIONAL_COMPILER_FLAGS})

Modified: trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig (211026 => 211027)


--- trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig	2017-01-22 08:29:30 UTC (rev 211026)
+++ trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig	2017-01-22 17:24:51 UTC (rev 211027)
@@ -1,4 +1,4 @@
-// Copyright (C) 2009, 2010, 2014, 2015, 2016 Apple Inc. All rights reserved.
+// Copyright (C) 2009, 2010, 2014, 2015, 2016, 2017 Apple Inc. All rights reserved.
 // Copyright (C) 2009 Google Inc. All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without

Modified: trunk/Source/WebCore/CMakeLists.txt (211026 => 211027)


--- trunk/Source/WebCore/CMakeLists.txt	2017-01-22 08:29:30 UTC (rev 211026)
+++ trunk/Source/WebCore/CMakeLists.txt	2017-01-22 17:24:51 UTC (rev 211027)
@@ -1,6 +1,7 @@
 cmake_minimum_required(VERSION 2.8.12)
 include(WebKitCommon)
 set_property(DIRECTORY . PROPERTY FOLDER "WebCore")
+add_subdirectory(PAL/pal)
 
 set(WebCore_INCLUDE_DIRECTORIES
     "${CMAKE_BINARY_DIR}"
@@ -2945,6 +2946,7 @@
 set(WebCore_LIBRARIES
     ${ICU_LIBRARIES}
     _javascript_Core${DEBUG_SUFFIX}
+    PAL${DEBUG_SUFFIX}
 )
 
 if (ENABLE_LEGACY_ENCRYPTED_MEDIA)

Modified: trunk/Source/WebCore/ChangeLog (211026 => 211027)


--- trunk/Source/WebCore/ChangeLog	2017-01-22 08:29:30 UTC (rev 211026)
+++ trunk/Source/WebCore/ChangeLog	2017-01-22 17:24:51 UTC (rev 211027)
@@ -1,3 +1,81 @@
+2017-01-22  Don Olmstead <don.olmst...@am.sony.com> and Myles C. Maxfield <mmaxfi...@apple.com>
+
+        Introducing the Platform Abstraction Layer (PAL)
+        https://bugs.webkit.org/show_bug.cgi?id=143358
+
+        Reviewed by Alex Christensen.
+
+        In order to enforce layering and promote testability, WebCore/platform files
+        should be compiled in their own project. This new project can enforce layering
+        and can be tested with unit tests in addition to layout tests.
+
+        The name of this new project is the Platform Abstraction Layer, or "PAL."
+        This comprises of a new directory in WebCore which will be the destination
+        for files migrated from WebCore/platform. This new folder, and its associated
+        project, will maintain layering invariants. These invariants are enforced at
+        build-time by setting the #include path for PAL to not include the rest of
+        WebCore (which is the same layering enforcement mechanism for WTF). Files will
+        be migrated into this new target/directory piece-by-piece, and the migration
+        of a file will be performed as soon as it can be migrated without violating
+        layering.
+
+        Within WebCore, files should include PAL files using the convention
+        #include <pal/foo.h>. Symbols within PAL are placed within a new top-level
+        namespace, "PAL," and therefore when used should be referred to as PAL::Foo.
+
+        The first set of files to move into the new platform is the crypto/ subdirectory
+        because it is both simple but also includes platform-dependent files.
+
+        No new tests because there is no behavior change.
+
+        * CMakeLists.txt:
+        * Configurations/WebCore.xcconfig: Add PAL to the include path
+        * PAL/Configurations/Base.xcconfig: Added.
+        * PAL/Configurations/DebugRelease.xcconfig: Added.
+        * PAL/Configurations/PAL.xcconfig: Added. Sets up some PAL-specific
+        variables.
+        * PAL/Configurations/FeatureDefines.xcconfig: Added.
+        * PAL/Configurations/Version.xcconfig: Added.
+        * PAL/PAL.xcodeproj/project.pbxproj: Added. New project file.
+        * PAL/config.h: Added. Simplified from WebCore/config.h.
+        * PAL/pal/CMakeLists.txt: Added.
+        * PAL/pal/PlatformEfl.cmake: Added.
+        * PAL/pal/PlatformGTK.cmake: Added.
+        * PAL/pal/PlatformMac.cmake: Added.
+        * PAL/pal/PlatformWin.cmake: Added.
+        * PAL/pal/crypto/CryptoDigest.h: Renamed from Source/WebCore/platform/crypto/CryptoDigest.h.
+        * PAL/pal/crypto/commoncrypto/CryptoDigestCommonCrypto.cpp: Renamed from Source/WebCore/platform/crypto/commoncrypto/CryptoDigestCommonCrypto.cpp.
+        * PAL/pal/crypto/gcrypt/CryptoDigestGCrypt.cpp: Renamed from Source/WebCore/platform/crypto/gcrypt/CryptoDigestGCrypt.cpp.
+        * PAL/pal/crypto/gnutls/CryptoDigestGnuTLS.cpp: Renamed from Source/WebCore/platform/crypto/gnutls/CryptoDigestGnuTLS.cpp.
+        * PAL/pal/crypto/win/CryptoDigestWin.cpp: Renamed from Source/WebCore/platform/crypto/win/CryptoDigestWin.cpp.
+        * PlatformEfl.cmake:
+        * PlatformGTK.cmake:
+        * PlatformMac.cmake:
+        * PlatformWin.cmake:
+        * WebCore.xcodeproj/project.pbxproj: Create a project link so WebCore
+        knows that it needs to build PAL as a dependency.
+        * crypto/algorithms/CryptoAlgorithmSHA1.cpp:
+        (WebCore::CryptoAlgorithmSHA1::digest): Update #include and namespace.
+        * crypto/algorithms/CryptoAlgorithmSHA224.cpp:
+        (WebCore::CryptoAlgorithmSHA224::digest): Ditto.
+        * crypto/algorithms/CryptoAlgorithmSHA256.cpp:
+        (WebCore::CryptoAlgorithmSHA256::digest): Ditto.
+        * crypto/algorithms/CryptoAlgorithmSHA384.cpp:
+        (WebCore::CryptoAlgorithmSHA384::digest): Ditto.
+        * crypto/algorithms/CryptoAlgorithmSHA512.cpp:
+        (WebCore::CryptoAlgorithmSHA512::digest): Ditto.
+        * crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
+        (WebCore::cryptoDigestAlgorithm): Ditto.
+        (WebCore::signRSASSA_PKCS1_v1_5): Ditto.
+        (WebCore::verifyRSASSA_PKCS1_v1_5): Ditto.
+        * inspector/InspectorDOMAgent.cpp:
+        (WebCore::computeContentSecurityPolicySHA256Hash): Ditto.
+        * page/csp/ContentSecurityPolicy.cpp:
+        (WebCore::toCryptoDigestAlgorithm): Ditto.
+        (WebCore::ContentSecurityPolicy::findHashOfContentInPolicies): Ditto.
+        * platform/network/soup/SoupNetworkSession.cpp:
+        (WebCore::HostTLSCertificateSet::computeCertificateHash): Ditto.
+
 2017-01-22  Zan Dobersek  <zdober...@igalia.com>
 
         [GStreamer] Clear out m_appsinkCaps in AppendPipeline::appsinkCapsChanged() before using outPtr()

Modified: trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig (211026 => 211027)


--- trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig	2017-01-22 08:29:30 UTC (rev 211026)
+++ trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig	2017-01-22 17:24:51 UTC (rev 211027)
@@ -1,4 +1,4 @@
-// Copyright (C) 2009, 2010, 2014, 2015, 2016 Apple Inc. All rights reserved.
+// Copyright (C) 2009, 2010, 2014, 2015, 2016, 2017 Apple Inc. All rights reserved.
 // Copyright (C) 2009 Google Inc. All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without

Modified: trunk/Source/WebCore/Configurations/WebCore.xcconfig (211026 => 211027)


--- trunk/Source/WebCore/Configurations/WebCore.xcconfig	2017-01-22 08:29:30 UTC (rev 211026)
+++ trunk/Source/WebCore/Configurations/WebCore.xcconfig	2017-01-22 17:24:51 UTC (rev 211027)
@@ -46,7 +46,7 @@
 
 WEBKITADDITIONS_HEADER_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR)/usr/local/include/WebKitAdditions $(SDKROOT)/usr/local/include/WebKitAdditions;
 
-HEADER_SEARCH_PATHS = ForwardingHeaders icu /usr/include/libxslt /usr/include/libxml2 "$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore" "$(BUILT_PRODUCTS_DIR)/usr/local/include" $(WEBKITADDITIONS_HEADER_SEARCH_PATHS) $(HEADER_SEARCH_PATHS);
+HEADER_SEARCH_PATHS = PAL ForwardingHeaders icu /usr/include/libxslt /usr/include/libxml2 "$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore" "$(BUILT_PRODUCTS_DIR)/usr/local/include" $(WEBKITADDITIONS_HEADER_SEARCH_PATHS) $(HEADER_SEARCH_PATHS);
 INFOPLIST_FILE = Info.plist;
 INSTALL_PATH = $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
 INSTALL_PATH[sdk=macosx*] = $(WEBCORE_FRAMEWORKS_DIR);

Added: trunk/Source/WebCore/PAL/Configurations/Base.xcconfig (0 => 211027)


--- trunk/Source/WebCore/PAL/Configurations/Base.xcconfig	                        (rev 0)
+++ trunk/Source/WebCore/PAL/Configurations/Base.xcconfig	2017-01-22 17:24:51 UTC (rev 211027)
@@ -0,0 +1,121 @@
+// Copyright (C) 2017 Apple 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. ``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 "../../../../../Internal/Configurations/HaveInternalSDK.xcconfig"
+
+USE_INTERNAL_SDK = $(USE_INTERNAL_SDK_$(CONFIGURATION));
+USE_INTERNAL_SDK_Production = YES;
+USE_INTERNAL_SDK_Debug = $(HAVE_INTERNAL_SDK);
+USE_INTERNAL_SDK_Release = $(HAVE_INTERNAL_SDK);
+
+CLANG_CXX_LANGUAGE_STANDARD = gnu++14;
+CLANG_CXX_LIBRARY = libc++;
+CLANG_WARN_BOOL_CONVERSION = YES;
+CLANG_WARN_CONSTANT_CONVERSION = YES;
+CLANG_WARN_CXX0X_EXTENSIONS = NO;
+CLANG_WARN_EMPTY_BODY = YES;
+CLANG_WARN_ENUM_CONVERSION = YES;
+CLANG_WARN_INFINITE_RECURSION = YES;
+CLANG_WARN_INT_CONVERSION = YES;
+CLANG_WARN_SUSPICIOUS_MOVE = YES;
+CLANG_WARN_UNREACHABLE_CODE = YES;
+CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+GCC_WARN_UNDECLARED_SELECTOR = YES;
+COMBINE_HIDPI_IMAGES = NO;
+DEBUG_INFORMATION_FORMAT = dwarf-with-dsym;
+ENABLE_STRICT_OBJC_MSGSEND = YES;
+GCC_C_LANGUAGE_STANDARD = gnu99;
+GCC_DEBUGGING_SYMBOLS = default;
+GCC_DYNAMIC_NO_PIC = NO;
+GCC_ENABLE_CPP_EXCEPTIONS = NO;
+GCC_ENABLE_CPP_RTTI = NO;
+GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+GCC_ENABLE_SYMBOL_SEPARATION = NO;
+GCC_FAST_OBJC_DISPATCH = YES;
+GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+GCC_NO_COMMON_BLOCKS = YES;
+GCC_OBJC_CALL_CXX_CDTORS = YES;
+GCC_PRECOMPILE_PREFIX_HEADER = YES;
+GCC_SYMBOLS_PRIVATE_EXTERN = YES;
+GCC_THREADSAFE_STATICS = NO;
+GCC_TREAT_WARNINGS_AS_ERRORS = YES;
+GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+// FIXME: <http://webkit.org/b/109846> WebCore should build with -Wshorten-64-to-32
+GCC_WARN_64_TO_32_BIT_CONVERSION = $(GCC_WARN_64_TO_32_BIT_CONVERSION_$(CURRENT_ARCH));
+GCC_WARN_64_TO_32_BIT_CONVERSION_ = YES;
+GCC_WARN_64_TO_32_BIT_CONVERSION_armv7 = YES;
+GCC_WARN_64_TO_32_BIT_CONVERSION_armv7k = YES;
+GCC_WARN_64_TO_32_BIT_CONVERSION_armv7s = YES;
+GCC_WARN_64_TO_32_BIT_CONVERSION_arm64 = NO;
+GCC_WARN_64_TO_32_BIT_CONVERSION_i386 = YES;
+GCC_WARN_64_TO_32_BIT_CONVERSION_x86_64 = NO;
+GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
+GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
+GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+GCC_WARN_ABOUT_RETURN_TYPE = YES;
+GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
+GCC_WARN_SIGN_COMPARE = YES;
+GCC_WARN_UNINITIALIZED_AUTOS = YES;
+GCC_WARN_UNUSED_FUNCTION = YES;
+GCC_WARN_UNUSED_VARIABLE = YES;
+PREBINDING = NO;
+WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough -Wno-unknown-warning-option;
+
+TARGET_MAC_OS_X_VERSION_MAJOR = $(TARGET_MAC_OS_X_VERSION_MAJOR$(MACOSX_DEPLOYMENT_TARGET:suffix:identifier));
+TARGET_MAC_OS_X_VERSION_MAJOR_10 = 101000;
+TARGET_MAC_OS_X_VERSION_MAJOR_11 = 101100;
+TARGET_MAC_OS_X_VERSION_MAJOR_12 = 101200;
+TARGET_MAC_OS_X_VERSION_MAJOR_13 = 101300;
+
+WK_TARGET_IOS_VERSION_MAJOR = $(IPHONEOS_DEPLOYMENT_TARGET:base); // iOS 9.3 => 9
+
+SUPPORTED_PLATFORMS = iphoneos iphonesimulator macosx appletvos appletvsimulator watchos watchsimulator;
+
+// DEBUG_DEFINES, GCC_OPTIMIZATION_LEVEL, STRIP_INSTALLED_PRODUCT and DEAD_CODE_STRIPPING vary between the debug and normal variants.
+// We set up the values for each variant here, and have the Debug configuration in the Xcode project use the _debug variant.
+DEBUG_DEFINES_debug = ;
+DEBUG_DEFINES_normal = NDEBUG;
+DEBUG_DEFINES = $(DEBUG_DEFINES_$(CURRENT_VARIANT));
+
+GCC_OPTIMIZATION_LEVEL = $(GCC_OPTIMIZATION_LEVEL_$(CURRENT_VARIANT));
+GCC_OPTIMIZATION_LEVEL_normal[sdk=iphone*] = 3;
+GCC_OPTIMIZATION_LEVEL_normal[sdk=macosx*] = 2;
+GCC_OPTIMIZATION_LEVEL_debug = 0;
+
+STRIP_INSTALLED_PRODUCT = $(STRIP_INSTALLED_PRODUCT_$(CURRENT_VARIANT));
+STRIP_INSTALLED_PRODUCT_normal = YES;
+STRIP_INSTALLED_PRODUCT_debug = NO;
+
+DEAD_CODE_STRIPPING_debug = NO;
+DEAD_CODE_STRIPPING_normal = YES;
+DEAD_CODE_STRIPPING = $(DEAD_CODE_STRIPPING_$(CURRENT_VARIANT));
+
+GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+CLANG_DEBUG_INFORMATION_LEVEL[sdk=macosx10.8*] = line-tables-only;
+CLANG_DEBUG_INFORMATION_LEVEL[sdk=macosx10.9*] = line-tables-only;
+
+SDKROOT = macosx.internal;
+
+OTHER_CFLAGS = $(ASAN_OTHER_CFLAGS);
+OTHER_CPLUSPLUSFLAGS = $(ASAN_OTHER_CPLUSPLUSFLAGS);
+OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS);

Added: trunk/Source/WebCore/PAL/Configurations/DebugRelease.xcconfig (0 => 211027)


--- trunk/Source/WebCore/PAL/Configurations/DebugRelease.xcconfig	                        (rev 0)
+++ trunk/Source/WebCore/PAL/Configurations/DebugRelease.xcconfig	2017-01-22 17:24:51 UTC (rev 211027)
@@ -0,0 +1,46 @@
+// Copyright (C) 2017 Apple 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. ``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 "Base.xcconfig"
+
+ARCHS = $(ARCHS_STANDARD_32_64_BIT);
+
+_ONLY_ACTIVE_ARCH_ = YES;
+
+TARGET_MAC_OS_X_VERSION_MAJOR = $(MAC_OS_X_VERSION_MAJOR);
+
+MACOSX_DEPLOYMENT_TARGET = $(MACOSX_DEPLOYMENT_TARGET_$(PLATFORM_NAME)_$(TARGET_MAC_OS_X_VERSION_MAJOR));
+MACOSX_DEPLOYMENT_TARGET_macosx_101000 = 10.10;
+MACOSX_DEPLOYMENT_TARGET_macosx_101100 = 10.11;
+MACOSX_DEPLOYMENT_TARGET_macosx_101200 = 10.12;
+MACOSX_DEPLOYMENT_TARGET_macosx_101300 = 10.13;
+
+GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES;
+DEBUG_INFORMATION_FORMAT = dwarf;
+
+CLANG_DEBUG_INFORMATION_LEVEL[sdk=macosx10.8*] = default;
+CLANG_DEBUG_INFORMATION_LEVEL[sdk=macosx10.9*] = default;
+
+SDKROOT = $(SDKROOT_$(USE_INTERNAL_SDK));
+SDKROOT_ = macosx;
+SDKROOT_YES = macosx.internal;

Copied: trunk/Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig (from rev 211026, trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig) (0 => 211027)


--- trunk/Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig	                        (rev 0)
+++ trunk/Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig	2017-01-22 17:24:51 UTC (rev 211027)
@@ -0,0 +1,219 @@
+// Copyright (C) 2009, 2010, 2014, 2015, 2016, 2017 Apple Inc. All rights reserved.
+// Copyright (C) 2009 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. ``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.
+
+// The contents of this file must be kept in sync with FeatureDefines.xcconfig in _javascript_Core,
+// WebCore, WebKit and WebKit2.  Also the default values of the ENABLE_FEATURE_NAME macros in
+// build-webkit should match the values below, but they do not need to be in the same order.
+
+// Keep this list of features (not enabled/disabled state) in sync with FeatureDefines.vsprops
+// and FeatureDefinesCairo.vsprops in WebKitLibraries/win/tools/vsprops.
+
+// Set any ENABLE_FEATURE_NAME macro to an empty string to disable that feature.
+
+TARGET_MAC_OS_X_VERSION_LESS_THAN_1012000 = $(TARGET_MAC_OS_X_VERSION_LESS_THAN_1012000_$(TARGET_MAC_OS_X_VERSION_MAJOR));
+TARGET_MAC_OS_X_VERSION_LESS_THAN_1012000_101000 = YES;
+TARGET_MAC_OS_X_VERSION_LESS_THAN_1012000_101100 = YES;
+
+ENABLE_3D_TRANSFORMS = ENABLE_3D_TRANSFORMS;
+ENABLE_ACCELERATED_2D_CANVAS = ;
+ENABLE_ACCELERATED_OVERFLOW_SCROLLING[sdk=iphone*] = ENABLE_ACCELERATED_OVERFLOW_SCROLLING;
+
+ENABLE_APPLE_PAY[sdk=iphone*] = $(ENABLE_APPLE_PAY_$(PLATFORM_NAME));
+ENABLE_APPLE_PAY_iphoneos = ENABLE_APPLE_PAY;
+ENABLE_APPLE_PAY_iphonesimulator = ENABLE_APPLE_PAY;
+ENABLE_APPLE_PAY[sdk=iphoneos9*] = ;
+ENABLE_APPLE_PAY[sdk=iphonesimulator9*] = ;
+
+DISABLE_APPLE_PAY_macosx = $(TARGET_MAC_OS_X_VERSION_LESS_THAN_1012000);
+ENABLE_APPLE_PAY[sdk=macosx*] = $(ENABLE_APPLE_PAY_IF_NOT_$(DISABLE_APPLE_PAY_macosx));
+ENABLE_APPLE_PAY_IF_NOT_ = $(ENABLE_APPLE_PAY_IF_NOT_NO);
+ENABLE_APPLE_PAY_IF_NOT_NO = ENABLE_APPLE_PAY;
+ENABLE_APPLE_PAY_IF_NOT_YES = ;
+
+ENABLE_ATTACHMENT_ELEMENT = ENABLE_ATTACHMENT_ELEMENT;
+ENABLE_AVF_CAPTIONS = ENABLE_AVF_CAPTIONS;
+ENABLE_CACHE_PARTITIONING = ENABLE_CACHE_PARTITIONING;
+ENABLE_CANVAS_PATH = ENABLE_CANVAS_PATH;
+ENABLE_CANVAS_PROXY = ;
+ENABLE_CHANNEL_MESSAGING = ENABLE_CHANNEL_MESSAGING;
+ENABLE_ENCRYPTED_MEDIA = ;
+ENABLE_CONTENT_FILTERING[sdk=appletv*] = ;
+ENABLE_CONTENT_FILTERING[sdk=iphone*] = ENABLE_CONTENT_FILTERING;
+ENABLE_CONTENT_FILTERING[sdk=macosx*] = ENABLE_CONTENT_FILTERING;
+ENABLE_CSS_ANIMATIONS_LEVEL_2 = ENABLE_CSS_ANIMATIONS_LEVEL_2;
+ENABLE_CSS_BOX_DECORATION_BREAK = ENABLE_CSS_BOX_DECORATION_BREAK;
+ENABLE_CSS_COMPOSITING = ENABLE_CSS_COMPOSITING;
+ENABLE_CSS_DEVICE_ADAPTATION = ;
+ENABLE_CSS_GRID_LAYOUT = ENABLE_CSS_GRID_LAYOUT;
+ENABLE_CSS_IMAGE_ORIENTATION = ;
+ENABLE_CSS_IMAGE_RESOLUTION = ;
+ENABLE_CSS_REGIONS = ENABLE_CSS_REGIONS;
+ENABLE_CSS_SELECTORS_LEVEL4 = ENABLE_CSS_SELECTORS_LEVEL4;
+ENABLE_CSS3_TEXT = ;
+ENABLE_CURSOR_VISIBILITY = ENABLE_CURSOR_VISIBILITY;
+ENABLE_CUSTOM_SCHEME_HANDLER = ;
+ENABLE_DASHBOARD_SUPPORT[sdk=macosx*] = ENABLE_DASHBOARD_SUPPORT;
+ENABLE_DATALIST_ELEMENT = ;
+ENABLE_DATA_TRANSFER_ITEMS = ;
+ENABLE_DEVICE_ORIENTATION[sdk=iphone*] = ENABLE_DEVICE_ORIENTATION;
+ENABLE_FETCH_API = ENABLE_FETCH_API;
+ENABLE_FILTERS_LEVEL_2 = ENABLE_FILTERS_LEVEL_2;
+ENABLE_FONT_LOAD_EVENTS = ;
+ENABLE_FULLSCREEN_API[sdk=macosx*] = ENABLE_FULLSCREEN_API;
+ENABLE_GAMEPAD = ENABLE_GAMEPAD;
+ENABLE_GAMEPAD[sdk=watch*] = ;
+ENABLE_GAMEPAD_DEPRECATED = ;
+ENABLE_GEOLOCATION = ENABLE_GEOLOCATION;
+ENABLE_ICONDATABASE[sdk=macosx*] = ENABLE_ICONDATABASE;
+ENABLE_INTERSECTION_OBSERVER = ENABLE_INTERSECTION_OBSERVER;
+ENABLE_SERVICE_CONTROLS[sdk=macosx*] = ENABLE_SERVICE_CONTROLS;
+ENABLE_INDEXED_DATABASE = ENABLE_INDEXED_DATABASE;
+ENABLE_INDEXED_DATABASE_IN_WORKERS = ENABLE_INDEXED_DATABASE_IN_WORKERS;
+ENABLE_INPUT_TYPE_COLOR[sdk=macosx*] = ENABLE_INPUT_TYPE_COLOR;
+ENABLE_INPUT_TYPE_COLOR_POPOVER[sdk=macosx*] = ENABLE_INPUT_TYPE_COLOR_POPOVER;
+ENABLE_INPUT_TYPE_DATE[sdk=iphone*] = ENABLE_INPUT_TYPE_DATE;
+ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE = ;
+ENABLE_INPUT_TYPE_DATETIMELOCAL[sdk=iphone*] = ENABLE_INPUT_TYPE_DATETIMELOCAL;
+ENABLE_INPUT_TYPE_MONTH[sdk=iphone*] = ENABLE_INPUT_TYPE_MONTH;
+ENABLE_INPUT_TYPE_TIME[sdk=iphone*] = ENABLE_INPUT_TYPE_TIME;
+ENABLE_INPUT_TYPE_WEEK[sdk=iphone*] = ENABLE_INPUT_TYPE_WEEK;
+
+ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS = ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS;
+
+ENABLE_WIRELESS_PLAYBACK_TARGET[sdk=iphone*] = ENABLE_WIRELESS_PLAYBACK_TARGET;
+ENABLE_WIRELESS_PLAYBACK_TARGET[sdk=macosx*] = $(ENABLE_WIRELESS_PLAYBACK_TARGET_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR))
+ENABLE_WIRELESS_PLAYBACK_TARGET_macosx_101000 = ;
+ENABLE_WIRELESS_PLAYBACK_TARGET_macosx_101100 = ENABLE_WIRELESS_PLAYBACK_TARGET;
+ENABLE_WIRELESS_PLAYBACK_TARGET_macosx_101200 = ENABLE_WIRELESS_PLAYBACK_TARGET;
+ENABLE_WIRELESS_PLAYBACK_TARGET_macosx_101300 = ENABLE_WIRELESS_PLAYBACK_TARGET;
+
+ENABLE_INTL = ENABLE_INTL;
+
+ENABLE_IOS_GESTURE_EVENTS = ;
+ENABLE_IOS_GESTURE_EVENTS[sdk=iphone*] = $(ENABLE_IOS_GESTURE_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_IOS_GESTURE_EVENTS_ios_WITH_INTERNAL_SDK_YES = ENABLE_IOS_GESTURE_EVENTS;
+
+ENABLE_MAC_GESTURE_EVENTS = ;
+ENABLE_MAC_GESTURE_EVENTS[sdk=macosx*] = $(ENABLE_MAC_GESTURE_EVENTS_macosx_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_MAC_GESTURE_EVENTS_macosx_WITH_INTERNAL_SDK_YES = ENABLE_MAC_GESTURE_EVENTS;
+
+ENABLE_TEXT_AUTOSIZING = ENABLE_TEXT_AUTOSIZING;
+ENABLE_DATA_DETECTION = ENABLE_DATA_DETECTION;
+
+ENABLE_IOS_TOUCH_EVENTS[sdk=iphone*] = $(ENABLE_IOS_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_IOS_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_YES = ENABLE_IOS_TOUCH_EVENTS;
+
+ENABLE_KEYBOARD_KEY_ATTRIBUTE = ENABLE_KEYBOARD_KEY_ATTRIBUTE;
+ENABLE_KEYBOARD_CODE_ATTRIBUTE = ENABLE_KEYBOARD_CODE_ATTRIBUTE;
+ENABLE_LEGACY_CSS_VENDOR_PREFIXES = ENABLE_LEGACY_CSS_VENDOR_PREFIXES;
+ENABLE_LEGACY_ENCRYPTED_MEDIA[sdk=macosx*] = ENABLE_LEGACY_ENCRYPTED_MEDIA;
+ENABLE_LEGACY_NOTIFICATIONS[sdk=macosx*] = ENABLE_LEGACY_NOTIFICATIONS;
+ENABLE_LEGACY_VENDOR_PREFIXES = ENABLE_LEGACY_VENDOR_PREFIXES;
+ENABLE_LETTERPRESS[sdk=iphone*] = ENABLE_LETTERPRESS;
+ENABLE_LINK_PREFETCH = ;
+ENABLE_MATHML = ENABLE_MATHML;
+ENABLE_MEDIA_CAPTURE[sdk=iphone*] = ENABLE_MEDIA_CAPTURE;
+ENABLE_MEDIA_CONTROLS_SCRIPT = ENABLE_MEDIA_CONTROLS_SCRIPT;
+ENABLE_MEDIA_SESSION = ;
+
+ENABLE_MEDIA_SOURCE[sdk=macosx*] = ENABLE_MEDIA_SOURCE;
+
+ENABLE_MEDIA_STATISTICS = ;
+ENABLE_MEDIA_STREAM = ENABLE_MEDIA_STREAM;
+ENABLE_METER_ELEMENT = ENABLE_METER_ELEMENT;
+ENABLE_MHTML = ;
+ENABLE_MOUSE_CURSOR_SCALE[sdk=macosx*] = ENABLE_MOUSE_CURSOR_SCALE;
+ENABLE_NAVIGATOR_CONTENT_UTILS = ;
+ENABLE_NAVIGATOR_HWCONCURRENCY = ENABLE_NAVIGATOR_HWCONCURRENCY;
+ENABLE_NOSNIFF = ;
+ENABLE_NOTIFICATIONS[sdk=macosx*] = ENABLE_NOTIFICATIONS;
+ENABLE_PDFKIT_PLUGIN[sdk=macosx*] = ENABLE_PDFKIT_PLUGIN;
+ENABLE_POINTER_LOCK[sdk=macosx*] = ENABLE_POINTER_LOCK;
+ENABLE_PROXIMITY_EVENTS = ;
+ENABLE_PUBLIC_SUFFIX_LIST = ENABLE_PUBLIC_SUFFIX_LIST;
+ENABLE_QUOTA = ;
+ENABLE_READABLE_STREAM_API = ENABLE_READABLE_STREAM_API;
+ENABLE_READABLE_BYTE_STREAM_API = ENABLE_READABLE_BYTE_STREAM_API;
+ENABLE_REQUEST_AUTOCOMPLETE = ;
+ENABLE_REMOTE_INSPECTOR = ENABLE_REMOTE_INSPECTOR;
+ENABLE_RESOLUTION_MEDIA_QUERY = ;
+ENABLE_RESOURCE_USAGE = ENABLE_RESOURCE_USAGE;
+ENABLE_RUBBER_BANDING[sdk=macosx*] = ENABLE_RUBBER_BANDING;
+ENABLE_CSS_SCROLL_SNAP = ENABLE_CSS_SCROLL_SNAP;
+ENABLE_SPEECH_SYNTHESIS = ENABLE_SPEECH_SYNTHESIS;
+ENABLE_SUBTLE_CRYPTO = ENABLE_SUBTLE_CRYPTO;
+ENABLE_SVG_FONTS = ENABLE_SVG_FONTS;
+ENABLE_WEB_RTC = ENABLE_WEB_RTC;
+ENABLE_WRITABLE_STREAM_API = ENABLE_WRITABLE_STREAM_API;
+
+ENABLE_TELEPHONE_NUMBER_DETECTION = ENABLE_TELEPHONE_NUMBER_DETECTION;
+
+ENABLE_CSS_TRAILING_WORD = ENABLE_CSS_TRAILING_WORD;
+
+// FIXME: Remove the USE_INTERNAL_SDK condition once we support touch events when building for iOS with
+// the public SDK. We will also need to update FeatureDefines.h.
+ENABLE_TOUCH_EVENTS[sdk=iphone*] = $(ENABLE_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_YES = ENABLE_TOUCH_EVENTS;
+
+ENABLE_TOUCH_ICON_LOADING = ;
+ENABLE_USERSELECT_ALL = ENABLE_USERSELECT_ALL;
+ENABLE_VIDEO = ENABLE_VIDEO;
+ENABLE_VIDEO_PRESENTATION_MODE[sdk=iphone*] = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE[sdk=macosx*] = $(ENABLE_VIDEO_PRESENTATION_MODE_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR))
+ENABLE_VIDEO_PRESENTATION_MODE_macosx_101200 = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_macosx_101300 = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_TRACK = ENABLE_VIDEO_TRACK;
+ENABLE_DATACUE_VALUE = ENABLE_DATACUE_VALUE;
+ENABLE_VIEW_MODE_CSS_MEDIA = ;
+ENABLE_WEBASSEMBLY = ;
+ENABLE_WEBGL = ENABLE_WEBGL;
+ENABLE_WEBGL2 = ENABLE_WEBGL2;
+ENABLE_WEB_ANIMATIONS = ENABLE_WEB_ANIMATIONS;
+ENABLE_WEB_AUDIO = ENABLE_WEB_AUDIO;
+ENABLE_WEB_REPLAY = $(ENABLE_WEB_REPLAY_$(PLATFORM_NAME)_$(CONFIGURATION));
+ENABLE_WEB_REPLAY_macosx_Debug = ENABLE_WEB_REPLAY;
+ENABLE_WEB_REPLAY_macosx_Release = ENABLE_WEB_REPLAY;
+ENABLE_WEB_SOCKETS = ENABLE_WEB_SOCKETS;
+
+ENABLE_WEB_TIMING = ENABLE_WEB_TIMING;
+ENABLE_USER_TIMING = ;
+
+ENABLE_XSLT = ENABLE_XSLT;
+
+ENABLE_FTL_JIT[sdk=macosx*] = ENABLE_FTL_JIT;
+ENABLE_FTL_JIT[sdk=iphoneos*] = ENABLE_FTL_JIT;
+
+ENABLE_VARIATION_FONTS[sdk=iphone*] = $(ENABLE_VARIATION_FONTS_$(PLATFORM_NAME));
+ENABLE_VARIATION_FONTS_iphoneos = ENABLE_VARIATION_FONTS;
+ENABLE_VARIATION_FONTS_iphonesimulator = ENABLE_VARIATION_FONTS;
+ENABLE_VARIATION_FONTS[sdk=iphoneos9*] = ;
+ENABLE_VARIATION_FONTS[sdk=iphonesimulator9*] = ;
+
+DISABLE_VARIATION_FONTS_macosx = $(TARGET_MAC_OS_X_VERSION_LESS_THAN_1012000);
+ENABLE_VARIATION_FONTS[sdk=macosx*] = $(ENABLE_VARIATION_FONTS_IF_NOT_$(DISABLE_VARIATION_FONTS_macosx));
+ENABLE_VARIATION_FONTS_IF_NOT_ = $(ENABLE_VARIATION_FONTS_IF_NOT_NO);
+ENABLE_VARIATION_FONTS_IF_NOT_NO = ENABLE_VARIATION_FONTS;
+ENABLE_VARIATION_FONTS_IF_NOT_YES = ;
+
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS3_TEXT) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_FETCH_API) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FTL_JIT) $(ENABLE_FULLSC
 REEN_API) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_E
 LEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_HWCONCURRENCY) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_READABLE_STREAM_API) $(ENABLE_READABLE_BYTE_STREAM_API) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEB_ANIMATIONS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_REPLAY) $(ENABLE_WEB_RTC) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_USER_TIMING) $(EN
 ABLE_WEBASSEMBLY) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_WRITABLE_STREAM_API) $(ENABLE_XSLT);

Added: trunk/Source/WebCore/PAL/Configurations/PAL.xcconfig (0 => 211027)


--- trunk/Source/WebCore/PAL/Configurations/PAL.xcconfig	                        (rev 0)
+++ trunk/Source/WebCore/PAL/Configurations/PAL.xcconfig	2017-01-22 17:24:51 UTC (rev 211027)
@@ -0,0 +1,84 @@
+// Copyright (C) 2017 Apple 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. ``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 "FeatureDefines.xcconfig"
+#include "Version.xcconfig"
+
+GCC_PREPROCESSOR_DEFINITIONS = $(DEBUG_DEFINES) $(FEATURE_DEFINES) $(inherited);
+
+WK_XCODE_SUPPORTS_TEXT_BASED_STUBS = $(WK_NOT_$(WK_EMPTY_$(TAPI_VERIFY_MODE)));
+WK_PRIVATE_FRAMEWORKS_DIR = $(WK_PRIVATE_FRAMEWORKS_DIR_$(USE_INTERNAL_SDK));
+WK_PRIVATE_FRAMEWORKS_DIR_YES = $(PRODUCTION_FRAMEWORKS_DIR);
+WK_PRIVATE_FRAMEWORKS_DIR_[sdk=iphonesimulator*] = $(PRODUCTION_FRAMEWORKS_DIR);
+WK_PRIVATE_FRAMEWORKS_DIR_[sdk=iphoneos*] = $(WK_PRIVATE_FRAMEWORKS_DIR_iphoneos_$(WK_XCODE_SUPPORTS_TEXT_BASED_STUBS));
+WK_PRIVATE_FRAMEWORKS_DIR_iphoneos_YES = $(SRCROOT)/../../WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/$(WK_TARGET_IOS_VERSION_MAJOR);
+WK_PRIVATE_FRAMEWORKS_DIR_iphoneos_NO = $(PRODUCTION_FRAMEWORKS_DIR);
+
+FRAMEWORK_SEARCH_PATHS[sdk=iphone*] = $(FRAMEWORK_SEARCH_PATHS_ios_$(CONFIGURATION));
+FRAMEWORK_SEARCH_PATHS_ios_Debug = $(BUILT_PRODUCTS_DIR) $(WK_PRIVATE_FRAMEWORKS_DIR);
+FRAMEWORK_SEARCH_PATHS_ios_Release = $(FRAMEWORK_SEARCH_PATHS_ios_Debug);
+FRAMEWORK_SEARCH_PATHS_ios_Production = $(PRODUCTION_FRAMEWORKS_DIR);
+FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(WK_QUOTED_OVERRIDE_FRAMEWORKS_DIR) $(inherited) $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
+
+OTHER_CFLAGS = $(inherited) -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Frameworks -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/ApplicationServices.framework/Frameworks -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/CoreServices.framework/Frameworks -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/Quartz.framework/Frameworks -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
+OTHER_CPLUSPLUSFLAGS = $(OTHER_CFLAGS);
+
+HEADER_SEARCH_PATHS = PAL ForwardingHeaders icu /usr/include/libxslt /usr/include/libxml2 "$(BUILT_PRODUCTS_DIR)/usr/local/include" $(HEADER_SEARCH_PATHS);
+INSTALL_PATH = $(INSTALL_PATH_$(CONFIGURATION));
+INSTALL_PATH_Production = /usr/local/lib;
+INSTALLHDRS_COPY_PHASE = YES;
+INSTALLHDRS_SCRIPT_PHASE = YES;
+PRODUCT_NAME = PAL;
+PRODUCT_BUNDLE_IDENTIFIER = com.apple.$(PRODUCT_NAME:rfc1034identifier);
+
+WK_PREFIXED_IPHONEOS_DEPLOYMENT_TARGET = V$(IPHONEOS_DEPLOYMENT_TARGET);
+
+NORMAL_PRODUCTION_FRAMEWORKS_DIR[sdk=iphone*] = $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
+NORMAL_PRODUCTION_FRAMEWORKS_DIR[sdk=macosx*] = $(NEXT_ROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks;
+
+PRODUCTION_FRAMEWORKS_DIR[sdk=iphone*] = $(NORMAL_PRODUCTION_FRAMEWORKS_DIR);
+PRODUCTION_FRAMEWORKS_DIR = $(PRODUCTION_FRAMEWORKS_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_$(WK_USE_OVERRIDE_FRAMEWORKS_DIR));
+PRODUCTION_FRAMEWORKS_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_NO = $(NORMAL_PRODUCTION_FRAMEWORKS_DIR);
+PRODUCTION_FRAMEWORKS_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_YES = $(WK_OVERRIDE_FRAMEWORKS_DIR);
+
+EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*] = *.tiff *Cursor.png;
+EXCLUDED_SOURCE_FILE_NAMES[sdk=macosx*] = *IOS.h *IOS.cpp *IOS.mm;
+
+WK_EMPTY_ = YES;
+WK_NOT_ = YES;
+WK_NOT_YES = NO;
+
+WK_USE_OVERRIDE_FRAMEWORKS_DIR = $(WK_NOT_$(WK_EMPTY_$(WK_OVERRIDE_FRAMEWORKS_DIR)));
+
+WK_OVERRIDE_FRAMEWORKS_DIR = $(WK_OVERRIDE_FRAMEWORKS_DIR_USE_STAGING_INSTALL_PATH_$(USE_STAGING_INSTALL_PATH));
+WK_OVERRIDE_FRAMEWORKS_DIR_USE_STAGING_INSTALL_PATH_YES = $(SYSTEM_LIBRARY_DIR)/StagedFrameworks/Safari;
+
+WK_QUOTED_OVERRIDE_FRAMEWORKS_DIR = $(WK_QUOTED_OVERRIDE_FRAMEWORKS_DIR_$(WK_USE_OVERRIDE_FRAMEWORKS_DIR));
+WK_QUOTED_OVERRIDE_FRAMEWORKS_DIR_YES = "$(WK_OVERRIDE_FRAMEWORKS_DIR)";
+
+SKIP_INSTALL = $(SKIP_INSTALL_$(FORCE_TOOL_INSTALL));
+SKIP_INSTALL_ = YES;
+SKIP_INSTALL_NO = YES;
+SKIP_INSTALL_YES = NO;
+
+EXECUTABLE_PREFIX = lib;

Added: trunk/Source/WebCore/PAL/Configurations/Version.xcconfig (0 => 211027)


--- trunk/Source/WebCore/PAL/Configurations/Version.xcconfig	                        (rev 0)
+++ trunk/Source/WebCore/PAL/Configurations/Version.xcconfig	2017-01-22 17:24:51 UTC (rev 211027)
@@ -0,0 +1,60 @@
+// Copyright (C) 2017 Apple 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. ``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. 
+
+MAJOR_VERSION = 604;
+MINOR_VERSION = 1;
+TINY_VERSION = 5;
+MICRO_VERSION = 0;
+NANO_VERSION = 0;
+FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION);
+
+// The bundle version and short version string are set based on the current build configuration, see below.
+BUNDLE_VERSION = $(BUNDLE_VERSION_$(CONFIGURATION));
+SHORT_VERSION_STRING = $(SHORT_VERSION_STRING_$(CONFIGURATION))
+
+// The system version prefix is based on the current system version.
+SYSTEM_VERSION_PREFIX[sdk=iphone*] = 8;
+SYSTEM_VERSION_PREFIX = $(SYSTEM_VERSION_PREFIX_$(PLATFORM_NAME)_$(TARGET_MAC_OS_X_VERSION_MAJOR));
+SYSTEM_VERSION_PREFIX_macosx_101000 = 10;
+SYSTEM_VERSION_PREFIX_macosx_101100 = 11;
+SYSTEM_VERSION_PREFIX_macosx_101200 = 12;
+SYSTEM_VERSION_PREFIX_macosx_101300 = 13;
+
+// The production build always uses the full version with a system version prefix.
+BUNDLE_VERSION_Production = $(SYSTEM_VERSION_PREFIX)$(FULL_VERSION);
+BUNDLE_VERSION_ = $(BUNDLE_VERSION_Production);
+
+// The production build always uses the major version with a system version prefix
+SHORT_VERSION_STRING_Production = $(SYSTEM_VERSION_PREFIX)$(MAJOR_VERSION);
+SHORT_VERSION_STRING_ = $(SHORT_VERSION_STRING_Production);
+
+// Local builds are the full version with a plus suffix.
+BUNDLE_VERSION_Release = $(FULL_VERSION)+;
+BUNDLE_VERSION_Debug = $(BUNDLE_VERSION_Release);
+
+// Local builds use the major version with a plus suffix
+SHORT_VERSION_STRING_Release = $(MAJOR_VERSION)+;
+SHORT_VERSION_STRING_Debug = $(SHORT_VERSION_STRING_Release);
+
+DYLIB_COMPATIBILITY_VERSION = 1;
+DYLIB_CURRENT_VERSION = $(FULL_VERSION);

Added: trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj (0 => 211027)


--- trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj	                        (rev 0)
+++ trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj	2017-01-22 17:24:51 UTC (rev 211027)
@@ -0,0 +1,247 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		1C09D0531E31C44100725F18 /* CryptoDigest.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C09D0521E31C44100725F18 /* CryptoDigest.h */; };
+		1C09D0561E31C46500725F18 /* CryptoDigestCommonCrypto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C09D0551E31C46500725F18 /* CryptoDigestCommonCrypto.cpp */; };
+		1C09D0581E31C57E00725F18 /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C09D0571E31C57E00725F18 /* config.h */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+		1C09D03D1E31C32800725F18 /* libPAL.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPAL.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		1C09D0521E31C44100725F18 /* CryptoDigest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CryptoDigest.h; sourceTree = "<group>"; };
+		1C09D0551E31C46500725F18 /* CryptoDigestCommonCrypto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CryptoDigestCommonCrypto.cpp; path = commoncrypto/CryptoDigestCommonCrypto.cpp; sourceTree = "<group>"; };
+		1C09D0571E31C57E00725F18 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; };
+		1C09D05D1E31C77A00725F18 /* PAL.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = PAL.xcconfig; sourceTree = "<group>"; };
+		1C09D0621E31EC2800725F18 /* DebugRelease.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = DebugRelease.xcconfig; sourceTree = "<group>"; };
+		1C09D0631E31EC3100725F18 /* Base.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = "<group>"; };
+		1C67CEA11E32EDA800F80F2E /* FeatureDefines.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = FeatureDefines.xcconfig; sourceTree = "<group>"; };
+		1C67CEA21E32EE2600F80F2E /* Version.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Version.xcconfig; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		1C09D03A1E31C32800725F18 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		1C09D0341E31C32800725F18 = {
+			isa = PBXGroup;
+			children = (
+				1C09D05C1E31C73300725F18 /* Configurations */,
+				1C09D0571E31C57E00725F18 /* config.h */,
+				1C09D03F1E31C32800725F18 /* pal */,
+				1C09D03E1E31C32800725F18 /* Products */,
+			);
+			sourceTree = "<group>";
+		};
+		1C09D03E1E31C32800725F18 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				1C09D03D1E31C32800725F18 /* libPAL.a */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		1C09D03F1E31C32800725F18 /* pal */ = {
+			isa = PBXGroup;
+			children = (
+				1C09D0511E31C41200725F18 /* crypto */,
+			);
+			path = pal;
+			sourceTree = "<group>";
+		};
+		1C09D0511E31C41200725F18 /* crypto */ = {
+			isa = PBXGroup;
+			children = (
+				1C09D0541E31C45200725F18 /* commoncrypto */,
+				1C09D0521E31C44100725F18 /* CryptoDigest.h */,
+			);
+			path = crypto;
+			sourceTree = "<group>";
+		};
+		1C09D0541E31C45200725F18 /* commoncrypto */ = {
+			isa = PBXGroup;
+			children = (
+				1C09D0551E31C46500725F18 /* CryptoDigestCommonCrypto.cpp */,
+			);
+			name = commoncrypto;
+			sourceTree = "<group>";
+		};
+		1C09D05C1E31C73300725F18 /* Configurations */ = {
+			isa = PBXGroup;
+			children = (
+				1C67CEA21E32EE2600F80F2E /* Version.xcconfig */,
+				1C67CEA11E32EDA800F80F2E /* FeatureDefines.xcconfig */,
+				1C09D05D1E31C77A00725F18 /* PAL.xcconfig */,
+				1C09D0621E31EC2800725F18 /* DebugRelease.xcconfig */,
+				1C09D0631E31EC3100725F18 /* Base.xcconfig */,
+			);
+			path = Configurations;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+		1C09D03B1E31C32800725F18 /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				1C09D0581E31C57E00725F18 /* config.h in Headers */,
+				1C09D0531E31C44100725F18 /* CryptoDigest.h in Headers */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+		1C09D03C1E31C32800725F18 /* PAL */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 1C09D0481E31C32800725F18 /* Build configuration list for PBXNativeTarget "PAL" */;
+			buildPhases = (
+				1C09D0391E31C32800725F18 /* Sources */,
+				1C09D03A1E31C32800725F18 /* Frameworks */,
+				1C09D03B1E31C32800725F18 /* Headers */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = PAL;
+			productName = PAL;
+			productReference = 1C09D03D1E31C32800725F18 /* libPAL.a */;
+			productType = "com.apple.product-type.library.static";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		1C09D0351E31C32800725F18 /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastUpgradeCheck = 0830;
+				TargetAttributes = {
+					1C09D03C1E31C32800725F18 = {
+						CreatedOnToolsVersion = 8.3;
+						ProvisioningStyle = Automatic;
+					};
+				};
+			};
+			buildConfigurationList = 1C09D0381E31C32800725F18 /* Build configuration list for PBXProject "PAL" */;
+			compatibilityVersion = "Xcode 3.2";
+			developmentRegion = English;
+			hasScannedForEncodings = 1;
+			knownRegions = (
+				English,
+				Japanese,
+				French,
+				German,
+				Spanish,
+				Dutch,
+				Italian,
+			);
+			mainGroup = 1C09D0341E31C32800725F18;
+			productRefGroup = 1C09D03E1E31C32800725F18 /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				1C09D03C1E31C32800725F18 /* PAL */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXSourcesBuildPhase section */
+		1C09D0391E31C32800725F18 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				1C09D0561E31C46500725F18 /* CryptoDigestCommonCrypto.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+		1C09D0461E31C32800725F18 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 1C09D0621E31EC2800725F18 /* DebugRelease.xcconfig */;
+			buildSettings = {
+				DEAD_CODE_STRIPPING = "$(DEAD_CODE_STRIPPING_debug)";
+				DEBUG_DEFINES = "$(DEBUG_DEFINES_debug)";
+				GCC_OPTIMIZATION_LEVEL = "$(GCC_OPTIMIZATION_LEVEL_debug)";
+				STRIP_INSTALLED_PRODUCT = "$(STRIP_INSTALLED_PRODUCT_debug)";
+			};
+			name = Debug;
+		};
+		1C09D0471E31C32800725F18 /* Release */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 1C09D0621E31EC2800725F18 /* DebugRelease.xcconfig */;
+			buildSettings = {
+				STRIP_INSTALLED_PRODUCT = NO;
+			};
+			name = Release;
+		};
+		1C09D0491E31C32800725F18 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 1C09D05D1E31C77A00725F18 /* PAL.xcconfig */;
+			buildSettings = {
+			};
+			name = Debug;
+		};
+		1C09D04A1E31C32800725F18 /* Release */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 1C09D05D1E31C77A00725F18 /* PAL.xcconfig */;
+			buildSettings = {
+			};
+			name = Release;
+		};
+		1C09D05A1E31C6F000725F18 /* Production */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 1C09D0631E31EC3100725F18 /* Base.xcconfig */;
+			buildSettings = {
+			};
+			name = Production;
+		};
+		1C09D05B1E31C6F000725F18 /* Production */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 1C09D05D1E31C77A00725F18 /* PAL.xcconfig */;
+			buildSettings = {
+			};
+			name = Production;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		1C09D0381E31C32800725F18 /* Build configuration list for PBXProject "PAL" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				1C09D0461E31C32800725F18 /* Debug */,
+				1C09D0471E31C32800725F18 /* Release */,
+				1C09D05A1E31C6F000725F18 /* Production */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Production;
+		};
+		1C09D0481E31C32800725F18 /* Build configuration list for PBXNativeTarget "PAL" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				1C09D0491E31C32800725F18 /* Debug */,
+				1C09D04A1E31C32800725F18 /* Release */,
+				1C09D05B1E31C6F000725F18 /* Production */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Production;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 1C09D0351E31C32800725F18 /* Project object */;
+}

Added: trunk/Source/WebCore/PAL/config.h (0 => 211027)


--- trunk/Source/WebCore/PAL/config.h	                        (rev 0)
+++ trunk/Source/WebCore/PAL/config.h	2017-01-22 17:24:51 UTC (rev 211027)
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2004, 2005, 2006, 2013, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2009 Google 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.
+ *
+ */
+
+#if defined(HAVE_CONFIG_H) && HAVE_CONFIG_H && defined(BUILDING_WITH_CMAKE)
+#include "cmakeconfig.h"
+#endif
+
+#include <wtf/Platform.h>
+
+#include <wtf/ExportMacros.h>
+
+#ifdef __APPLE__
+#define HAVE_FUNC_USLEEP 1
+#endif /* __APPLE__ */
+
+#if OS(WINDOWS)
+
+#ifndef _WIN32_WINNT
+#define _WIN32_WINNT 0x601
+#endif
+
+#ifndef WINVER
+#define WINVER 0x0601
+#endif
+
+#endif /* OS(WINDOWS) */
+
+#ifdef __cplusplus
+
+// These undefs match up with defines in WebCorePrefix.h for Mac OS X.
+// Helps us catch if anyone uses new or delete by accident in code and doesn't include "config.h".
+#undef new
+#undef delete
+#include <wtf/FastMalloc.h>
+
+#include <ciso646>
+
+#endif
+
+#include <wtf/DisallowCType.h>

Added: trunk/Source/WebCore/PAL/pal/CMakeLists.txt (0 => 211027)


--- trunk/Source/WebCore/PAL/pal/CMakeLists.txt	                        (rev 0)
+++ trunk/Source/WebCore/PAL/pal/CMakeLists.txt	2017-01-22 17:24:51 UTC (rev 211027)
@@ -0,0 +1,17 @@
+set(PAL_SOURCES
+)
+
+set(PAL_INCLUDE_DIRECTORIES
+    "${PAL_DIR}"
+    "${PAL_DIR}/pal"
+    "${PAL_DIR}/pal/crypto"
+)
+
+set(PAL_LIBRARIES
+    WTF
+)
+
+WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
+
+WEBKIT_WRAP_SOURCELIST(${PAL_SOURCES})
+WEBKIT_FRAMEWORK(PAL)

Added: trunk/Source/WebCore/PAL/pal/PlatformEfl.cmake (0 => 211027)


--- trunk/Source/WebCore/PAL/pal/PlatformEfl.cmake	                        (rev 0)
+++ trunk/Source/WebCore/PAL/pal/PlatformEfl.cmake	2017-01-22 17:24:51 UTC (rev 211027)
@@ -0,0 +1,3 @@
+list(APPEND PAL_SOURCES
+    crypto/gcrypt/CryptoDigestGCrypt.cpp
+)

Added: trunk/Source/WebCore/PAL/pal/PlatformGTK.cmake (0 => 211027)


--- trunk/Source/WebCore/PAL/pal/PlatformGTK.cmake	                        (rev 0)
+++ trunk/Source/WebCore/PAL/pal/PlatformGTK.cmake	2017-01-22 17:24:51 UTC (rev 211027)
@@ -0,0 +1,3 @@
+list(APPEND PAL_SOURCES
+    crypto/gcrypt/CryptoDigestGCrypt.cpp
+)

Added: trunk/Source/WebCore/PAL/pal/PlatformMac.cmake (0 => 211027)


--- trunk/Source/WebCore/PAL/pal/PlatformMac.cmake	                        (rev 0)
+++ trunk/Source/WebCore/PAL/pal/PlatformMac.cmake	2017-01-22 17:24:51 UTC (rev 211027)
@@ -0,0 +1,3 @@
+list(APPEND PAL_SOURCES
+    crypto/commoncrypto/CryptoDigestCommonCrypto.cpp
+)

Added: trunk/Source/WebCore/PAL/pal/PlatformWin.cmake (0 => 211027)


--- trunk/Source/WebCore/PAL/pal/PlatformWin.cmake	                        (rev 0)
+++ trunk/Source/WebCore/PAL/pal/PlatformWin.cmake	2017-01-22 17:24:51 UTC (rev 211027)
@@ -0,0 +1,3 @@
+list(APPEND PAL_SOURCES
+    crypto/win/CryptoDigestWin.cpp
+)

Copied: trunk/Source/WebCore/PAL/pal/crypto/CryptoDigest.h (from rev 211026, trunk/Source/WebCore/platform/crypto/CryptoDigest.h) (0 => 211027)


--- trunk/Source/WebCore/PAL/pal/crypto/CryptoDigest.h	                        (rev 0)
+++ trunk/Source/WebCore/PAL/pal/crypto/CryptoDigest.h	2017-01-22 17:24:51 UTC (rev 211027)
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2013, 2016 Apple 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.
+ */
+
+#pragma once
+
+#include <wtf/Noncopyable.h>
+#include <wtf/Vector.h>
+
+namespace PAL {
+
+struct CryptoDigestContext;
+
+class CryptoDigest {
+    WTF_MAKE_NONCOPYABLE(CryptoDigest);
+public:
+    enum class Algorithm {
+        SHA_1,
+        SHA_224,
+        SHA_256,
+        SHA_384,
+        SHA_512,
+    };
+    static std::unique_ptr<CryptoDigest> create(Algorithm);
+    ~CryptoDigest();
+
+    void addBytes(const void* input, size_t length);
+    Vector<uint8_t> computeHash();
+
+private:
+    CryptoDigest();
+
+    std::unique_ptr<CryptoDigestContext> m_context;
+};
+
+} // namespace PAL

Copied: trunk/Source/WebCore/PAL/pal/crypto/commoncrypto/CryptoDigestCommonCrypto.cpp (from rev 211026, trunk/Source/WebCore/platform/crypto/commoncrypto/CryptoDigestCommonCrypto.cpp) (0 => 211027)


--- trunk/Source/WebCore/PAL/pal/crypto/commoncrypto/CryptoDigestCommonCrypto.cpp	                        (rev 0)
+++ trunk/Source/WebCore/PAL/pal/crypto/commoncrypto/CryptoDigestCommonCrypto.cpp	2017-01-22 17:24:51 UTC (rev 211027)
@@ -0,0 +1,179 @@
+/*
+ * Copyright (C) 2013 Apple 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 "CryptoDigest.h"
+
+#include <CommonCrypto/CommonCrypto.h>
+
+namespace PAL {
+
+struct CryptoDigestContext {
+    CryptoDigest::Algorithm algorithm;
+    void* ccContext;
+};
+
+inline CC_SHA1_CTX* toSHA1Context(CryptoDigestContext* context)
+{
+    ASSERT(context->algorithm == CryptoDigest::Algorithm::SHA_1);
+    return static_cast<CC_SHA1_CTX*>(context->ccContext);
+}
+inline CC_SHA256_CTX* toSHA224Context(CryptoDigestContext* context)
+{
+    ASSERT(context->algorithm == CryptoDigest::Algorithm::SHA_224);
+    return static_cast<CC_SHA256_CTX*>(context->ccContext);
+}
+inline CC_SHA256_CTX* toSHA256Context(CryptoDigestContext* context)
+{
+    ASSERT(context->algorithm == CryptoDigest::Algorithm::SHA_256);
+    return static_cast<CC_SHA256_CTX*>(context->ccContext);
+}
+inline CC_SHA512_CTX* toSHA384Context(CryptoDigestContext* context)
+{
+    ASSERT(context->algorithm == CryptoDigest::Algorithm::SHA_384);
+    return static_cast<CC_SHA512_CTX*>(context->ccContext);
+}
+inline CC_SHA512_CTX* toSHA512Context(CryptoDigestContext* context)
+{
+    ASSERT(context->algorithm == CryptoDigest::Algorithm::SHA_512);
+    return static_cast<CC_SHA512_CTX*>(context->ccContext);
+}
+
+CryptoDigest::CryptoDigest()
+    : m_context(new CryptoDigestContext)
+{
+}
+
+CryptoDigest::~CryptoDigest()
+{
+    switch (m_context->algorithm) {
+    case CryptoDigest::Algorithm::SHA_1:
+        delete toSHA1Context(m_context.get());
+        return;
+    case CryptoDigest::Algorithm::SHA_224:
+        delete toSHA224Context(m_context.get());
+        return;
+    case CryptoDigest::Algorithm::SHA_256:
+        delete toSHA256Context(m_context.get());
+        return;
+    case CryptoDigest::Algorithm::SHA_384:
+        delete toSHA384Context(m_context.get());
+        return;
+    case CryptoDigest::Algorithm::SHA_512:
+        delete toSHA512Context(m_context.get());
+        return;
+    }
+}
+
+
+std::unique_ptr<CryptoDigest> CryptoDigest::create(CryptoDigest::Algorithm algorithm)
+{
+    std::unique_ptr<CryptoDigest> digest(new CryptoDigest);
+    digest->m_context->algorithm = algorithm;
+
+    switch (algorithm) {
+    case CryptoDigest::Algorithm::SHA_1: {
+        CC_SHA1_CTX* context = new CC_SHA1_CTX;
+        digest->m_context->ccContext = context;
+        CC_SHA1_Init(context);
+        return digest;
+    }
+    case CryptoDigest::Algorithm::SHA_224: {
+        CC_SHA256_CTX* context = new CC_SHA256_CTX;
+        digest->m_context->ccContext = context;
+        CC_SHA224_Init(context);
+        return digest;
+    }
+    case CryptoDigest::Algorithm::SHA_256: {
+        CC_SHA256_CTX* context = new CC_SHA256_CTX;
+        digest->m_context->ccContext = context;
+        CC_SHA256_Init(context);
+        return digest;
+    }
+    case CryptoDigest::Algorithm::SHA_384: {
+        CC_SHA512_CTX* context = new CC_SHA512_CTX;
+        digest->m_context->ccContext = context;
+        CC_SHA384_Init(context);
+        return digest;
+    }
+    case CryptoDigest::Algorithm::SHA_512: {
+        CC_SHA512_CTX* context = new CC_SHA512_CTX;
+        digest->m_context->ccContext = context;
+        CC_SHA512_Init(context);
+        return digest;
+    }
+    }
+}
+
+void CryptoDigest::addBytes(const void* input, size_t length)
+{
+    switch (m_context->algorithm) {
+    case CryptoDigest::Algorithm::SHA_1:
+        CC_SHA1_Update(toSHA1Context(m_context.get()), input, length);
+        return;
+    case CryptoDigest::Algorithm::SHA_224:
+        CC_SHA224_Update(toSHA224Context(m_context.get()), input, length);
+        return;
+    case CryptoDigest::Algorithm::SHA_256:
+        CC_SHA256_Update(toSHA256Context(m_context.get()), input, length);
+        return;
+    case CryptoDigest::Algorithm::SHA_384:
+        CC_SHA384_Update(toSHA384Context(m_context.get()), input, length);
+        return;
+    case CryptoDigest::Algorithm::SHA_512:
+        CC_SHA512_Update(toSHA512Context(m_context.get()), input, length);
+        return;
+    }
+}
+
+Vector<uint8_t> CryptoDigest::computeHash()
+{
+    Vector<uint8_t> result;
+    switch (m_context->algorithm) {
+    case CryptoDigest::Algorithm::SHA_1:
+        result.resize(CC_SHA1_DIGEST_LENGTH);
+        CC_SHA1_Final(result.data(), toSHA1Context(m_context.get()));
+        break;
+    case CryptoDigest::Algorithm::SHA_224:
+        result.resize(CC_SHA224_DIGEST_LENGTH);
+        CC_SHA224_Final(result.data(), toSHA224Context(m_context.get()));
+        break;
+    case CryptoDigest::Algorithm::SHA_256:
+        result.resize(CC_SHA256_DIGEST_LENGTH);
+        CC_SHA256_Final(result.data(), toSHA256Context(m_context.get()));
+        break;
+    case CryptoDigest::Algorithm::SHA_384:
+        result.resize(CC_SHA384_DIGEST_LENGTH);
+        CC_SHA384_Final(result.data(), toSHA384Context(m_context.get()));
+        break;
+    case CryptoDigest::Algorithm::SHA_512:
+        result.resize(CC_SHA512_DIGEST_LENGTH);
+        CC_SHA512_Final(result.data(), toSHA512Context(m_context.get()));
+        break;
+    }
+    return result;
+}
+
+} // namespace PAL

Copied: trunk/Source/WebCore/PAL/pal/crypto/gcrypt/CryptoDigestGCrypt.cpp (from rev 211026, trunk/Source/WebCore/platform/crypto/gcrypt/CryptoDigestGCrypt.cpp) (0 => 211027)


--- trunk/Source/WebCore/PAL/pal/crypto/gcrypt/CryptoDigestGCrypt.cpp	                        (rev 0)
+++ trunk/Source/WebCore/PAL/pal/crypto/gcrypt/CryptoDigestGCrypt.cpp	2017-01-22 17:24:51 UTC (rev 211027)
@@ -0,0 +1,97 @@
+/*
+ * Copyright (C) 2014 Igalia S.L.
+ * Copyright (C) 2016 SoftAtHome
+ *
+ * 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 "CryptoDigest.h"
+
+#include <gcrypt.h>
+
+namespace PAL {
+
+struct CryptoDigestContext {
+    int algorithm;
+    gcry_md_hd_t md;
+};
+
+CryptoDigest::CryptoDigest()
+    : m_context(new CryptoDigestContext)
+{
+}
+
+CryptoDigest::~CryptoDigest()
+{
+}
+
+std::unique_ptr<CryptoDigest> CryptoDigest::create(CryptoDigest::Algorithm algorithm)
+{
+    int gcryptAlgorithm;
+
+    switch (algorithm) {
+    case CryptoDigest::Algorithm::SHA_1:
+        gcryptAlgorithm = GCRY_MD_SHA1;
+        break;
+    case CryptoDigest::Algorithm::SHA_224:
+        gcryptAlgorithm = GCRY_MD_SHA224;
+        break;
+    case CryptoDigest::Algorithm::SHA_256:
+        gcryptAlgorithm = GCRY_MD_SHA256;
+        break;
+    case CryptoDigest::Algorithm::SHA_384:
+        gcryptAlgorithm = GCRY_MD_SHA384;
+        break;
+    case CryptoDigest::Algorithm::SHA_512:
+        gcryptAlgorithm = GCRY_MD_SHA512;
+        break;
+    }
+
+    std::unique_ptr<CryptoDigest> digest(new CryptoDigest);
+    digest->m_context->algorithm = gcryptAlgorithm;
+
+    gcry_md_open(&digest->m_context->md, gcryptAlgorithm, 0);
+    if (!digest->m_context->md)
+        return nullptr;
+
+    return digest;
+}
+
+void CryptoDigest::addBytes(const void* input, size_t length)
+{
+    gcry_md_write(m_context->md, input, length);
+}
+
+Vector<uint8_t> CryptoDigest::computeHash()
+{
+    int digestLen = gcry_md_get_algo_dlen(m_context->algorithm);
+    Vector<uint8_t> result(digestLen);
+
+    gcry_md_final(m_context->md);
+    memcpy(result.data(), gcry_md_read(m_context->md, 0), digestLen);
+    gcry_md_close(m_context->md);
+
+    return result;
+}
+
+} // namespace PAL

Copied: trunk/Source/WebCore/PAL/pal/crypto/gnutls/CryptoDigestGnuTLS.cpp (from rev 211026, trunk/Source/WebCore/platform/crypto/gnutls/CryptoDigestGnuTLS.cpp) (0 => 211027)


--- trunk/Source/WebCore/PAL/pal/crypto/gnutls/CryptoDigestGnuTLS.cpp	                        (rev 0)
+++ trunk/Source/WebCore/PAL/pal/crypto/gnutls/CryptoDigestGnuTLS.cpp	2017-01-22 17:24:51 UTC (rev 211027)
@@ -0,0 +1,102 @@
+/*
+ * Copyright (C) 2014 Igalia S.L. 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 "CryptoDigest.h"
+
+#include <gnutls/gnutls.h>
+#include <gnutls/crypto.h>
+
+namespace PAL {
+
+struct CryptoDigestContext {
+    gnutls_digest_algorithm_t algorithm;
+    gnutls_hash_hd_t hash;
+};
+
+CryptoDigest::CryptoDigest()
+    : m_context(new CryptoDigestContext)
+{
+}
+
+CryptoDigest::~CryptoDigest()
+{
+    gnutls_hash_deinit(m_context->hash, 0);
+}
+
+std::unique_ptr<CryptoDigest> CryptoDigest::create(CryptoDigest::Algorithm algorithm)
+{
+    gnutls_digest_algorithm_t gnutlsAlgorithm;
+
+    switch (algorithm) {
+    case CryptoDigest::Algorithm::SHA_1: {
+        gnutlsAlgorithm = GNUTLS_DIG_SHA1;
+        break;
+    }
+    case CryptoDigest::Algorithm::SHA_224: {
+        gnutlsAlgorithm = GNUTLS_DIG_SHA224;
+        break;
+    }
+    case CryptoDigest::Algorithm::SHA_256: {
+        gnutlsAlgorithm = GNUTLS_DIG_SHA256;
+        break;
+    }
+    case CryptoDigest::Algorithm::SHA_384: {
+        gnutlsAlgorithm = GNUTLS_DIG_SHA384;
+        break;
+    }
+    case CryptoDigest::Algorithm::SHA_512: {
+        gnutlsAlgorithm = GNUTLS_DIG_SHA512;
+        break;
+    }
+    }
+
+    std::unique_ptr<CryptoDigest> digest(new CryptoDigest);
+    digest->m_context->algorithm = gnutlsAlgorithm;
+
+    int ret = gnutls_hash_init(&digest->m_context->hash, gnutlsAlgorithm);
+    if (ret != GNUTLS_E_SUCCESS)
+        return nullptr;
+
+    return digest;
+}
+
+void CryptoDigest::addBytes(const void* input, size_t length)
+{
+    gnutls_hash(m_context->hash, input, length);
+}
+
+Vector<uint8_t> CryptoDigest::computeHash()
+{
+    Vector<uint8_t> result;
+    int digestLen = gnutls_hash_get_len(m_context->algorithm);
+    result.resize(digestLen);
+
+    gnutls_hash_output(m_context->hash, result.data());
+
+    return result;
+}
+
+} // namespace PAL

Copied: trunk/Source/WebCore/PAL/pal/crypto/win/CryptoDigestWin.cpp (from rev 211026, trunk/Source/WebCore/platform/crypto/win/CryptoDigestWin.cpp) (0 => 211027)


--- trunk/Source/WebCore/PAL/pal/crypto/win/CryptoDigestWin.cpp	                        (rev 0)
+++ trunk/Source/WebCore/PAL/pal/crypto/win/CryptoDigestWin.cpp	2017-01-22 17:24:51 UTC (rev 211027)
@@ -0,0 +1,104 @@
+/*
+ * Copyright (C) 2016 Apple 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 "CryptoDigest.h"
+
+#include <windows.h>
+#include <wincrypt.h>
+
+namespace PAL {
+
+struct CryptoDigestContext {
+    CryptoDigest::Algorithm algorithm;
+    HCRYPTPROV hContext { 0 };
+    HCRYPTHASH hHash { 0 };
+};
+
+CryptoDigest::CryptoDigest()
+    : m_context(new CryptoDigestContext)
+{
+}
+
+CryptoDigest::~CryptoDigest()
+{
+    if (HCRYPTHASH hHash = m_context->hHash)
+        CryptDestroyHash(hHash);
+    if (HCRYPTPROV hContext = m_context->hContext)
+        CryptReleaseContext(hContext, 0);
+}
+
+std::unique_ptr<CryptoDigest> CryptoDigest::create(Algorithm algorithm)
+{
+    std::unique_ptr<CryptoDigest> digest(new CryptoDigest);
+    digest->m_context->algorithm = algorithm;
+    if (!CryptAcquireContext(&digest->m_context->hContext, nullptr, nullptr /* use default provider */, PROV_RSA_AES, CRYPT_VERIFYCONTEXT))
+        return nullptr;
+    bool succeeded = false;
+    switch (algorithm) {
+    case CryptoDigest::Algorithm::SHA_1: {
+        succeeded = CryptCreateHash(digest->m_context->hContext, CALG_SHA1, 0, 0, &digest->m_context->hHash);
+        break;
+    }
+    case CryptoDigest::Algorithm::SHA_256: {
+        succeeded = CryptCreateHash(digest->m_context->hContext, CALG_SHA_256, 0, 0, &digest->m_context->hHash);
+        break;
+    }
+    case CryptoDigest::Algorithm::SHA_384: {
+        succeeded = CryptCreateHash(digest->m_context->hContext, CALG_SHA_384, 0, 0, &digest->m_context->hHash);
+        break;
+    }
+    case CryptoDigest::Algorithm::SHA_512: {
+        succeeded = CryptCreateHash(digest->m_context->hContext, CALG_SHA_512, 0, 0, &digest->m_context->hHash);
+        break;
+    }
+    }
+    if (succeeded)
+        return digest;
+    return nullptr;
+}
+
+void CryptoDigest::addBytes(const void* input, size_t length)
+{
+    if (!input || !length)
+        return;
+    RELEASE_ASSERT(CryptHashData(m_context->hHash, reinterpret_cast<const BYTE*>(input), length, 0));
+}
+
+Vector<uint8_t> CryptoDigest::computeHash()
+{
+    Vector<uint8_t> result;
+    DWORD digestLengthBuffer;
+    DWORD digestLengthBufferSize = sizeof(digestLengthBuffer);
+
+    RELEASE_ASSERT(CryptGetHashParam(m_context->hHash, HP_HASHSIZE, reinterpret_cast<BYTE*>(&digestLengthBuffer), &digestLengthBufferSize, 0));
+    result.resize(digestLengthBuffer);
+
+    RELEASE_ASSERT(CryptGetHashParam(m_context->hHash, HP_HASHVAL, result.data(), &digestLengthBuffer, 0));
+    RELEASE_ASSERT(result.size() == digestLengthBuffer);
+    return result;
+}
+
+} // namespace PAL

Modified: trunk/Source/WebCore/PlatformEfl.cmake (211026 => 211027)


--- trunk/Source/WebCore/PlatformEfl.cmake	2017-01-22 08:29:30 UTC (rev 211026)
+++ trunk/Source/WebCore/PlatformEfl.cmake	2017-01-22 17:24:51 UTC (rev 211027)
@@ -69,8 +69,6 @@
 
     platform/audio/efl/AudioBusEfl.cpp
 
-    platform/crypto/gcrypt/CryptoDigestGCrypt.cpp
-
     platform/efl/CursorEfl.cpp
     platform/efl/DragDataEfl.cpp
     platform/efl/DragImageEfl.cpp

Modified: trunk/Source/WebCore/PlatformGTK.cmake (211026 => 211027)


--- trunk/Source/WebCore/PlatformGTK.cmake	2017-01-22 08:29:30 UTC (rev 211026)
+++ trunk/Source/WebCore/PlatformGTK.cmake	2017-01-22 17:24:51 UTC (rev 211027)
@@ -68,8 +68,6 @@
 
     platform/audio/glib/AudioBusGLib.cpp
 
-    platform/crypto/gcrypt/CryptoDigestGCrypt.cpp
-
     platform/gamepad/glib/GamepadsGlib.cpp
 
     platform/geoclue/GeolocationProviderGeoclue1.cpp

Modified: trunk/Source/WebCore/PlatformMac.cmake (211026 => 211027)


--- trunk/Source/WebCore/PlatformMac.cmake	2017-01-22 08:29:30 UTC (rev 211026)
+++ trunk/Source/WebCore/PlatformMac.cmake	2017-01-22 17:24:51 UTC (rev 211027)
@@ -333,8 +333,6 @@
     platform/cocoa/ThemeCocoa.mm
     platform/cocoa/WebCoreNSErrorExtras.mm
 
-    platform/crypto/commoncrypto/CryptoDigestCommonCrypto.cpp
-
     platform/gamepad/mac/HIDGamepad.cpp
     platform/gamepad/mac/HIDGamepadProvider.cpp
 

Modified: trunk/Source/WebCore/PlatformWin.cmake (211026 => 211027)


--- trunk/Source/WebCore/PlatformWin.cmake	2017-01-22 08:29:30 UTC (rev 211026)
+++ trunk/Source/WebCore/PlatformWin.cmake	2017-01-22 17:24:51 UTC (rev 211027)
@@ -73,8 +73,6 @@
 
     platform/cf/win/CertificateCFWin.cpp
 
-    platform/crypto/win/CryptoDigestWin.cpp
-
     platform/graphics/GraphicsContext3DPrivate.cpp
 
     platform/graphics/egl/GLContextEGL.cpp

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (211026 => 211027)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2017-01-22 08:29:30 UTC (rev 211026)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2017-01-22 17:24:51 UTC (rev 211027)
@@ -977,6 +977,7 @@
 		1C010701192594DF008A4201 /* InlineTextBoxStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C0106FF192594DF008A4201 /* InlineTextBoxStyle.h */; };
 		1C0939EA1A13E12900B788E5 /* CachedSVGFont.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C0939E81A13E12900B788E5 /* CachedSVGFont.cpp */; };
 		1C0939EB1A13E12900B788E5 /* CachedSVGFont.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C0939E91A13E12900B788E5 /* CachedSVGFont.h */; };
+		1C09D0591E31C6A900725F18 /* libPAL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1C09D0501E31C32900725F18 /* libPAL.a */; };
 		1C18DA58181AF6A500C4EF22 /* TextPainter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C18DA56181AF6A500C4EF22 /* TextPainter.cpp */; };
 		1C18DA59181AF6A500C4EF22 /* TextPainter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C18DA57181AF6A500C4EF22 /* TextPainter.h */; };
 		1C21E57C183ED1FF001C289D /* IOSurfacePool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C21E57A183ED1FF001C289D /* IOSurfacePool.cpp */; };
@@ -6263,8 +6264,6 @@
 		E1F80B8818317252007885C3 /* CryptoKeyPair.h in Headers */ = {isa = PBXBuildFile; fileRef = E1F80B8618317252007885C3 /* CryptoKeyPair.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		E1F80B8D183172B5007885C3 /* JSCryptoKeyPair.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1F80B8B183172B5007885C3 /* JSCryptoKeyPair.cpp */; };
 		E1F80B8E183172B5007885C3 /* JSCryptoKeyPair.h in Headers */ = {isa = PBXBuildFile; fileRef = E1F80B8C183172B5007885C3 /* JSCryptoKeyPair.h */; };
-		E1FE13641834351100892F13 /* CryptoDigestCommonCrypto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1FE13621834351100892F13 /* CryptoDigestCommonCrypto.cpp */; };
-		E1FE136718343A1000892F13 /* CryptoDigest.h in Headers */ = {isa = PBXBuildFile; fileRef = E1FE136618343A1000892F13 /* CryptoDigest.h */; };
 		E1FE136A183FE1AB00892F13 /* CryptoAlgorithmRSA_OAEP.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1FE1368183FE1AB00892F13 /* CryptoAlgorithmRSA_OAEP.cpp */; };
 		E1FE136B183FE1AB00892F13 /* CryptoAlgorithmRSA_OAEP.h in Headers */ = {isa = PBXBuildFile; fileRef = E1FE1369183FE1AB00892F13 /* CryptoAlgorithmRSA_OAEP.h */; };
 		E1FE1370183FECF000892F13 /* CryptoAlgorithmRSA_OAEPMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1FE136E183FECF000892F13 /* CryptoAlgorithmRSA_OAEPMac.cpp */; };
@@ -6889,6 +6888,20 @@
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
+		1C09D04F1E31C32900725F18 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 1C09D04B1E31C32800725F18 /* PAL.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 1C09D03D1E31C32800725F18;
+			remoteInfo = PAL;
+		};
+		1C09D0671E32079D00725F18 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 1C09D04B1E31C32800725F18 /* PAL.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = 1C09D03C1E31C32800725F18;
+			remoteInfo = PAL;
+		};
 		417DA6D413734E0D007C57FB /* PBXContainerItemProxy */ = {
 			isa = PBXContainerItemProxy;
 			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
@@ -8055,6 +8068,7 @@
 		1C0106FF192594DF008A4201 /* InlineTextBoxStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InlineTextBoxStyle.h; sourceTree = "<group>"; };
 		1C0939E81A13E12900B788E5 /* CachedSVGFont.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CachedSVGFont.cpp; sourceTree = "<group>"; };
 		1C0939E91A13E12900B788E5 /* CachedSVGFont.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedSVGFont.h; sourceTree = "<group>"; };
+		1C09D04B1E31C32800725F18 /* PAL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = PAL.xcodeproj; path = PAL/PAL.xcodeproj; sourceTree = "<group>"; };
 		1C18DA56181AF6A500C4EF22 /* TextPainter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextPainter.cpp; sourceTree = "<group>"; };
 		1C18DA57181AF6A500C4EF22 /* TextPainter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextPainter.h; sourceTree = "<group>"; };
 		1C21E57A183ED1FF001C289D /* IOSurfacePool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IOSurfacePool.cpp; sourceTree = "<group>"; };
@@ -14274,8 +14288,6 @@
 		E1F80B8618317252007885C3 /* CryptoKeyPair.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CryptoKeyPair.h; sourceTree = "<group>"; };
 		E1F80B8B183172B5007885C3 /* JSCryptoKeyPair.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCryptoKeyPair.cpp; sourceTree = "<group>"; };
 		E1F80B8C183172B5007885C3 /* JSCryptoKeyPair.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCryptoKeyPair.h; sourceTree = "<group>"; };
-		E1FE13621834351100892F13 /* CryptoDigestCommonCrypto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CryptoDigestCommonCrypto.cpp; sourceTree = "<group>"; };
-		E1FE136618343A1000892F13 /* CryptoDigest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CryptoDigest.h; sourceTree = "<group>"; };
 		E1FE1368183FE1AB00892F13 /* CryptoAlgorithmRSA_OAEP.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CryptoAlgorithmRSA_OAEP.cpp; sourceTree = "<group>"; };
 		E1FE1369183FE1AB00892F13 /* CryptoAlgorithmRSA_OAEP.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CryptoAlgorithmRSA_OAEP.h; sourceTree = "<group>"; };
 		E1FE136E183FECF000892F13 /* CryptoAlgorithmRSA_OAEPMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CryptoAlgorithmRSA_OAEPMac.cpp; sourceTree = "<group>"; };
@@ -14989,6 +15001,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				1C09D0591E31C6A900725F18 /* libPAL.a in Frameworks */,
 				FD2DBF1212B048A300ED98C6 /* Accelerate.framework in Frameworks */,
 				FD2DBF1312B048A300ED98C6 /* AudioToolbox.framework in Frameworks */,
 				1AB33DA512551E320024457A /* IOKit.framework in Frameworks */,
@@ -15404,6 +15417,7 @@
 		0867D691FE84028FC02AAC07 /* WebKit */ = {
 			isa = PBXGroup;
 			children = (
+				1C09D04B1E31C32800725F18 /* PAL.xcodeproj */,
 				65C97AF208EA908800ACD273 /* config.h */,
 				EDEC98020AED7E170059137F /* WebCorePrefix.h */,
 				9307061309E0CA8200B17FE4 /* DerivedSources.make */,
@@ -16085,6 +16099,14 @@
 			path = mac;
 			sourceTree = "<group>";
 		};
+		1C09D04C1E31C32800725F18 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				1C09D0501E31C32900725F18 /* libPAL.a */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
 		1C5FAECA0DCFD8C900D58F78 /* Inspector */ = {
 			isa = PBXGroup;
 			children = (
@@ -22499,7 +22521,6 @@
 				FD31604012B026A300C1A359 /* audio */,
 				1AE42F670AA4B8CB00C8612D /* cf */,
 				A5C974CE11485FDA0066F2AB /* cocoa */,
-				CE50D8CE1C8932ED0072EA5A /* crypto */,
 				515BE1871D54F5DB00DD7C68 /* gamepad */,
 				B2A015910AF6CD53006BCE0E /* graphics */,
 				A59E3C1B11580F340072928E /* ios */,
@@ -22943,23 +22964,6 @@
 			path = ios;
 			sourceTree = "<group>";
 		};
-		CE50D8CE1C8932ED0072EA5A /* crypto */ = {
-			isa = PBXGroup;
-			children = (
-				CE50D8CF1C8932FB0072EA5A /* commoncrypto */,
-				E1FE136618343A1000892F13 /* CryptoDigest.h */,
-			);
-			path = crypto;
-			sourceTree = "<group>";
-		};
-		CE50D8CF1C8932FB0072EA5A /* commoncrypto */ = {
-			isa = PBXGroup;
-			children = (
-				E1FE13621834351100892F13 /* CryptoDigestCommonCrypto.cpp */,
-			);
-			path = commoncrypto;
-			sourceTree = "<group>";
-		};
 		DF9AFD6F13FC31B00015FEB7 /* objc */ = {
 			isa = PBXGroup;
 			children = (
@@ -25253,7 +25257,6 @@
 				E19AC3F11824DC7900349426 /* CryptoAlgorithmSHA256.h in Headers */,
 				E19AC3F31824DC7900349426 /* CryptoAlgorithmSHA384.h in Headers */,
 				E19AC3F51824DC7900349426 /* CryptoAlgorithmSHA512.h in Headers */,
-				E1FE136718343A1000892F13 /* CryptoDigest.h in Headers */,
 				E157A8E518173A3A009F821D /* CryptoKey.h in Headers */,
 				E125F84E1824289D00D84CD9 /* CryptoKeyAES.h in Headers */,
 				E125F85E182C2DF600D84CD9 /* CryptoKeyData.h in Headers */,
@@ -28508,6 +28511,7 @@
 			buildRules = (
 			);
 			dependencies = (
+				1C09D0681E32079D00725F18 /* PBXTargetDependency */,
 				DD041FF109D9E3250010AF2A /* PBXTargetDependency */,
 			);
 			name = WebCore;
@@ -28560,6 +28564,12 @@
 			mainGroup = 0867D691FE84028FC02AAC07 /* WebKit */;
 			productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
 			projectDirPath = "";
+			projectReferences = (
+				{
+					ProductGroup = 1C09D04C1E31C32800725F18 /* Products */;
+					ProjectRef = 1C09D04B1E31C32800725F18 /* PAL.xcodeproj */;
+				},
+			);
 			projectRoot = "";
 			targets = (
 				41816F7913859C550057AAA4 /* All */,
@@ -28571,6 +28581,16 @@
 		};
 /* End PBXProject section */
 
+/* Begin PBXReferenceProxy section */
+		1C09D0501E31C32900725F18 /* libPAL.a */ = {
+			isa = PBXReferenceProxy;
+			fileType = archive.ar;
+			path = libPAL.a;
+			remoteRef = 1C09D04F1E31C32900725F18 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+/* End PBXReferenceProxy section */
+
 /* Begin PBXResourcesBuildPhase section */
 		93F199FD08245E59001E9ABC /* Resources */ = {
 			isa = PBXResourcesBuildPhase;
@@ -29097,7 +29117,6 @@
 				E19AC3F01824DC7900349426 /* CryptoAlgorithmSHA256.cpp in Sources */,
 				E19AC3F21824DC7900349426 /* CryptoAlgorithmSHA384.cpp in Sources */,
 				E19AC3F41824DC7900349426 /* CryptoAlgorithmSHA512.cpp in Sources */,
-				E1FE13641834351100892F13 /* CryptoDigestCommonCrypto.cpp in Sources */,
 				E157A8E418173A3A009F821D /* CryptoKey.cpp in Sources */,
 				E125F84D1824289D00D84CD9 /* CryptoKeyAES.cpp in Sources */,
 				E125F863182C303A00D84CD9 /* CryptoKeyDataOctetSequence.cpp in Sources */,
@@ -31929,6 +31948,11 @@
 /* End PBXSourcesBuildPhase section */
 
 /* Begin PBXTargetDependency section */
+		1C09D0681E32079D00725F18 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = PAL;
+			targetProxy = 1C09D0671E32079D00725F18 /* PBXContainerItemProxy */;
+		};
 		417DA6D513734E0D007C57FB /* PBXTargetDependency */ = {
 			isa = PBXTargetDependency;
 			target = 93F198A508245E59001E9ABC /* WebCore */;

Modified: trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmSHA1.cpp (211026 => 211027)


--- trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmSHA1.cpp	2017-01-22 08:29:30 UTC (rev 211026)
+++ trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmSHA1.cpp	2017-01-22 17:24:51 UTC (rev 211027)
@@ -28,9 +28,9 @@
 
 #if ENABLE(SUBTLE_CRYPTO)
 
-#include "CryptoDigest.h"
 #include "ExceptionCode.h"
 #include "ScriptExecutionContext.h"
+#include <pal/crypto/CryptoDigest.h>
 
 namespace WebCore {
 
@@ -46,7 +46,7 @@
 
 void CryptoAlgorithmSHA1::digest(Vector<uint8_t>&& message, VectorCallback&& callback, ExceptionCallback&& exceptionCallback, ScriptExecutionContext& context, WorkQueue& workQueue)
 {
-    auto digest = CryptoDigest::create(CryptoDigest::Algorithm::SHA_1);
+    auto digest = PAL::CryptoDigest::create(PAL::CryptoDigest::Algorithm::SHA_1);
     if (!digest) {
         exceptionCallback(OperationError);
         return;
@@ -65,7 +65,7 @@
 
 ExceptionOr<void> CryptoAlgorithmSHA1::digest(const CryptoAlgorithmParametersDeprecated&, const CryptoOperationData& data, VectorCallback&& callback, VoidCallback&& failureCallback)
 {
-    auto digest = CryptoDigest::create(CryptoDigest::Algorithm::SHA_1);
+    auto digest = PAL::CryptoDigest::create(PAL::CryptoDigest::Algorithm::SHA_1);
     if (!digest) {
         failureCallback();
         return { };

Modified: trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmSHA224.cpp (211026 => 211027)


--- trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmSHA224.cpp	2017-01-22 08:29:30 UTC (rev 211026)
+++ trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmSHA224.cpp	2017-01-22 17:24:51 UTC (rev 211027)
@@ -28,9 +28,9 @@
 
 #if ENABLE(SUBTLE_CRYPTO)
 
-#include "CryptoDigest.h"
 #include "ExceptionCode.h"
 #include "ScriptExecutionContext.h"
+#include <pal/crypto/CryptoDigest.h>
 
 namespace WebCore {
 
@@ -46,7 +46,7 @@
 
 void CryptoAlgorithmSHA224::digest(Vector<uint8_t>&& message, VectorCallback&& callback, ExceptionCallback&& exceptionCallback, ScriptExecutionContext& context, WorkQueue& workQueue)
 {
-    auto digest = CryptoDigest::create(CryptoDigest::Algorithm::SHA_224);
+    auto digest = PAL::CryptoDigest::create(PAL::CryptoDigest::Algorithm::SHA_224);
     if (!digest) {
         exceptionCallback(OperationError);
         return;
@@ -65,7 +65,7 @@
 
 ExceptionOr<void> CryptoAlgorithmSHA224::digest(const CryptoAlgorithmParametersDeprecated&, const CryptoOperationData& data, VectorCallback&& callback, VoidCallback&& failureCallback)
 {
-    auto digest = CryptoDigest::create(CryptoDigest::Algorithm::SHA_224);
+    auto digest = PAL::CryptoDigest::create(PAL::CryptoDigest::Algorithm::SHA_224);
     if (!digest) {
         failureCallback();
         return { };

Modified: trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmSHA256.cpp (211026 => 211027)


--- trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmSHA256.cpp	2017-01-22 08:29:30 UTC (rev 211026)
+++ trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmSHA256.cpp	2017-01-22 17:24:51 UTC (rev 211027)
@@ -28,9 +28,9 @@
 
 #if ENABLE(SUBTLE_CRYPTO)
 
-#include "CryptoDigest.h"
 #include "ExceptionCode.h"
 #include "ScriptExecutionContext.h"
+#include <pal/crypto/CryptoDigest.h>
 
 namespace WebCore {
 
@@ -46,7 +46,7 @@
 
 void CryptoAlgorithmSHA256::digest(Vector<uint8_t>&& message, VectorCallback&& callback, ExceptionCallback&& exceptionCallback, ScriptExecutionContext& context, WorkQueue& workQueue)
 {
-    auto digest = CryptoDigest::create(CryptoDigest::Algorithm::SHA_256);
+    auto digest = PAL::CryptoDigest::create(PAL::CryptoDigest::Algorithm::SHA_256);
     if (!digest) {
         exceptionCallback(OperationError);
         return;
@@ -65,7 +65,7 @@
 
 ExceptionOr<void> CryptoAlgorithmSHA256::digest(const CryptoAlgorithmParametersDeprecated&, const CryptoOperationData& data, VectorCallback&& callback, VoidCallback&& failureCallback)
 {
-    auto digest = CryptoDigest::create(CryptoDigest::Algorithm::SHA_256);
+    auto digest = PAL::CryptoDigest::create(PAL::CryptoDigest::Algorithm::SHA_256);
     if (!digest) {
         failureCallback();
         return { };

Modified: trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmSHA384.cpp (211026 => 211027)


--- trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmSHA384.cpp	2017-01-22 08:29:30 UTC (rev 211026)
+++ trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmSHA384.cpp	2017-01-22 17:24:51 UTC (rev 211027)
@@ -28,9 +28,9 @@
 
 #if ENABLE(SUBTLE_CRYPTO)
 
-#include "CryptoDigest.h"
 #include "ExceptionCode.h"
 #include "ScriptExecutionContext.h"
+#include <pal/crypto/CryptoDigest.h>
 
 namespace WebCore {
 
@@ -46,7 +46,7 @@
 
 void CryptoAlgorithmSHA384::digest(Vector<uint8_t>&& message, VectorCallback&& callback, ExceptionCallback&& exceptionCallback, ScriptExecutionContext& context, WorkQueue& workQueue)
 {
-    auto digest = CryptoDigest::create(CryptoDigest::Algorithm::SHA_384);
+    auto digest = PAL::CryptoDigest::create(PAL::CryptoDigest::Algorithm::SHA_384);
     if (!digest) {
         exceptionCallback(OperationError);
         return;
@@ -65,7 +65,7 @@
 
 ExceptionOr<void> CryptoAlgorithmSHA384::digest(const CryptoAlgorithmParametersDeprecated&, const CryptoOperationData& data, VectorCallback&& callback, VoidCallback&& failureCallback)
 {
-    auto digest = CryptoDigest::create(CryptoDigest::Algorithm::SHA_384);
+    auto digest = PAL::CryptoDigest::create(PAL::CryptoDigest::Algorithm::SHA_384);
     if (!digest) {
         failureCallback();
         return { };

Modified: trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmSHA512.cpp (211026 => 211027)


--- trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmSHA512.cpp	2017-01-22 08:29:30 UTC (rev 211026)
+++ trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmSHA512.cpp	2017-01-22 17:24:51 UTC (rev 211027)
@@ -28,9 +28,9 @@
 
 #if ENABLE(SUBTLE_CRYPTO)
 
-#include "CryptoDigest.h"
 #include "ExceptionCode.h"
 #include "ScriptExecutionContext.h"
+#include <pal/crypto/CryptoDigest.h>
 
 namespace WebCore {
 
@@ -46,7 +46,7 @@
 
 void CryptoAlgorithmSHA512::digest(Vector<uint8_t>&& message, VectorCallback&& callback, ExceptionCallback&& exceptionCallback, ScriptExecutionContext& context, WorkQueue& workQueue)
 {
-    auto digest = CryptoDigest::create(CryptoDigest::Algorithm::SHA_512);
+    auto digest = PAL::CryptoDigest::create(PAL::CryptoDigest::Algorithm::SHA_512);
     if (!digest) {
         exceptionCallback(OperationError);
         return;
@@ -65,7 +65,7 @@
 
 ExceptionOr<void> CryptoAlgorithmSHA512::digest(const CryptoAlgorithmParametersDeprecated&, const CryptoOperationData& data, VectorCallback&& callback, VoidCallback&& failureCallback)
 {
-    auto digest = CryptoDigest::create(CryptoDigest::Algorithm::SHA_512);
+    auto digest = PAL::CryptoDigest::create(PAL::CryptoDigest::Algorithm::SHA_512);
     if (!digest) {
         failureCallback();
         return { };

Modified: trunk/Source/WebCore/crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp (211026 => 211027)


--- trunk/Source/WebCore/crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp	2017-01-22 08:29:30 UTC (rev 211026)
+++ trunk/Source/WebCore/crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp	2017-01-22 17:24:51 UTC (rev 211027)
@@ -30,26 +30,26 @@
 
 #include "CommonCryptoUtilities.h"
 #include "CryptoAlgorithmRsaSsaParamsDeprecated.h"
-#include "CryptoDigest.h"
 #include "CryptoKeyRSA.h"
 #include "ExceptionCode.h"
 #include "ScriptExecutionContext.h"
+#include <pal/crypto/CryptoDigest.h>
 
 namespace WebCore {
 
-inline std::optional<CryptoDigest::Algorithm> cryptoDigestAlgorithm(CryptoAlgorithmIdentifier hashFunction)
+inline std::optional<PAL::CryptoDigest::Algorithm> cryptoDigestAlgorithm(CryptoAlgorithmIdentifier hashFunction)
 {
     switch (hashFunction) {
     case CryptoAlgorithmIdentifier::SHA_1:
-        return CryptoDigest::Algorithm::SHA_1;
+        return PAL::CryptoDigest::Algorithm::SHA_1;
     case CryptoAlgorithmIdentifier::SHA_224:
-        return CryptoDigest::Algorithm::SHA_224;
+        return PAL::CryptoDigest::Algorithm::SHA_224;
     case CryptoAlgorithmIdentifier::SHA_256:
-        return CryptoDigest::Algorithm::SHA_256;
+        return PAL::CryptoDigest::Algorithm::SHA_256;
     case CryptoAlgorithmIdentifier::SHA_384:
-        return CryptoDigest::Algorithm::SHA_384;
+        return PAL::CryptoDigest::Algorithm::SHA_384;
     case CryptoAlgorithmIdentifier::SHA_512:
-        return CryptoDigest::Algorithm::SHA_512;
+        return PAL::CryptoDigest::Algorithm::SHA_512;
     default:
         return std::nullopt;
     }
@@ -66,7 +66,7 @@
     auto cryptoDigestAlgorithm = WebCore::cryptoDigestAlgorithm(hash);
     if (!cryptoDigestAlgorithm)
         return Exception { OperationError };
-    auto digest = CryptoDigest::create(*cryptoDigestAlgorithm);
+    auto digest = PAL::CryptoDigest::create(*cryptoDigestAlgorithm);
     if (!digest)
         return Exception { OperationError };
     digest->addBytes(data, dataLength);
@@ -93,7 +93,7 @@
     auto cryptoDigestAlgorithm = WebCore::cryptoDigestAlgorithm(hash);
     if (!cryptoDigestAlgorithm)
         return Exception { OperationError };
-    auto digest = CryptoDigest::create(*cryptoDigestAlgorithm);
+    auto digest = PAL::CryptoDigest::create(*cryptoDigestAlgorithm);
     if (!digest)
         return Exception { OperationError };
     digest->addBytes(data, dataLength);

Modified: trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp (211026 => 211027)


--- trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp	2017-01-22 08:29:30 UTC (rev 211026)
+++ trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp	2017-01-22 17:24:51 UTC (rev 211027)
@@ -45,7 +45,6 @@
 #include "ContainerNode.h"
 #include "Cookie.h"
 #include "CookieJar.h"
-#include "CryptoDigest.h"
 #include "DOMEditor.h"
 #include "DOMPatchSupport.h"
 #include "DOMWindow.h"
@@ -96,6 +95,7 @@
 #include <inspector/IdentifiersFactory.h>
 #include <inspector/InjectedScript.h>
 #include <inspector/InjectedScriptManager.h>
+#include <pal/crypto/CryptoDigest.h>
 #include <runtime/JSCInlines.h>
 #include <wtf/text/Base64.h>
 #include <wtf/text/CString.h>
@@ -1316,7 +1316,7 @@
     TextEncoding documentEncoding = element.document().textEncoding();
     const TextEncoding& encodingToUse = documentEncoding.isValid() ? documentEncoding : UTF8Encoding();
     CString content = encodingToUse.encode(TextNodeTraversal::contentsAsString(element), EntitiesForUnencodables);
-    auto cryptoDigest = CryptoDigest::create(CryptoDigest::Algorithm::SHA_256);
+    auto cryptoDigest = PAL::CryptoDigest::create(PAL::CryptoDigest::Algorithm::SHA_256);
     cryptoDigest->addBytes(content.data(), content.length());
     Vector<uint8_t> digest = cryptoDigest->computeHash();
     return makeString("sha256-", base64Encode(digest.data(), digest.size()));

Modified: trunk/Source/WebCore/page/csp/ContentSecurityPolicy.cpp (211026 => 211027)


--- trunk/Source/WebCore/page/csp/ContentSecurityPolicy.cpp	2017-01-22 08:29:30 UTC (rev 211026)
+++ trunk/Source/WebCore/page/csp/ContentSecurityPolicy.cpp	2017-01-22 17:24:51 UTC (rev 211027)
@@ -33,7 +33,6 @@
 #include "ContentSecurityPolicyHash.h"
 #include "ContentSecurityPolicySource.h"
 #include "ContentSecurityPolicySourceList.h"
-#include "CryptoDigest.h"
 #include "DOMStringList.h"
 #include "Document.h"
 #include "DocumentLoader.h"
@@ -57,6 +56,7 @@
 #include <inspector/InspectorValues.h>
 #include <inspector/ScriptCallStack.h>
 #include <inspector/ScriptCallStackFactory.h>
+#include <pal/crypto/CryptoDigest.h>
 #include <wtf/SetForScope.h>
 #include <wtf/text/StringBuilder.h>
 #include <wtf/text/TextPosition.h>
@@ -301,18 +301,18 @@
     return isAllowed;
 }
 
-static CryptoDigest::Algorithm toCryptoDigestAlgorithm(ContentSecurityPolicyHashAlgorithm algorithm)
+static PAL::CryptoDigest::Algorithm toCryptoDigestAlgorithm(ContentSecurityPolicyHashAlgorithm algorithm)
 {
     switch (algorithm) {
     case ContentSecurityPolicyHashAlgorithm::SHA_256:
-        return CryptoDigest::Algorithm::SHA_256;
+        return PAL::CryptoDigest::Algorithm::SHA_256;
     case ContentSecurityPolicyHashAlgorithm::SHA_384:
-        return CryptoDigest::Algorithm::SHA_384;
+        return PAL::CryptoDigest::Algorithm::SHA_384;
     case ContentSecurityPolicyHashAlgorithm::SHA_512:
-        return CryptoDigest::Algorithm::SHA_512;
+        return PAL::CryptoDigest::Algorithm::SHA_512;
     }
     ASSERT_NOT_REACHED();
-    return CryptoDigest::Algorithm::SHA_512;
+    return PAL::CryptoDigest::Algorithm::SHA_512;
 }
 
 template<typename Predicate>
@@ -333,7 +333,7 @@
     bool foundHashInEnforcedPolicies = false;
     bool foundHashInReportOnlyPolicies = false;
     for (auto algorithm : algorithms) {
-        auto cryptoDigest = CryptoDigest::create(toCryptoDigestAlgorithm(algorithm));
+        auto cryptoDigest = PAL::CryptoDigest::create(toCryptoDigestAlgorithm(algorithm));
         cryptoDigest->addBytes(contentCString.data(), contentCString.length());
         ContentSecurityPolicyHash hash = { algorithm, cryptoDigest->computeHash() };
         if (!foundHashInEnforcedPolicies && allPoliciesWithDispositionAllow(ContentSecurityPolicy::Disposition::Enforce, std::forward<Predicate>(predicate), hash))

Modified: trunk/Source/WebCore/platform/network/soup/SoupNetworkSession.cpp (211026 => 211027)


--- trunk/Source/WebCore/platform/network/soup/SoupNetworkSession.cpp	2017-01-22 08:29:30 UTC (rev 211026)
+++ trunk/Source/WebCore/platform/network/soup/SoupNetworkSession.cpp	2017-01-22 17:24:51 UTC (rev 211027)
@@ -30,7 +30,6 @@
 #include "SoupNetworkSession.h"
 
 #include "AuthenticationChallenge.h"
-#include "CryptoDigest.h"
 #include "FileSystem.h"
 #include "GUniquePtrSoup.h"
 #include "Logging.h"
@@ -38,6 +37,7 @@
 #include "SoupNetworkProxySettings.h"
 #include <glib/gstdio.h>
 #include <libsoup/soup.h>
+#include <pal/crypto/CryptoDigest.h>
 #include <wtf/HashSet.h>
 #include <wtf/NeverDestroyed.h>
 #include <wtf/text/Base64.h>
@@ -78,7 +78,7 @@
         if (!certificateData)
             return String();
 
-        auto digest = CryptoDigest::create(CryptoDigest::Algorithm::SHA_256);
+        auto digest = PAL::CryptoDigest::create(PAL::CryptoDigest::Algorithm::SHA_256);
         digest->addBytes(certificateData->data, certificateData->len);
 
         auto hash = digest->computeHash();

Modified: trunk/Source/WebKit/CMakeLists.txt (211026 => 211027)


--- trunk/Source/WebKit/CMakeLists.txt	2017-01-22 08:29:30 UTC (rev 211026)
+++ trunk/Source/WebKit/CMakeLists.txt	2017-01-22 17:24:51 UTC (rev 211027)
@@ -32,6 +32,7 @@
 set(WebKit_LIBRARIES
     PRIVATE _javascript_Core${DEBUG_SUFFIX}
     PRIVATE WebCore${DEBUG_SUFFIX}
+    PRIVATE PAL${DEBUG_SUFFIX}
 )
 
 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()

Modified: trunk/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig (211026 => 211027)


--- trunk/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig	2017-01-22 08:29:30 UTC (rev 211026)
+++ trunk/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig	2017-01-22 17:24:51 UTC (rev 211027)
@@ -1,4 +1,4 @@
-// Copyright (C) 2009, 2010, 2014, 2015, 2016 Apple Inc. All rights reserved.
+// Copyright (C) 2009, 2010, 2014, 2015, 2016, 2017 Apple Inc. All rights reserved.
 // Copyright (C) 2009 Google Inc. All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without

Modified: trunk/Source/WebKit2/Configurations/FeatureDefines.xcconfig (211026 => 211027)


--- trunk/Source/WebKit2/Configurations/FeatureDefines.xcconfig	2017-01-22 08:29:30 UTC (rev 211026)
+++ trunk/Source/WebKit2/Configurations/FeatureDefines.xcconfig	2017-01-22 17:24:51 UTC (rev 211027)
@@ -1,4 +1,4 @@
-// Copyright (C) 2009, 2010, 2014, 2015, 2016 Apple Inc. All rights reserved.
+// Copyright (C) 2009, 2010, 2014, 2015, 2016, 2017 Apple Inc. All rights reserved.
 // Copyright (C) 2009 Google Inc. All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without

Modified: trunk/Source/cmake/OptionsWin.cmake (211026 => 211027)


--- trunk/Source/cmake/OptionsWin.cmake	2017-01-22 08:29:30 UTC (rev 211026)
+++ trunk/Source/cmake/OptionsWin.cmake	2017-01-22 17:24:51 UTC (rev 211027)
@@ -182,5 +182,6 @@
 set(PORT Win)
 set(_javascript_Core_LIBRARY_TYPE SHARED)
 set(WTF_LIBRARY_TYPE SHARED)
+set(PAL_LIBRARY_TYPE STATIC)
 
 find_package(ICU REQUIRED)

Modified: trunk/Source/cmake/WebKitFS.cmake (211026 => 211027)


--- trunk/Source/cmake/WebKitFS.cmake	2017-01-22 08:29:30 UTC (rev 211026)
+++ trunk/Source/cmake/WebKitFS.cmake	2017-01-22 17:24:51 UTC (rev 211027)
@@ -10,6 +10,9 @@
 if (NOT WEBCORE_DIR)
     set(WEBCORE_DIR "${CMAKE_SOURCE_DIR}/Source/WebCore")
 endif ()
+if (NOT PAL_DIR)
+    set(PAL_DIR "${CMAKE_SOURCE_DIR}/Source/WebCore/PAL")
+endif ()
 if (NOT WEBKIT_DIR)
     set(WEBKIT_DIR "${CMAKE_SOURCE_DIR}/Source/WebKit")
 endif ()

Modified: trunk/Tools/Scripts/webkitpy/style/checkers/featuredefines.py (211026 => 211027)


--- trunk/Tools/Scripts/webkitpy/style/checkers/featuredefines.py	2017-01-22 08:29:30 UTC (rev 211026)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/featuredefines.py	2017-01-22 17:24:51 UTC (rev 211027)
@@ -43,6 +43,7 @@
         feature_defines_files = [
             "Source/_javascript_Core/Configurations/FeatureDefines.xcconfig",
             "Source/WebCore/Configurations/FeatureDefines.xcconfig",
+            "Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig",
             "Source/WebKit/mac/Configurations/FeatureDefines.xcconfig",
             "Source/WebKit2/Configurations/FeatureDefines.xcconfig",
             "Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig",

Modified: trunk/Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig (211026 => 211027)


--- trunk/Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig	2017-01-22 08:29:30 UTC (rev 211026)
+++ trunk/Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig	2017-01-22 17:24:51 UTC (rev 211027)
@@ -1,4 +1,4 @@
-// Copyright (C) 2009, 2010, 2014, 2015, 2016 Apple Inc. All rights reserved.
+// Copyright (C) 2009, 2010, 2014, 2015, 2016, 2017 Apple Inc. All rights reserved.
 // Copyright (C) 2009 Google Inc. All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to