[CMake][Win] Use target oriented design for WebKit
authordon.olmstead@sony.com <don.olmstead@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Apr 2019 15:55:00 +0000 (15:55 +0000)
committerdon.olmstead@sony.com <don.olmstead@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Apr 2019 15:55:00 +0000 (15:55 +0000)
https://bugs.webkit.org/show_bug.cgi?id=197173

Reviewed by Alex Christensen.

.:

Override WebKit_DERIVED_SOUCES_DIR within WinCairo in support of a target
oriented design.

* Source/cmake/OptionsWinCairo.cmake:

Source/WebKit:

Enumerate public framework headers for WinCairo's WebKit implementation and copy them.
Migrate to use WebKit_DERIVED_SOURCES_DIR.

* CMakeLists.txt:
* PlatformGTK.cmake:
* PlatformWPE.cmake:
* PlatformWin.cmake:

Tools:

* TestWebKitAPI/PlatformWin.cmake: Add WebKitFrameworkHeaders as a dependency.
* TestWebKitAPI/Tests/WebKit/curl/Certificates.cpp: Remove unused header.

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

ChangeLog
Source/WebKit/CMakeLists.txt
Source/WebKit/ChangeLog
Source/WebKit/PlatformGTK.cmake
Source/WebKit/PlatformWPE.cmake
Source/WebKit/PlatformWin.cmake
Source/cmake/OptionsWinCairo.cmake
Tools/ChangeLog
Tools/TestWebKitAPI/PlatformWin.cmake
Tools/TestWebKitAPI/Tests/WebKit/curl/Certificates.cpp

index 189d95b..c22ae66 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2019-04-23  Don Olmstead  <don.olmstead@sony.com>
+
+        [CMake][Win] Use target oriented design for WebKit
+        https://bugs.webkit.org/show_bug.cgi?id=197173
+
+        Reviewed by Alex Christensen.
+
+        Override WebKit_DERIVED_SOUCES_DIR within WinCairo in support of a target
+        oriented design.
+
+        * Source/cmake/OptionsWinCairo.cmake:
+
 2019-04-20  Don Olmstead  <don.olmstead@sony.com>
 
         [CMake][Win] Use target oriented design for WebKitLegacy
index 8c3fefa..ce4f200 100644 (file)
@@ -9,6 +9,8 @@ set(WebKit_PRIVATE_INCLUDE_DIRECTORIES
 set(WebKit_INCLUDE_DIRECTORIES
     "${WebCore_PRIVATE_FRAMEWORK_HEADERS_DIR}"
     "${WebKit_FRAMEWORK_HEADERS_DIR}"
+    "${WebKit_DERIVED_SOURCES_DIR}"
+    "${WebKit_DERIVED_SOURCES_DIR}/include"
     "${WEBKIT_DIR}"
     "${WEBKIT_DIR}/NetworkProcess"
     "${WEBKIT_DIR}/NetworkProcess/Classifier"
@@ -90,8 +92,6 @@ set(WebKit_INCLUDE_DIRECTORIES
     "${WEBKIT_DIR}/WebProcess/WebPage"
     "${WEBKIT_DIR}/WebProcess/WebPage/RemoteLayerTree"
     "${WEBKIT_DIR}/WebProcess/WebStorage"
-    "${DERIVED_SOURCES_WEBKIT_DIR}"
-    "${DERIVED_SOURCES_WEBKIT_DIR}/include"
     "${CMAKE_SOURCE_DIR}/Source"
     "${CMAKE_SOURCE_DIR}/WebKitLibraries"
 )
@@ -318,18 +318,18 @@ macro(GENERATE_MESSAGE_SOURCES _output_source _input_files)
     foreach (_file ${_input_files})
         get_filename_component(_name ${_file} NAME_WE)
         add_custom_command(
-            OUTPUT ${DERIVED_SOURCES_WEBKIT_DIR}/${_name}MessageReceiver.cpp ${DERIVED_SOURCES_WEBKIT_DIR}/${_name}Messages.h
+            OUTPUT ${WebKit_DERIVED_SOURCES_DIR}/${_name}MessageReceiver.cpp ${WebKit_DERIVED_SOURCES_DIR}/${_name}Messages.h
             MAIN_DEPENDENCY ${_file}
             DEPENDS ${WEBKIT_DIR}/Scripts/webkit/__init__.py
                     ${WEBKIT_DIR}/Scripts/webkit/messages.py
                     ${WEBKIT_DIR}/Scripts/webkit/model.py
                     ${WEBKIT_DIR}/Scripts/webkit/parser.py
-            COMMAND ${PYTHON_EXECUTABLE} ${WEBKIT_DIR}/Scripts/generate-message-receiver.py ${_file} > ${DERIVED_SOURCES_WEBKIT_DIR}/${_name}MessageReceiver.cpp
-            COMMAND ${PYTHON_EXECUTABLE} ${WEBKIT_DIR}/Scripts/generate-messages-header.py ${_file} > ${DERIVED_SOURCES_WEBKIT_DIR}/${_name}Messages.h
+            COMMAND ${PYTHON_EXECUTABLE} ${WEBKIT_DIR}/Scripts/generate-message-receiver.py ${_file} > ${WebKit_DERIVED_SOURCES_DIR}/${_name}MessageReceiver.cpp
+            COMMAND ${PYTHON_EXECUTABLE} ${WEBKIT_DIR}/Scripts/generate-messages-header.py ${_file} > ${WebKit_DERIVED_SOURCES_DIR}/${_name}Messages.h
             WORKING_DIRECTORY ${WEBKIT_DIR}
             VERBATIM)
 
-        list(APPEND ${_output_source} ${DERIVED_SOURCES_WEBKIT_DIR}/${_name}MessageReceiver.cpp)
+        list(APPEND ${_output_source} ${WebKit_DERIVED_SOURCES_DIR}/${_name}MessageReceiver.cpp)
     endforeach ()
 endmacro()
 GENERATE_MESSAGE_SOURCES(WebKit_DERIVED_SOURCES "${WebKit_MESSAGES_IN_FILES}")
@@ -354,35 +354,35 @@ set(WebKit_AUTOMATION_PROTOCOL_GENERATOR_INPUTS
 )
 
 add_custom_command(
-    OUTPUT ${DERIVED_SOURCES_WEBKIT_DIR}/AutomationBackendDispatchers.h ${DERIVED_SOURCES_WEBKIT_DIR}/AutomationBackendDispatchers.cpp ${DERIVED_SOURCES_WEBKIT_DIR}/AutomationProtocolObjects.h ${DERIVED_SOURCES_WEBKIT_DIR}/AutomationProtocolObjects.cpp ${DERIVED_SOURCES_WEBKIT_DIR}/AutomationFrontendDispatchers.h ${DERIVED_SOURCES_WEBKIT_DIR}/AutomationFrontendDispatchers.cpp
+    OUTPUT ${WebKit_DERIVED_SOURCES_DIR}/AutomationBackendDispatchers.h ${WebKit_DERIVED_SOURCES_DIR}/AutomationBackendDispatchers.cpp ${WebKit_DERIVED_SOURCES_DIR}/AutomationProtocolObjects.h ${WebKit_DERIVED_SOURCES_DIR}/AutomationProtocolObjects.cpp ${WebKit_DERIVED_SOURCES_DIR}/AutomationFrontendDispatchers.h ${WebKit_DERIVED_SOURCES_DIR}/AutomationFrontendDispatchers.cpp
     MAIN_DEPENDENCY ${WebKit_AUTOMATION_PROTOCOL_GENERATOR_INPUTS}
     DEPENDS ${WebKit_AUTOMATION_PROTOCOL_GENERATOR_SCRIPTS}
-    COMMAND ${PYTHON_EXECUTABLE} ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/generate-inspector-protocol-bindings.py --outputDir "${DERIVED_SOURCES_WEBKIT_DIR}" --framework WebKit ${WebKit_AUTOMATION_PROTOCOL_GENERATOR_EXTRA_FLAGS} --backend ${WebKit_AUTOMATION_PROTOCOL_GENERATOR_INPUTS}
+    COMMAND ${PYTHON_EXECUTABLE} ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/generate-inspector-protocol-bindings.py --outputDir "${WebKit_DERIVED_SOURCES_DIR}" --framework WebKit ${WebKit_AUTOMATION_PROTOCOL_GENERATOR_EXTRA_FLAGS} --backend ${WebKit_AUTOMATION_PROTOCOL_GENERATOR_INPUTS}
     VERBATIM)
 
 list(APPEND WebKit_HEADERS
-    ${DERIVED_SOURCES_WEBKIT_DIR}/AutomationBackendDispatchers.h
-    ${DERIVED_SOURCES_WEBKIT_DIR}/AutomationFrontendDispatchers.h
-    ${DERIVED_SOURCES_WEBKIT_DIR}/AutomationProtocolObjects.h
+    ${WebKit_DERIVED_SOURCES_DIR}/AutomationBackendDispatchers.h
+    ${WebKit_DERIVED_SOURCES_DIR}/AutomationFrontendDispatchers.h
+    ${WebKit_DERIVED_SOURCES_DIR}/AutomationProtocolObjects.h
 )
 
 list(APPEND WebKit_SOURCES
-    ${DERIVED_SOURCES_WEBKIT_DIR}/AutomationBackendDispatchers.cpp
-    ${DERIVED_SOURCES_WEBKIT_DIR}/AutomationFrontendDispatchers.cpp
-    ${DERIVED_SOURCES_WEBKIT_DIR}/AutomationProtocolObjects.cpp
+    ${WebKit_DERIVED_SOURCES_DIR}/AutomationBackendDispatchers.cpp
+    ${WebKit_DERIVED_SOURCES_DIR}/AutomationFrontendDispatchers.cpp
+    ${WebKit_DERIVED_SOURCES_DIR}/AutomationProtocolObjects.cpp
 )
 
 add_custom_command(
-    OUTPUT ${DERIVED_SOURCES_WEBKIT_DIR}/WebAutomationSessionProxyScriptSource.h ${DERIVED_SOURCES_WEBKIT_DIR}/WebAutomationSessionProxy.min.js
+    OUTPUT ${WebKit_DERIVED_SOURCES_DIR}/WebAutomationSessionProxyScriptSource.h ${WebKit_DERIVED_SOURCES_DIR}/WebAutomationSessionProxy.min.js
     MAIN_DEPENDENCY ${WEBKIT_DIR}/WebProcess/Automation/WebAutomationSessionProxy.js
     DEPENDS ${JavaScriptCore_SCRIPTS_DIR}/xxd.pl ${JavaScriptCore_SCRIPTS_DIR}/jsmin.py
-    COMMAND ${CMAKE_COMMAND} -E echo "//# sourceURL=__InjectedScript_WebAutomationSessionProxy.js" > ${DERIVED_SOURCES_WEBKIT_DIR}/WebAutomationSessionProxy.min.js
-    COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/jsmin.py < ${WEBKIT_DIR}/WebProcess/Automation/WebAutomationSessionProxy.js >> ${DERIVED_SOURCES_WEBKIT_DIR}/WebAutomationSessionProxy.min.js
-    COMMAND ${PERL_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/xxd.pl WebAutomationSessionProxyScriptSource ${DERIVED_SOURCES_WEBKIT_DIR}/WebAutomationSessionProxy.min.js ${DERIVED_SOURCES_WEBKIT_DIR}/WebAutomationSessionProxyScriptSource.h
+    COMMAND ${CMAKE_COMMAND} -E echo "//# sourceURL=__InjectedScript_WebAutomationSessionProxy.js" > ${WebKit_DERIVED_SOURCES_DIR}/WebAutomationSessionProxy.min.js
+    COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/jsmin.py < ${WEBKIT_DIR}/WebProcess/Automation/WebAutomationSessionProxy.js >> ${WebKit_DERIVED_SOURCES_DIR}/WebAutomationSessionProxy.min.js
+    COMMAND ${PERL_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/xxd.pl WebAutomationSessionProxyScriptSource ${WebKit_DERIVED_SOURCES_DIR}/WebAutomationSessionProxy.min.js ${WebKit_DERIVED_SOURCES_DIR}/WebAutomationSessionProxyScriptSource.h
     VERBATIM)
 
 list(APPEND WebKit_HEADERS
-    ${DERIVED_SOURCES_WEBKIT_DIR}/WebAutomationSessionProxyScriptSource.h
+    ${WebKit_DERIVED_SOURCES_DIR}/WebAutomationSessionProxyScriptSource.h
 )
 
 set(WebKit_WEB_PREFERENCES_TEMPLATES
@@ -396,23 +396,23 @@ set(WebKit_WEB_PREFERENCES_TEMPLATES
 )
 
 add_custom_command(
-    OUTPUT ${DERIVED_SOURCES_WEBKIT_DIR}/WebPageUpdatePreferences.cpp ${DERIVED_SOURCES_WEBKIT_DIR}/WebPreferencesDefinitions.h ${DERIVED_SOURCES_WEBKIT_DIR}/WebPreferencesExperimentalFeatures.cpp ${DERIVED_SOURCES_WEBKIT_DIR}/WebPreferencesInternalDebugFeatures.cpp ${DERIVED_SOURCES_WEBKIT_DIR}/WebPreferencesKeys.cpp ${DERIVED_SOURCES_WEBKIT_DIR}/WebPreferencesKeys.h ${DERIVED_SOURCES_WEBKIT_DIR}/WebPreferencesStoreDefaultsMap.cpp
+    OUTPUT ${WebKit_DERIVED_SOURCES_DIR}/WebPageUpdatePreferences.cpp ${WebKit_DERIVED_SOURCES_DIR}/WebPreferencesDefinitions.h ${WebKit_DERIVED_SOURCES_DIR}/WebPreferencesExperimentalFeatures.cpp ${WebKit_DERIVED_SOURCES_DIR}/WebPreferencesInternalDebugFeatures.cpp ${WebKit_DERIVED_SOURCES_DIR}/WebPreferencesKeys.cpp ${WebKit_DERIVED_SOURCES_DIR}/WebPreferencesKeys.h ${WebKit_DERIVED_SOURCES_DIR}/WebPreferencesStoreDefaultsMap.cpp
     MAIN_DEPENDENCY ${WEBKIT_DIR}/Shared/WebPreferences.yaml
     DEPENDS ${WebKit_WEB_PREFERENCES_TEMPLATES}
-    COMMAND ${RUBY_EXECUTABLE} ${WEBKIT_DIR}/Scripts/GeneratePreferences.rb --input ${WEBKIT_DIR}/Shared/WebPreferences.yaml --outputDir "${DERIVED_SOURCES_WEBKIT_DIR}"
+    COMMAND ${RUBY_EXECUTABLE} ${WEBKIT_DIR}/Scripts/GeneratePreferences.rb --input ${WEBKIT_DIR}/Shared/WebPreferences.yaml --outputDir "${WebKit_DERIVED_SOURCES_DIR}"
     VERBATIM)
 
 list(APPEND WebKit_HEADERS
-    ${DERIVED_SOURCES_WEBKIT_DIR}/WebPreferencesDefinitions.h
-    ${DERIVED_SOURCES_WEBKIT_DIR}/WebPreferencesKeys.h
+    ${WebKit_DERIVED_SOURCES_DIR}/WebPreferencesDefinitions.h
+    ${WebKit_DERIVED_SOURCES_DIR}/WebPreferencesKeys.h
 )
 
 list(APPEND WebKit_SOURCES
-    ${DERIVED_SOURCES_WEBKIT_DIR}/WebPageUpdatePreferences.cpp
-    ${DERIVED_SOURCES_WEBKIT_DIR}/WebPreferencesExperimentalFeatures.cpp
-    ${DERIVED_SOURCES_WEBKIT_DIR}/WebPreferencesInternalDebugFeatures.cpp
-    ${DERIVED_SOURCES_WEBKIT_DIR}/WebPreferencesKeys.cpp
-    ${DERIVED_SOURCES_WEBKIT_DIR}/WebPreferencesStoreDefaultsMap.cpp
+    ${WebKit_DERIVED_SOURCES_DIR}/WebPageUpdatePreferences.cpp
+    ${WebKit_DERIVED_SOURCES_DIR}/WebPreferencesExperimentalFeatures.cpp
+    ${WebKit_DERIVED_SOURCES_DIR}/WebPreferencesInternalDebugFeatures.cpp
+    ${WebKit_DERIVED_SOURCES_DIR}/WebPreferencesKeys.cpp
+    ${WebKit_DERIVED_SOURCES_DIR}/WebPreferencesStoreDefaultsMap.cpp
 )
 
 
index 114c32e..1c863a2 100644 (file)
@@ -1,3 +1,18 @@
+2019-04-23  Don Olmstead  <don.olmstead@sony.com>
+
+        [CMake][Win] Use target oriented design for WebKit
+        https://bugs.webkit.org/show_bug.cgi?id=197173
+
+        Reviewed by Alex Christensen.
+
+        Enumerate public framework headers for WinCairo's WebKit implementation and copy them.
+        Migrate to use WebKit_DERIVED_SOURCES_DIR.
+
+        * CMakeLists.txt:
+        * PlatformGTK.cmake:
+        * PlatformWPE.cmake:
+        * PlatformWin.cmake:
+
 2019-04-23  Chris Dumez  <cdumez@apple.com>
 
         [Process-Swap-On-Navigation] WebKit hangs when going back to a form submission's page due to Process-Swap-On-Navigation on iOS 12.2 and higher
index 3041431..8e06c0a 100644 (file)
@@ -649,11 +649,11 @@ if (ENABLE_PLUGIN_PROCESS_GTK2)
         WebProcess/Plugins/Netscape/unix/NetscapePluginUnix.cpp
         WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
 
-        ${DERIVED_SOURCES_WEBKIT_DIR}/AuxiliaryProcessMessageReceiver.cpp
-        ${DERIVED_SOURCES_WEBKIT_DIR}/PluginControllerProxyMessageReceiver.cpp
-        ${DERIVED_SOURCES_WEBKIT_DIR}/PluginProcessMessageReceiver.cpp
-        ${DERIVED_SOURCES_WEBKIT_DIR}/NPObjectMessageReceiverMessageReceiver.cpp
-        ${DERIVED_SOURCES_WEBKIT_DIR}/WebProcessConnectionMessageReceiver.cpp
+        ${WebKit_DERIVED_SOURCES_DIR}/AuxiliaryProcessMessageReceiver.cpp
+        ${WebKit_DERIVED_SOURCES_DIR}/PluginControllerProxyMessageReceiver.cpp
+        ${WebKit_DERIVED_SOURCES_DIR}/PluginProcessMessageReceiver.cpp
+        ${WebKit_DERIVED_SOURCES_DIR}/NPObjectMessageReceiverMessageReceiver.cpp
+        ${WebKit_DERIVED_SOURCES_DIR}/WebProcessConnectionMessageReceiver.cpp
     )
 
     add_executable(WebKitPluginProcess2 ${PluginProcessGTK2_SOURCES})
index 00c500f..8f4948e 100644 (file)
@@ -82,7 +82,7 @@ list(APPEND WebKit_MESSAGES_IN_FILES
 )
 
 list(APPEND WebKit_DERIVED_SOURCES
-    ${DERIVED_SOURCES_WEBKIT_DIR}/WebKitResourcesGResourceBundle.c
+    ${WebKit_DERIVED_SOURCES_DIR}/WebKitResourcesGResourceBundle.c
 
     ${DERIVED_SOURCES_WPE_API_DIR}/WebKitEnumTypes.cpp
     ${DERIVED_SOURCES_WPE_API_DIR}/WebKitWebProcessEnumTypes.cpp
@@ -206,7 +206,7 @@ if (ENABLE_WEB_AUDIO)
     )
 endif ()
 
-file(WRITE ${DERIVED_SOURCES_WEBKIT_DIR}/WebKitResourcesGResourceBundle.xml
+file(WRITE ${WebKit_DERIVED_SOURCES_DIR}/WebKitResourcesGResourceBundle.xml
     "<?xml version=1.0 encoding=UTF-8?>\n"
     "<gresources>\n"
     "    <gresource prefix=\"/org/webkitwpe/resources\">\n"
@@ -216,9 +216,9 @@ file(WRITE ${DERIVED_SOURCES_WEBKIT_DIR}/WebKitResourcesGResourceBundle.xml
 )
 
 add_custom_command(
-    OUTPUT ${DERIVED_SOURCES_WEBKIT_DIR}/WebKitResourcesGResourceBundle.c
-    DEPENDS ${DERIVED_SOURCES_WEBKIT_DIR}/WebKitResourcesGResourceBundle.xml
-    COMMAND glib-compile-resources --generate --sourcedir=${CMAKE_SOURCE_DIR}/Source/WebCore/Resources --sourcedir=${CMAKE_SOURCE_DIR}/Source/WebCore/platform/audio/resources --target=${DERIVED_SOURCES_WEBKIT_DIR}/WebKitResourcesGResourceBundle.c ${DERIVED_SOURCES_WEBKIT_DIR}/WebKitResourcesGResourceBundle.xml
+    OUTPUT ${WebKit_DERIVED_SOURCES_DIR}/WebKitResourcesGResourceBundle.c
+    DEPENDS ${WebKit_DERIVED_SOURCES_DIR}/WebKitResourcesGResourceBundle.xml
+    COMMAND glib-compile-resources --generate --sourcedir=${CMAKE_SOURCE_DIR}/Source/WebCore/Resources --sourcedir=${CMAKE_SOURCE_DIR}/Source/WebCore/platform/audio/resources --target=${WebKit_DERIVED_SOURCES_DIR}/WebKitResourcesGResourceBundle.c ${WebKit_DERIVED_SOURCES_DIR}/WebKitResourcesGResourceBundle.xml
     VERBATIM
 )
 
index 543701b..4e9e2a6 100644 (file)
@@ -3,8 +3,6 @@ set(WebKit_WebProcess_OUTPUT_NAME WebKitWebProcess)
 set(WebKit_NetworkProcess_OUTPUT_NAME WebKitNetworkProcess)
 set(WebKit_PluginProcess_OUTPUT_NAME WebKitPluginProcess)
 
-file(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBKIT_DIR})
-
 add_definitions(-DBUILDING_WEBKIT)
 
 list(APPEND WebKit_SOURCES
@@ -192,6 +190,160 @@ set(SharedWebKitLibraries
 
 WEBKIT_WRAP_SOURCELIST(${WebKit_SOURCES})
 
+# Temporarily list out shared headers here
+set(WebKit_PUBLIC_FRAMEWORK_HEADERS
+    Shared/API/c/WKArray.h
+    Shared/API/c/WKBase.h
+    Shared/API/c/WKCertificateInfo.h
+    Shared/API/c/WKConnectionRef.h
+    Shared/API/c/WKContextMenuItem.h
+    Shared/API/c/WKContextMenuItemTypes.h
+    Shared/API/c/WKData.h
+    Shared/API/c/WKDeclarationSpecifiers.h
+    Shared/API/c/WKDeprecated.h
+    Shared/API/c/WKDiagnosticLoggingResultType.h
+    Shared/API/c/WKDictionary.h
+    Shared/API/c/WKErrorRef.h
+    Shared/API/c/WKEvent.h
+    Shared/API/c/WKFindOptions.h
+    Shared/API/c/WKGeometry.h
+    Shared/API/c/WKImage.h
+    Shared/API/c/WKMutableArray.h
+    Shared/API/c/WKMutableDictionary.h
+    Shared/API/c/WKNumber.h
+    Shared/API/c/WKPageLoadTypes.h
+    Shared/API/c/WKPageLoadTypesPrivate.h
+    Shared/API/c/WKPageVisibilityTypes.h
+    Shared/API/c/WKPluginInformation.h
+    Shared/API/c/WKSecurityOriginRef.h
+    Shared/API/c/WKSerializedScriptValue.h
+    Shared/API/c/WKString.h
+    Shared/API/c/WKStringPrivate.h
+    Shared/API/c/WKType.h
+    Shared/API/c/WKURL.h
+    Shared/API/c/WKURLRequest.h
+    Shared/API/c/WKURLResponse.h
+    Shared/API/c/WKUserContentInjectedFrames.h
+    Shared/API/c/WKUserScriptInjectionTime.h
+
+    UIProcess/API/C/WKAuthenticationChallenge.h
+    UIProcess/API/C/WKAuthenticationDecisionListener.h
+    UIProcess/API/C/WKBackForwardListItemRef.h
+    UIProcess/API/C/WKBackForwardListRef.h
+    UIProcess/API/C/WKContext.h
+    UIProcess/API/C/WKContextConfigurationRef.h
+    UIProcess/API/C/WKContextConnectionClient.h
+    UIProcess/API/C/WKContextDownloadClient.h
+    UIProcess/API/C/WKContextHistoryClient.h
+    UIProcess/API/C/WKContextInjectedBundleClient.h
+    UIProcess/API/C/WKContextPrivate.h
+    UIProcess/API/C/WKCookieManager.h
+    UIProcess/API/C/WKCredential.h
+    UIProcess/API/C/WKCredentialTypes.h
+    UIProcess/API/C/WKDownload.h
+    UIProcess/API/C/WKFormSubmissionListener.h
+    UIProcess/API/C/WKFrame.h
+    UIProcess/API/C/WKFrameHandleRef.h
+    UIProcess/API/C/WKFrameInfoRef.h
+    UIProcess/API/C/WKFramePolicyListener.h
+    UIProcess/API/C/WKGeolocationManager.h
+    UIProcess/API/C/WKGeolocationPermissionRequest.h
+    UIProcess/API/C/WKGeolocationPosition.h
+    UIProcess/API/C/WKHitTestResult.h
+    UIProcess/API/C/WKIconDatabase.h
+    UIProcess/API/C/WKInspector.h
+    UIProcess/API/C/WKLayoutMode.h
+    UIProcess/API/C/WKMockDisplay.h
+    UIProcess/API/C/WKMockMediaDevice.h
+    UIProcess/API/C/WKNativeEvent.h
+    UIProcess/API/C/WKNavigationActionRef.h
+    UIProcess/API/C/WKNavigationDataRef.h
+    UIProcess/API/C/WKNavigationRef.h
+    UIProcess/API/C/WKNavigationResponseRef.h
+    UIProcess/API/C/WKNotification.h
+    UIProcess/API/C/WKNotificationManager.h
+    UIProcess/API/C/WKNotificationPermissionRequest.h
+    UIProcess/API/C/WKNotificationProvider.h
+    UIProcess/API/C/WKOpenPanelParametersRef.h
+    UIProcess/API/C/WKOpenPanelResultListener.h
+    UIProcess/API/C/WKPage.h
+    UIProcess/API/C/WKPageConfigurationRef.h
+    UIProcess/API/C/WKPageContextMenuClient.h
+    UIProcess/API/C/WKPageDiagnosticLoggingClient.h
+    UIProcess/API/C/WKPageFindClient.h
+    UIProcess/API/C/WKPageFindMatchesClient.h
+    UIProcess/API/C/WKPageFormClient.h
+    UIProcess/API/C/WKPageGroup.h
+    UIProcess/API/C/WKPageInjectedBundleClient.h
+    UIProcess/API/C/WKPageLoaderClient.h
+    UIProcess/API/C/WKPageNavigationClient.h
+    UIProcess/API/C/WKPagePolicyClient.h
+    UIProcess/API/C/WKPagePrivate.h
+    UIProcess/API/C/WKPageRenderingProgressEvents.h
+    UIProcess/API/C/WKPageUIClient.h
+    UIProcess/API/C/WKPluginLoadPolicy.h
+    UIProcess/API/C/WKPreferencesRef.h
+    UIProcess/API/C/WKPreferencesRefPrivate.h
+    UIProcess/API/C/WKProcessTerminationReason.h
+    UIProcess/API/C/WKProtectionSpace.h
+    UIProcess/API/C/WKProtectionSpaceTypes.h
+    UIProcess/API/C/WKResourceCacheManager.h
+    UIProcess/API/C/WKSessionStateRef.h
+    UIProcess/API/C/WKTestingSupport.h
+    UIProcess/API/C/WKTextChecker.h
+    UIProcess/API/C/WKUserContentControllerRef.h
+    UIProcess/API/C/WKUserContentExtensionStoreRef.h
+    UIProcess/API/C/WKUserMediaPermissionCheck.h
+    UIProcess/API/C/WKUserMediaPermissionRequest.h
+    UIProcess/API/C/WKUserScriptRef.h
+    UIProcess/API/C/WKViewportAttributes.h
+    UIProcess/API/C/WKWebsiteDataStoreRef.h
+    UIProcess/API/C/WKWebsitePolicies.h
+    UIProcess/API/C/WKWindowFeaturesRef.h
+    UIProcess/API/C/WebKit2_C.h
+
+    UIProcess/API/cpp/WKRetainPtr.h
+
+    WebProcess/InjectedBundle/API/c/WKBundle.h
+    WebProcess/InjectedBundle/API/c/WKBundleAPICast.h
+    WebProcess/InjectedBundle/API/c/WKBundleBackForwardList.h
+    WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.h
+    WebProcess/InjectedBundle/API/c/WKBundleDOMWindowExtension.h
+    WebProcess/InjectedBundle/API/c/WKBundleFileHandleRef.h
+    WebProcess/InjectedBundle/API/c/WKBundleFrame.h
+    WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h
+    WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h
+    WebProcess/InjectedBundle/API/c/WKBundleInitialize.h
+    WebProcess/InjectedBundle/API/c/WKBundleInspector.h
+    WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.h
+    WebProcess/InjectedBundle/API/c/WKBundleNavigationActionPrivate.h
+    WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.h
+    WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h
+    WebProcess/InjectedBundle/API/c/WKBundlePage.h
+    WebProcess/InjectedBundle/API/c/WKBundlePageBanner.h
+    WebProcess/InjectedBundle/API/c/WKBundlePageContextMenuClient.h
+    WebProcess/InjectedBundle/API/c/WKBundlePageEditorClient.h
+    WebProcess/InjectedBundle/API/c/WKBundlePageFormClient.h
+    WebProcess/InjectedBundle/API/c/WKBundlePageFullScreenClient.h
+    WebProcess/InjectedBundle/API/c/WKBundlePageGroup.h
+    WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h
+    WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h
+    WebProcess/InjectedBundle/API/c/WKBundlePagePolicyClient.h
+    WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h
+    WebProcess/InjectedBundle/API/c/WKBundlePageResourceLoadClient.h
+    WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h
+    WebProcess/InjectedBundle/API/c/WKBundlePrivate.h
+    WebProcess/InjectedBundle/API/c/WKBundleRangeHandle.h
+    WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.h
+)
+
+# Windows specific
+list(APPEND WebKit_PUBLIC_FRAMEWORK_HEADERS
+    Shared/API/c/win/WKBaseWin.h
+
+    UIProcess/API/C/win/WKView.h
+)
+
 set(WebKit_FORWARDING_HEADERS_DIRECTORIES
     Shared/API/c
 
@@ -208,16 +360,19 @@ set(WebKit_FORWARDING_HEADERS_DIRECTORIES
 )
 
 if (${WTF_PLATFORM_WIN_CAIRO})
-    list(APPEND WebKit_FORWARDING_HEADERS_DIRECTORIES
-        Shared/API/c/curl
+    list(APPEND WebKit_PUBLIC_FRAMEWORK_HEADERS
+        Shared/API/c/cairo/WKImageCairo.h
+
+        Shared/API/c/curl/WKCertificateInfoCurl.h
 
-        UIProcess/API/C/curl
+        UIProcess/API/C/curl/WKProtectionSpaceCurl.h
+        UIProcess/API/C/curl/WKWebsiteDataStoreRefCurl.h
     )
 endif ()
 
 WEBKIT_MAKE_FORWARDING_HEADERS(WebKit
     TARGET_NAME WebKitFrameworkHeaders
     DESTINATION ${WebKit_FRAMEWORK_HEADERS_DIR}/WebKit
-    DIRECTORIES ${WebKit_FORWARDING_HEADERS_DIRECTORIES}
+    FILES ${WebKit_PUBLIC_FRAMEWORK_HEADERS}
     FLATTENED
 )
index aaf6a08..ae4c779 100644 (file)
@@ -53,6 +53,7 @@ set(WTF_DERIVED_SOURCES_DIR ${CMAKE_BINARY_DIR}/WTF/DerivedSources)
 set(JavaScriptCore_DERIVED_SOURCES_DIR ${CMAKE_BINARY_DIR}/JavaScriptCore/DerivedSources)
 set(WebCore_DERIVED_SOURCES_DIR ${CMAKE_BINARY_DIR}/WebCore/DerivedSources)
 set(WebKitLegacy_DERIVED_SOURCES_DIR ${CMAKE_BINARY_DIR}/WebKitLegacy/DerivedSources)
+set(WebKit_DERIVED_SOURCES_DIR ${CMAKE_BINARY_DIR}/WebKit/DerivedSources)
 
 # Override scripts directories
 set(WTF_SCRIPTS_DIR ${CMAKE_BINARY_DIR}/WTF/Scripts)
index bba67a3..b046c67 100644 (file)
@@ -1,3 +1,13 @@
+2019-04-23  Don Olmstead  <don.olmstead@sony.com>
+
+        [CMake][Win] Use target oriented design for WebKit
+        https://bugs.webkit.org/show_bug.cgi?id=197173
+
+        Reviewed by Alex Christensen.
+
+        * TestWebKitAPI/PlatformWin.cmake: Add WebKitFrameworkHeaders as a dependency.
+        * TestWebKitAPI/Tests/WebKit/curl/Certificates.cpp: Remove unused header.
+
 2019-04-23  Chris Dumez  <cdumez@apple.com>
 
         [Process-Swap-On-Navigation] WebKit hangs when going back to a form submission's page due to Process-Swap-On-Navigation on iOS 12.2 and higher
index c25117f..355fe02 100644 (file)
@@ -217,7 +217,7 @@ if (ENABLE_WEBKIT)
     set_tests_properties(TestWebKit PROPERTIES TIMEOUT 60)
     set_target_properties(TestWebKit PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/WebKit)
 
-    add_dependencies(TestWebKit TestWebKitAPIBase)
+    add_dependencies(TestWebKit TestWebKitAPIBase WebKitFrameworkHeaders)
 endif ()
 
 set(test_main_SOURCES
index c785130..4ee2e77 100644 (file)
@@ -31,9 +31,6 @@
 #include <WebKit/WKCertificateInfo.h>
 #include <WebKit/WKCertificateInfoCurl.h>
 #include <WebKit/WKRetainPtr.h>
-#include <WebKit/WKSharedAPICast.h>
-
-using namespace WebCore;
 
 namespace TestWebKitAPI {