Title: [248755] trunk/Source
Revision
248755
Author
bfulg...@apple.com
Date
2019-08-15 18:50:05 -0700 (Thu, 15 Aug 2019)

Log Message

[FTW] Enable CoreFoundation use if building for Apple target
https://bugs.webkit.org/show_bug.cgi?id=200799

Reviewed by Alex Christensen.

Source/_javascript_Core:

* PlatformFTW.cmake: Add missing files.

Source/WebKit:

Fix the build and remove an unused method.

* PlatformFTW.cmake:
* Shared/ShareableBitmap.h:
* Shared/win/ShareableBitmapDirect2D.cpp:
(WebKit::ShareableBitmap::createDirect2DSurface):
(WebKit::ShareableBitmap::releaseSurfaceData): Deleted.

Source/WebKitLegacy:

* PlatformFTW.cmake:

Source/WebKitLegacy/win:

* FullscreenVideoController.cpp:
(FullscreenVideoController::FullscreenVideoController):
(FullscreenVideoController::enterFullscreen):
(FullscreenVideoController::exitFullscreen):
(FullscreenVideoController::createHUDWindow):
* FullscreenVideoController.h:
* WebView.cpp:
(WebView::exitFullscreenIfNeeded):

Source/WTF:

* wtf/PlatformFTW.cmake: Add missing files.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (248754 => 248755)


--- trunk/Source/_javascript_Core/ChangeLog	2019-08-16 01:39:34 UTC (rev 248754)
+++ trunk/Source/_javascript_Core/ChangeLog	2019-08-16 01:50:05 UTC (rev 248755)
@@ -1,3 +1,12 @@
+2019-08-15  Brent Fulgham  <bfulg...@apple.com>
+
+        [FTW] Enable CoreFoundation use if building for Apple target
+        https://bugs.webkit.org/show_bug.cgi?id=200799
+
+        Reviewed by Alex Christensen.
+
+        * PlatformFTW.cmake: Add missing files.
+
 2019-08-15  Alexey Shvayka  <shvaikal...@gmail.com>
 
         DateConversion::formatDateTime incorrectly formats negative years

Modified: trunk/Source/_javascript_Core/PlatformFTW.cmake (248754 => 248755)


--- trunk/Source/_javascript_Core/PlatformFTW.cmake	2019-08-16 01:39:34 UTC (rev 248754)
+++ trunk/Source/_javascript_Core/PlatformFTW.cmake	2019-08-16 01:50:05 UTC (rev 248755)
@@ -7,6 +7,26 @@
     API/_javascript_Core.h
 )
 
+if (USE_CF)
+    list(APPEND _javascript_Core_SOURCES
+        API/JSStringRefCF.cpp
+    )
+
+    list(APPEND _javascript_Core_PUBLIC_FRAMEWORK_HEADERS
+        API/JSStringRefCF.h
+    )
+
+    list(APPEND _javascript_Core_LIBRARIES
+        ${COREFOUNDATION_LIBRARY}
+    )
+endif ()
+
+if (NOT WTF_PLATFORM_WIN_CAIRO)
+    list(APPEND _javascript_Core_LIBRARIES
+        winmm
+    )
+endif ()
+
 if (ENABLE_REMOTE_INSPECTOR)
     list(APPEND _javascript_Core_PRIVATE_INCLUDE_DIRECTORIES
         "${_javascript_CORE_DIR}/inspector/remote/socket"

Modified: trunk/Source/WTF/ChangeLog (248754 => 248755)


--- trunk/Source/WTF/ChangeLog	2019-08-16 01:39:34 UTC (rev 248754)
+++ trunk/Source/WTF/ChangeLog	2019-08-16 01:50:05 UTC (rev 248755)
@@ -1,3 +1,12 @@
+2019-08-15  Brent Fulgham  <bfulg...@apple.com>
+
+        [FTW] Enable CoreFoundation use if building for Apple target
+        https://bugs.webkit.org/show_bug.cgi?id=200799
+
+        Reviewed by Alex Christensen.
+
+        * wtf/PlatformFTW.cmake: Add missing files.
+
 2019-08-15  Commit Queue  <commit-qu...@webkit.org>
 
         Unreviewed, rolling out r248440.

Modified: trunk/Source/WTF/wtf/PlatformFTW.cmake (248754 => 248755)


--- trunk/Source/WTF/wtf/PlatformFTW.cmake	2019-08-16 01:39:34 UTC (rev 248754)
+++ trunk/Source/WTF/wtf/PlatformFTW.cmake	2019-08-16 01:50:05 UTC (rev 248755)
@@ -33,4 +33,25 @@
     win/WorkQueueWin.cpp
 )
 
+if (USE_CF)
+    list(APPEND WTF_PUBLIC_HEADERS
+        cf/CFURLExtras.h
+        cf/TypeCastsCF.h
+
+        text/cf/TextBreakIteratorCF.h
+    )
+    list(APPEND WTF_SOURCES
+        cf/CFURLExtras.cpp
+        cf/FileSystemCF.cpp
+        cf/URLCF.cpp
+
+        text/cf/AtomStringImplCF.cpp
+        text/cf/StringCF.cpp
+        text/cf/StringImplCF.cpp
+        text/cf/StringViewCF.cpp
+    )
+
+    list(APPEND WTF_LIBRARIES ${COREFOUNDATION_LIBRARY})
+endif ()
+
 set(WTF_OUTPUT_NAME WTF${DEBUG_SUFFIX})

Modified: trunk/Source/WebKit/ChangeLog (248754 => 248755)


--- trunk/Source/WebKit/ChangeLog	2019-08-16 01:39:34 UTC (rev 248754)
+++ trunk/Source/WebKit/ChangeLog	2019-08-16 01:50:05 UTC (rev 248755)
@@ -1,3 +1,18 @@
+2019-08-15  Brent Fulgham  <bfulg...@apple.com>
+
+        [FTW] Enable CoreFoundation use if building for Apple target
+        https://bugs.webkit.org/show_bug.cgi?id=200799
+
+        Reviewed by Alex Christensen.
+
+        Fix the build and remove an unused method.
+
+        * PlatformFTW.cmake:
+        * Shared/ShareableBitmap.h:
+        * Shared/win/ShareableBitmapDirect2D.cpp:
+        (WebKit::ShareableBitmap::createDirect2DSurface):
+        (WebKit::ShareableBitmap::releaseSurfaceData): Deleted.
+
 2019-08-15  Sihui Liu  <sihui_...@apple.com>
 
         Some improvements on web storage

Modified: trunk/Source/WebKit/PlatformFTW.cmake (248754 => 248755)


--- trunk/Source/WebKit/PlatformFTW.cmake	2019-08-16 01:39:34 UTC (rev 248754)
+++ trunk/Source/WebKit/PlatformFTW.cmake	2019-08-16 01:50:05 UTC (rev 248755)
@@ -291,6 +291,7 @@
     UIProcess/API/C/WKPageNavigationClient.h
     UIProcess/API/C/WKPagePolicyClient.h
     UIProcess/API/C/WKPagePrivate.h
+    UIProcess/API/C/WKPageStateClient.h
     UIProcess/API/C/WKPageRenderingProgressEvents.h
     UIProcess/API/C/WKPageUIClient.h
     UIProcess/API/C/WKPluginLoadPolicy.h

Modified: trunk/Source/WebKit/Shared/ShareableBitmap.h (248754 => 248755)


--- trunk/Source/WebKit/Shared/ShareableBitmap.h	2019-08-16 01:39:34 UTC (rev 248754)
+++ trunk/Source/WebKit/Shared/ShareableBitmap.h	2019-08-16 01:50:05 UTC (rev 248755)
@@ -149,7 +149,7 @@
     static void releaseDataProviderData(void* typelessBitmap, const void* typelessData, size_t);
 #endif
 
-#if USE(CAIRO) || USE(DIRECT2D)
+#if USE(CAIRO)
     static void releaseSurfaceData(void* typelessBitmap);
 #endif
 

Modified: trunk/Source/WebKit/Shared/win/ShareableBitmapDirect2D.cpp (248754 => 248755)


--- trunk/Source/WebKit/Shared/win/ShareableBitmapDirect2D.cpp	2019-08-16 01:39:34 UTC (rev 248754)
+++ trunk/Source/WebKit/Shared/win/ShareableBitmapDirect2D.cpp	2019-08-16 01:50:05 UTC (rev 248755)
@@ -96,15 +96,9 @@
 COMPtr<IWICBitmap> ShareableBitmap::createDirect2DSurface()
 {
     m_bitmap = createSurfaceFromData(data(), m_size);
-    ref(); // Balanced by deref in releaseSurfaceData.
     return m_bitmap;
 }
 
-void ShareableBitmap::releaseSurfaceData(void* typelessBitmap)
-{
-    static_cast<ShareableBitmap*>(typelessBitmap)->deref(); // Balanced by ref in createDirect2DSurface.
-}
-
 RefPtr<Image> ShareableBitmap::createImage()
 {
     auto surface = createDirect2DSurface();

Modified: trunk/Source/WebKitLegacy/ChangeLog (248754 => 248755)


--- trunk/Source/WebKitLegacy/ChangeLog	2019-08-16 01:39:34 UTC (rev 248754)
+++ trunk/Source/WebKitLegacy/ChangeLog	2019-08-16 01:50:05 UTC (rev 248755)
@@ -1,3 +1,12 @@
+2019-08-15  Brent Fulgham  <bfulg...@apple.com>
+
+        [FTW] Enable CoreFoundation use if building for Apple target
+        https://bugs.webkit.org/show_bug.cgi?id=200799
+
+        Reviewed by Alex Christensen.
+
+        * PlatformFTW.cmake:
+
 2019-08-15  Sihui Liu  <sihui_...@apple.com>
 
         Some improvements on web storage

Modified: trunk/Source/WebKitLegacy/PlatformFTW.cmake (248754 => 248755)


--- trunk/Source/WebKitLegacy/PlatformFTW.cmake	2019-08-16 01:39:34 UTC (rev 248754)
+++ trunk/Source/WebKitLegacy/PlatformFTW.cmake	2019-08-16 01:50:05 UTC (rev 248755)
@@ -220,6 +220,16 @@
     win/WebCoreSupport/WebVisitedLinkStore.h
 )
 
+if (USE_CF)
+    list(APPEND WebKitLegacy_SOURCES_Classes
+        cf/WebCoreSupport/WebInspectorClientCF.cpp
+    )
+
+    list(APPEND WebKitLegacy_LIBRARIES
+        ${COREFOUNDATION_LIBRARY}
+    )
+endif ()
+
 if (CMAKE_SIZEOF_VOID_P EQUAL 8)
     enable_language(ASM_MASM)
     if (MSVC)

Modified: trunk/Source/WebKitLegacy/win/ChangeLog (248754 => 248755)


--- trunk/Source/WebKitLegacy/win/ChangeLog	2019-08-16 01:39:34 UTC (rev 248754)
+++ trunk/Source/WebKitLegacy/win/ChangeLog	2019-08-16 01:50:05 UTC (rev 248755)
@@ -1,3 +1,19 @@
+2019-08-15  Brent Fulgham  <bfulg...@apple.com>
+
+        [FTW] Enable CoreFoundation use if building for Apple target
+        https://bugs.webkit.org/show_bug.cgi?id=200799
+
+        Reviewed by Alex Christensen.
+
+        * FullscreenVideoController.cpp:
+        (FullscreenVideoController::FullscreenVideoController):
+        (FullscreenVideoController::enterFullscreen):
+        (FullscreenVideoController::exitFullscreen):
+        (FullscreenVideoController::createHUDWindow):
+        * FullscreenVideoController.h:
+        * WebView.cpp:
+        (WebView::exitFullscreenIfNeeded):
+
 2019-08-15  Youenn Fablet  <you...@apple.com>
 
         Always create a Document with a valid SessionID

Modified: trunk/Source/WebKitLegacy/win/FullscreenVideoController.cpp (248754 => 248755)


--- trunk/Source/WebKitLegacy/win/FullscreenVideoController.cpp	2019-08-16 01:39:34 UTC (rev 248754)
+++ trunk/Source/WebKitLegacy/win/FullscreenVideoController.cpp	2019-08-16 01:50:05 UTC (rev 248755)
@@ -249,7 +249,9 @@
     , m_layerClient(std::make_unique<LayerClient>(this))
     , m_rootChild(PlatformCALayerWin::create(PlatformCALayer::LayerTypeLayer, m_layerClient.get()))
 #endif
+#if ENABLE(FULLSCREEN_API)
     , m_fullscreenWindow(std::make_unique<MediaPlayerPrivateFullscreenWindow>(static_cast<MediaPlayerPrivateFullscreenClient*>(this)))
+#endif
 {
 }
 
@@ -274,6 +276,7 @@
 
 void FullscreenVideoController::enterFullscreen()
 {
+#if ENABLE(FULLSCREEN_API)
     if (!m_videoElement)
         return;
 
@@ -299,6 +302,7 @@
     m_fullscreenSize.setHeight(windowRect.bottom - windowRect.top);
 
     createHUDWindow();
+#endif
 }
 
 void FullscreenVideoController::exitFullscreen()
@@ -305,7 +309,9 @@
 {
     SetWindowLongPtr(m_hudWindow, 0, 0);
 
+#if ENABLE(FULLSCREEN_API)
     m_fullscreenWindow = nullptr;
+#endif
 
     ASSERT(!IsWindow(m_hudWindow));
     m_hudWindow = 0;
@@ -432,6 +438,7 @@
 
 void FullscreenVideoController::createHUDWindow()
 {
+#if ENABLE(FULLSCREEN_API)
     m_hudPosition.setX((m_fullscreenSize.width() - windowWidth) / 2);
     m_hudPosition.setY(m_fullscreenSize.height() * initialHUDPositionY - windowHeight / 2);
 
@@ -461,6 +468,7 @@
     SetWindowLongPtr(m_hudWindow, 0, reinterpret_cast<LONG_PTR>(this));
 
     draw();
+#endif
 }
 
 static String timeToString(float time)

Modified: trunk/Source/WebKitLegacy/win/FullscreenVideoController.h (248754 => 248755)


--- trunk/Source/WebKitLegacy/win/FullscreenVideoController.h	2019-08-16 01:39:34 UTC (rev 248754)
+++ trunk/Source/WebKitLegacy/win/FullscreenVideoController.h	2019-08-16 01:50:05 UTC (rev 248755)
@@ -154,7 +154,9 @@
     GDIObject<HBITMAP> m_bitmap;
     WebCore::IntSize m_fullscreenSize;
     WebCore::IntPoint m_hudPosition;
+#if ENABLE(FULLSCREEN_API)
     std::unique_ptr<WebCore::MediaPlayerPrivateFullscreenWindow> m_fullscreenWindow;
+#endif
 
 #if USE(CA)
     class LayerClient;

Modified: trunk/Source/WebKitLegacy/win/WebView.cpp (248754 => 248755)


--- trunk/Source/WebKitLegacy/win/WebView.cpp	2019-08-16 01:39:34 UTC (rev 248754)
+++ trunk/Source/WebKitLegacy/win/WebView.cpp	2019-08-16 01:50:05 UTC (rev 248755)
@@ -7880,7 +7880,9 @@
 
 HRESULT WebView::exitFullscreenIfNeeded()
 {
+#if ENABLE(FULLSCREEN_API)
     if (fullScreenController() && fullScreenController()->isFullScreen())
         fullScreenController()->close();
+#endif
     return S_OK;
 }

Modified: trunk/Source/cmake/OptionsFTW.cmake (248754 => 248755)


--- trunk/Source/cmake/OptionsFTW.cmake	2019-08-16 01:39:34 UTC (rev 248754)
+++ trunk/Source/cmake/OptionsFTW.cmake	2019-08-16 01:50:05 UTC (rev 248755)
@@ -25,6 +25,13 @@
 add_definitions(-D_WINSOCKAPI_=)
 
 # Setup library paths
+if (DEFINED ENV{AppleApplicationSupportSDK})
+    file(TO_CMAKE_PATH "$ENV{AppleApplicationSupportSDK}/AppleInternal" WEBKIT_LIBRARIES_DIR)
+    set(WEBKIT_LIBRARIES_INCLUDE_DIR "${WEBKIT_LIBRARIES_DIR}/include")
+    include_directories(${WEBKIT_LIBRARIES_INCLUDE_DIR})
+    set(APPLE_BUILD 1)
+endif ()
+
 if (NOT WEBKIT_LIBRARIES_DIR)
     if (DEFINED ENV{WEBKIT_LIBRARIES})
         file(TO_CMAKE_PATH "$ENV{WEBKIT_LIBRARIES}" WEBKIT_LIBRARIES_DIR)
@@ -204,10 +211,24 @@
 
 WEBKIT_OPTION_END()
 
+if (APPLE_BUILD)
+    include(target/icu)
+    set(COREFOUNDATION_LIBRARY CoreFoundation${DEBUG_SUFFIX})
+    SET_AND_EXPOSE_TO_BUILD(USE_CF ON)
+    find_package(LibXml2 2.9.1 REQUIRED)
+    if (ENABLE_XSLT)
+        find_package(LibXslt 1.1.28 REQUIRED)
+    endif ()
+else ()
+    find_package(ICU REQUIRED COMPONENTS data i18n uc)
+    find_package(LibXml2 2.9.7 REQUIRED)
+    if (ENABLE_XSLT)
+        find_package(LibXslt 1.1.32 REQUIRED)
+    endif ()
+endif ()
+
 find_package(CURL 7.60.0 REQUIRED)
-find_package(ICU REQUIRED COMPONENTS data i18n uc)
 find_package(JPEG 1.5.2 REQUIRED)
-find_package(LibXml2 2.9.7 REQUIRED)
 find_package(OpenSSL 2.0.0 REQUIRED)
 find_package(PNG 1.6.34 REQUIRED)
 find_package(Sqlite 3.23.1 REQUIRED)
@@ -220,10 +241,6 @@
 #     SET_AND_EXPOSE_TO_BUILD(USE_WEBP ON)
 # endif ()
 
-if (ENABLE_XSLT)
-    find_package(LibXslt 1.1.32 REQUIRED)
-endif ()
-
 SET_AND_EXPOSE_TO_BUILD(USE_CURL ON)
 SET_AND_EXPOSE_TO_BUILD(USE_DIRECT2D ON)
 SET_AND_EXPOSE_TO_BUILD(USE_EXPORT_MACROS ON)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to