Update AudioSession route sharing policy
[WebKit-https.git] / Source / WebCore / PlatformWin.cmake
index e02d2db..b703fd1 100644 (file)
@@ -1,43 +1,22 @@
-add_definitions(/bigobj)
+add_definitions(/bigobj -D__STDC_CONSTANT_MACROS)
 
 list(APPEND WebCore_INCLUDE_DIRECTORIES
-    "${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE"
-    "${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE/include/KHR"
-    "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore"
-    "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/ForwardingHeaders"
-    "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/API"
-    "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/assembler"
-    "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/bytecode"
-    "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/bytecompiler"
-    "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/dfg"
-    "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/disassembler"
-    "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/heap"
-    "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/debugger"
-    "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/interpreter"
-    "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/jit"
-    "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/llint"
-    "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/parser"
-    "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/profiler"
-    "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/runtime"
-    "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/yarr"
-    "${DERIVED_SOURCES_DIR}/ForwardingHeaders/WTF"
-    "${WEBCORE_DIR}/ForwardingHeaders"
+    "${DERIVED_SOURCES_DIR}/ForwardingHeaders"
+    "${CMAKE_BINARY_DIR}/../include/private"
+    "${CMAKE_BINARY_DIR}/../include/private/JavaScriptCore"
     "${WEBCORE_DIR}/accessibility/win"
     "${WEBCORE_DIR}/page/win"
-    "${WEBCORE_DIR}/platform/cf"
-    "${WEBCORE_DIR}/platform/cf/win"
     "${WEBCORE_DIR}/platform/graphics/egl"
     "${WEBCORE_DIR}/platform/graphics/opengl"
     "${WEBCORE_DIR}/platform/graphics/opentype"
     "${WEBCORE_DIR}/platform/graphics/win"
+    "${WEBCORE_DIR}/platform/mediacapabilities"
     "${WEBCORE_DIR}/platform/network/win"
     "${WEBCORE_DIR}/platform/win"
-    "${WEBCORE_DIR}/plugins/win"
     "${THIRDPARTY_DIR}/ANGLE/include"
     "${THIRDPARTY_DIR}/ANGLE/include/egl"
 )
 
-enable_language(ASM_MASM)
 list(APPEND WebCore_SOURCES
     accessibility/win/AXObjectCacheWin.cpp
     accessibility/win/AccessibilityObjectWin.cpp
@@ -47,27 +26,17 @@ list(APPEND WebCore_SOURCES
 
     html/HTMLSelectElementWin.cpp
 
-    loader/archive/cf/LegacyWebArchive.cpp
-
     page/win/DragControllerWin.cpp
     page/win/EventHandlerWin.cpp
     page/win/FrameWin.cpp
 
     platform/Cursor.cpp
     platform/LocalizedStrings.cpp
-    platform/PlatformStrategies.cpp
-    platform/VNodeTracker.cpp
+    platform/StaticPasteboard.cpp
 
     platform/audio/PlatformMediaSessionManager.cpp
 
-    platform/cf/FileSystemCF.cpp
-    platform/cf/SharedBufferCF.cpp
-
-    platform/cf/win/CertificateCFWin.cpp
-
-    platform/graphics/FontPlatformData.cpp
     platform/graphics/GraphicsContext3DPrivate.cpp
-    platform/graphics/WOFFFileFormat.cpp
 
     platform/graphics/egl/GLContextEGL.cpp
 
@@ -79,7 +48,12 @@ list(APPEND WebCore_SOURCES
 
     platform/graphics/opentype/OpenTypeUtilities.cpp
 
+    platform/graphics/win/ColorDirect2D.cpp
+    platform/graphics/win/ComplexTextControllerDirectWrite.cpp
     platform/graphics/win/DIBPixelData.cpp
+    platform/graphics/win/FloatPointDirect2D.cpp
+    platform/graphics/win/FloatRectDirect2D.cpp
+    platform/graphics/win/FloatSizeDirect2D.cpp
     platform/graphics/win/FontCacheWin.cpp
     platform/graphics/win/FontPlatformDataWin.cpp
     platform/graphics/win/FontWin.cpp
@@ -92,48 +66,40 @@ list(APPEND WebCore_SOURCES
     platform/graphics/win/IntSizeWin.cpp
     platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp
     platform/graphics/win/SimpleFontDataWin.cpp
+    platform/graphics/win/TransformationMatrixDirect2D.cpp
     platform/graphics/win/TransformationMatrixWin.cpp
     platform/graphics/win/UniscribeController.cpp
 
     platform/network/win/DownloadBundleWin.cpp
     platform/network/win/NetworkStateNotifierWin.cpp
 
-    platform/text/LocaleNone.cpp
-
-    platform/text/win/TextBreakIteratorInternalICUWin.cpp
-
     platform/win/BString.cpp
     platform/win/BitmapInfo.cpp
     platform/win/ClipboardUtilitiesWin.cpp
-    platform/win/ContextMenuItemWin.cpp
-    platform/win/ContextMenuWin.cpp
     platform/win/CursorWin.cpp
     platform/win/DefWndProcWindowClass.cpp
     platform/win/DragDataWin.cpp
     platform/win/DragImageWin.cpp
     platform/win/EventLoopWin.cpp
-    platform/win/FileSystemWin.cpp
     platform/win/GDIObjectCounter.cpp
     platform/win/GDIUtilities.cpp
     platform/win/KeyEventWin.cpp
-    platform/win/LanguageWin.cpp
     platform/win/LocalizedStringsWin.cpp
     platform/win/LoggingWin.cpp
-    platform/win/MemoryPressureHandlerWin.cpp
     platform/win/MIMETypeRegistryWin.cpp
+    platform/win/MainThreadSharedTimerWin.cpp
     platform/win/PasteboardWin.cpp
-    platform/win/PathWalker.cpp
     platform/win/PlatformMouseEventWin.cpp
     platform/win/PlatformScreenWin.cpp
     platform/win/PopupMenuWin.cpp
     platform/win/SSLKeyGeneratorWin.cpp
     platform/win/ScrollbarThemeWin.cpp
+    platform/win/SearchPopupMenuDB.cpp
     platform/win/SearchPopupMenuWin.cpp
     platform/win/SharedBufferWin.cpp
-    platform/win/SharedTimerWin.cpp
-    platform/win/SoundWin.cpp
     platform/win/StructuredExceptionHandlerSuppressor.cpp
     platform/win/SystemInfo.cpp
+    platform/win/UserAgentWin.cpp
     platform/win/WCDataObject.cpp
     platform/win/WebCoreBundleWin.cpp
     platform/win/WebCoreInstanceHandle.cpp
@@ -141,6 +107,8 @@ list(APPEND WebCore_SOURCES
     platform/win/WheelEventWin.cpp
     platform/win/WidgetWin.cpp
     platform/win/WindowMessageBroadcaster.cpp
+
+    rendering/RenderThemeWin.cpp
 )
 
 list(APPEND WebCore_USER_AGENT_STYLE_SHEETS
@@ -148,18 +116,18 @@ list(APPEND WebCore_USER_AGENT_STYLE_SHEETS
     ${WEBCORE_DIR}/css/themeWinQuirks.css
 )
 
-list(APPEND WebCore_SOURCES
-    "${DERIVED_SOURCES_WEBCORE_DIR}/WebCoreHeaderDetection.h"
-)
-
 set(WebCore_FORWARDING_HEADERS_DIRECTORIES
     .
     accessibility
+    animation
     bindings
     bridge
+    contentextensions
+    crypto
     css
     dom
     editing
+    fileapi
     history
     html
     inspector
@@ -168,6 +136,7 @@ set(WebCore_FORWARDING_HEADERS_DIRECTORIES
     platform
     plugins
     rendering
+    replay
     storage
     style
     svg
@@ -175,21 +144,30 @@ set(WebCore_FORWARDING_HEADERS_DIRECTORIES
     workers
     xml
 
+    Modules/cache
+    Modules/fetch
     Modules/geolocation
     Modules/indexeddb
+    Modules/mediastream
+    Modules/websockets
+
+    Modules/indexeddb/client
+    Modules/indexeddb/legacy
+    Modules/indexeddb/server
+    Modules/indexeddb/shared
     Modules/notifications
     Modules/webdatabase
 
     accessibility/win
 
-    bindings/generic
     bindings/js
 
     bridge/c
     bridge/jsc
 
-    history/cf
+    css/parser
 
+    html/canvas
     html/forms
     html/parser
     html/shadow
@@ -200,24 +178,21 @@ set(WebCore_FORWARDING_HEADERS_DIRECTORIES
     loader/cache
     loader/icon
 
-    loader/archive/cf
-
     page/animation
+    page/csp
     page/scrolling
     page/win
 
     platform/animation
     platform/audio
-    platform/cf
     platform/graphics
+    platform/mediacapabilities
     platform/mock
     platform/network
     platform/sql
     platform/text
     platform/win
 
-    platform/cf/win
-
     platform/graphics/filters
     platform/graphics/opengl
     platform/graphics/opentype
@@ -225,6 +200,8 @@ set(WebCore_FORWARDING_HEADERS_DIRECTORIES
     platform/graphics/transforms
     platform/graphics/win
 
+    platform/mediastream/libwebrtc
+
     platform/text/transcoder
 
     rendering/line
@@ -237,56 +214,161 @@ set(WebCore_FORWARDING_HEADERS_DIRECTORIES
     svg/properties
 
     svg/graphics/filters
+
+    workers/service
 )
 
+if (ENABLE_WEBKIT)
+    list(APPEND WebCore_FORWARDING_HEADERS_DIRECTORIES
+        Modules/applicationmanifest
+
+        dom/messageports
+
+        inspector/agents
+
+        platform/mediacapabilities
+        platform/mediastream
+
+        workers/service/context
+        workers/service/server
+    )
+endif ()
+
+if (USE_CF)
+    list(APPEND WebCore_INCLUDE_DIRECTORIES
+        "${WEBCORE_DIR}/platform/cf"
+        "${WEBCORE_DIR}/platform/cf/win"
+    )
+
+    list(APPEND WebCore_SOURCES
+        editing/SmartReplaceCF.cpp
+
+        loader/archive/cf/LegacyWebArchive.cpp
+
+        platform/cf/KeyedDecoderCF.cpp
+        platform/cf/KeyedEncoderCF.cpp
+        platform/cf/SharedBufferCF.cpp
+
+        platform/cf/win/CertificateCFWin.cpp
+
+        platform/text/cf/HyphenationCF.cpp
+    )
+
+    list(APPEND WebCore_FORWARDING_HEADERS_DIRECTORIES
+        history/cf
+
+        loader/archive/cf
+
+        platform/cf
+
+        platform/cf/win
+    )
+
+    list(APPEND WebCore_LIBRARIES ${COREFOUNDATION_LIBRARY})
+    list(APPEND WebCoreTestSupport_LIBRARIES ${COREFOUNDATION_LIBRARY})
+else ()
+    list(APPEND WebCore_SOURCES
+        platform/generic/KeyedDecoderGeneric.cpp
+        platform/generic/KeyedEncoderGeneric.cpp
+
+        platform/text/Hyphenation.cpp
+    )
+
+    list(APPEND WebCore_FORWARDING_HEADERS_DIRECTORIES
+        platform/generic
+    )
+endif ()
+
+if (CMAKE_SIZEOF_VOID_P EQUAL 4)
+    list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/makesafeseh.obj)
+    add_custom_command(
+        OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/makesafeseh.obj
+        DEPENDS ${WEBCORE_DIR}/platform/win/makesafeseh.asm
+        COMMAND ml /safeseh /c /Fo ${DERIVED_SOURCES_WEBCORE_DIR}/makesafeseh.obj ${WEBCORE_DIR}/platform/win/makesafeseh.asm
+        VERBATIM)
+endif ()
+
 if (${WTF_PLATFORM_WIN_CAIRO})
     include(PlatformWinCairo.cmake)
 else ()
     include(PlatformAppleWin.cmake)
 endif ()
 
-# FIXME: This should test if AVF headers are available.
-# https://bugs.webkit.org/show_bug.cgi?id=135861
-add_custom_command(
-    OUTPUT "${DERIVED_SOURCES_WEBCORE_DIR}/WebCoreHeaderDetection.h"
-    WORKING_DIRECTORY "${DERIVED_SOURCES_WEBCORE_DIR}"
-    COMMAND echo /* Identifying AVFoundation Support */ > WebCoreHeaderDetection.h
-    VERBATIM)
-
 make_directory(${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/en.lproj)
 file(COPY
-    "${WEBCORE_DIR}/English.lproj/Localizable.strings"
-    "${WEBCORE_DIR}/English.lproj/mediaControlsLocalizedStrings.js"
+    "${WEBCORE_DIR}/en.lproj/Localizable.strings"
+    "${WEBCORE_DIR}/en.lproj/mediaControlsLocalizedStrings.js"
     DESTINATION
     ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/en.lproj
 )
-if (WTF_PLATFORM_WIN_CAIRO AND EXISTS ${WEBKIT_LIBRARIES_DIR}/cacert.pem)
+file(COPY
+    "${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsApple.css"
+    "${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsApple.js"
+    DESTINATION
+    ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources
+)
+if (WTF_PLATFORM_WIN_CAIRO AND EXISTS ${WEBKIT_LIBRARIES_DIR}/etc/ssl/cert.pem)
     make_directory(${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates)
     file(COPY
-        ${WEBKIT_LIBRARIES_DIR}/cacert.pem
+        ${WEBKIT_LIBRARIES_DIR}/etc/ssl/cert.pem
         DESTINATION
         ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates
     )
+    file(RENAME
+        ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates/cert.pem
+        ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates/cacert.pem
+    )
 endif ()
 
-file(MAKE_DIRECTORY ${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebCore)
-
-foreach (_directory ${WebCore_FORWARDING_HEADERS_DIRECTORIES})
-    file(GLOB _files "${WEBCORE_DIR}/${_directory}/*.h")
-    foreach (_file ${_files})
-        file(COPY ${_file} DESTINATION "${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebCore")
-    endforeach ()
-endforeach ()
+set(WebCore_PRIVATE_FRAMEWORK_HEADERS
+    ${DERIVED_SOURCES_WEBCORE_DIR}/CSSPropertyNames.h
+    ${DERIVED_SOURCES_WEBCORE_DIR}/CSSValueKeywords.h
+    ${DERIVED_SOURCES_WEBCORE_DIR}/EventInterfaces.h
+    ${DERIVED_SOURCES_WEBCORE_DIR}/EventTargetInterfaces.h
+    ${DERIVED_SOURCES_WEBCORE_DIR}/HTMLElementTypeHelpers.h
+    ${DERIVED_SOURCES_WEBCORE_DIR}/HTMLNames.h
+    ${DERIVED_SOURCES_WEBCORE_DIR}/HTTPHeaderNames.h
+    ${DERIVED_SOURCES_WEBCORE_DIR}/JSBlob.h
+    ${DERIVED_SOURCES_WEBCORE_DIR}/JSCSSStyleDeclaration.h
+    ${DERIVED_SOURCES_WEBCORE_DIR}/JSDOMBindingInternalsBuiltins.h
+    ${DERIVED_SOURCES_WEBCORE_DIR}/JSDOMWindow.h
+    ${DERIVED_SOURCES_WEBCORE_DIR}/JSDocument.h
+    ${DERIVED_SOURCES_WEBCORE_DIR}/JSElement.h
+    ${DERIVED_SOURCES_WEBCORE_DIR}/JSEventTarget.h
+    ${DERIVED_SOURCES_WEBCORE_DIR}/JSFile.h
+    ${DERIVED_SOURCES_WEBCORE_DIR}/JSHTMLElement.h
+    ${DERIVED_SOURCES_WEBCORE_DIR}/JSNode.h
+    ${DERIVED_SOURCES_WEBCORE_DIR}/JSNotification.h
+    ${DERIVED_SOURCES_WEBCORE_DIR}/JSRange.h
+    ${DERIVED_SOURCES_WEBCORE_DIR}/JSReadableStream.h
+    ${DERIVED_SOURCES_WEBCORE_DIR}/JSReadableStreamDefaultController.h
+    ${DERIVED_SOURCES_WEBCORE_DIR}/RTCPeerConnectionInternalsBuiltins.h
+    ${DERIVED_SOURCES_WEBCORE_DIR}/ReadableByteStreamInternalsBuiltins.h
+    ${DERIVED_SOURCES_WEBCORE_DIR}/ReadableStreamInternalsBuiltins.h
+    ${DERIVED_SOURCES_WEBCORE_DIR}/Settings.h
+    ${DERIVED_SOURCES_WEBCORE_DIR}/StreamInternalsBuiltins.h
+    ${DERIVED_SOURCES_WEBCORE_DIR}/WebCoreJSBuiltinInternals.h
+    ${DERIVED_SOURCES_WEBCORE_DIR}/WebCoreJSBuiltins.h
+    ${DERIVED_SOURCES_WEBCORE_DIR}/WebKitFontFamilyNames.h
+    ${DERIVED_SOURCES_WEBCORE_DIR}/WritableStreamInternalsBuiltins.h
+)
 
-# These forwarding headers need to keep their directory structure.
-set(WebCore_POST_BUILD_COMMAND "${CMAKE_BINARY_DIR}/DerivedSources/WebCore/postBuild.cmd")
-file(WRITE "${WebCore_POST_BUILD_COMMAND}" "@xcopy /y /s /d /f \"${WEBCORE_DIR}/ForwardingHeaders/*.h\" \"${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebCore\" >nul 2>nul\n@xcopy /y /s /d /f \"${DERIVED_SOURCES_WEBCORE_DIR}/*.h\" \"${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebCore\" >nul 2>nul\n")
+WEBKIT_MAKE_FORWARDING_HEADERS(WebCore
+    TARGET_NAME WebCorePrivateFrameworkHeaders
+    DESTINATION ${WebCore_PRIVATE_FRAMEWORK_HEADERS_DIR}/WebCore
+    FILES ${WebCore_PRIVATE_FRAMEWORK_HEADERS}
+    DIRECTORIES ${WebCore_FORWARDING_HEADERS_DIRECTORIES}
+    FLATTENED
+)
 
-file(GLOB_RECURSE _files "${WEBCORE_DIR}/ForwardingHeaders/*.h")
-foreach (_file ${_files})
-    file(COPY ${_file} DESTINATION "${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebCore")
-endforeach ()
+add_dependencies(WebCorePrivateFrameworkHeaders WebCoreBindings)
 
 set(WebCore_OUTPUT_NAME
     WebCore${DEBUG_SUFFIX}
-)
\ No newline at end of file
+)
+
+list(APPEND WebCore_LIBRARIES WTF${DEBUG_SUFFIX})
+if (TARGET libEGL)
+    list(APPEND WebCore_LIBRARIES libEGL)
+endif ()
+list(APPEND WebCoreTestSupport_LIBRARIES WTF${DEBUG_SUFFIX})