Changeset 252872 in webkit
- Timestamp:
- Nov 25, 2019 6:56:33 PM (4 years ago)
- Location:
- trunk/Tools
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r252870 r252872 1 2019-11-25 Ross Kirsling <ross.kirsling@sony.com> 2 3 [Win] Ensure MiniBrowser can be built with !ENABLE(WEBKIT_LEGACY) 4 https://bugs.webkit.org/show_bug.cgi?id=204592 5 6 Reviewed by Don Olmstead. 7 8 * MiniBrowser/win/CMakeLists.txt: 9 * MiniBrowser/win/Common.cpp: 10 (parseCommandLine): 11 * MiniBrowser/win/Common.h: 12 * MiniBrowser/win/MainWindow.cpp: 13 (MainWindow::init): 14 (MainWindow::WndProc): 15 * MiniBrowser/win/WinMain.cpp: 16 (wWinMain): 17 * PlatformWin.cmake: 18 1 19 2019-11-25 Fujii Hironori <Hironori.Fujii@sony.com> 2 20 -
trunk/Tools/MiniBrowser/win/CMakeLists.txt
r250019 r252872 2 2 ${PAL_FRAMEWORK_HEADERS_DIR} 3 3 ${WebCore_PRIVATE_FRAMEWORK_HEADERS_DIR} 4 ${WebKitLegacy_FRAMEWORK_HEADERS_DIR}5 ${WebKit_FRAMEWORK_HEADERS_DIR}6 ${WebKit_PRIVATE_FRAMEWORK_HEADERS_DIR}7 4 ) 8 5 9 6 set(MiniBrowser_SOURCES 10 AccessibilityDelegate.cpp11 7 BrowserWindow.cpp 12 8 Common.cpp 13 9 MainWindow.cpp 14 PrintWebUIDelegate.cpp15 ResourceLoadDelegate.cpp16 WebDownloadDelegate.cpp17 10 MiniBrowserLib.rc 18 MiniBrowserWebHost.cpp19 WebKitLegacyBrowserWindow.cpp20 11 WinMain.cpp 21 12 stdafx.cpp … … 25 16 DbgHelp 26 17 WebKit::WTF 27 WebKitLegacy28 WebKitLegacyGUID29 18 comctl32 30 19 comsupp … … 39 28 endif () 40 29 30 if (ENABLE_WEBKIT_LEGACY) 31 add_definitions(-DENABLE_WEBKIT_LEGACY) 32 list(APPEND MiniBrowser_INCLUDE_DIRECTORIES 33 ${WebKitLegacy_FRAMEWORK_HEADERS_DIR} 34 ) 35 list(APPEND MiniBrowser_SOURCES 36 AccessibilityDelegate.cpp 37 MiniBrowserWebHost.cpp 38 PrintWebUIDelegate.cpp 39 ResourceLoadDelegate.cpp 40 WebDownloadDelegate.cpp 41 WebKitLegacyBrowserWindow.cpp 42 ) 43 list(APPEND MiniBrowser_LIBRARIES 44 WebKitLegacy 45 WebKitLegacyGUID 46 ) 47 endif () 48 41 49 if (ENABLE_WEBKIT) 42 50 add_definitions(-DENABLE_WEBKIT) 51 list(APPEND MiniBrowser_INCLUDE_DIRECTORIES 52 ${WebKit_FRAMEWORK_HEADERS_DIR} 53 ${WebKit_PRIVATE_FRAMEWORK_HEADERS_DIR} 54 ) 43 55 list(APPEND MiniBrowser_SOURCES 44 56 WebKitBrowserWindow.cpp 45 57 ) 46 list(APPEND MiniBrowser_LIBRARIES WebKit) 58 list(APPEND MiniBrowser_LIBRARIES 59 WebKit 60 ) 47 61 endif () 48 62 -
trunk/Tools/MiniBrowser/win/Common.cpp
r247896 r252872 272 272 else if (!wcsicmp(argv[i], L"--desktop")) 273 273 options.useFullDesktop = true; 274 #if ENABLE(WEBKIT_LEGACY) 274 275 else if (!wcsicmp(argv[i], L"--wk1") || !wcsicmp(argv[i], L"--legacy")) 275 276 options.windowType = BrowserWindowType::WebKitLegacy; 277 #endif 276 278 #if ENABLE(WEBKIT) 277 279 else if (!wcsicmp(argv[i], L"--wk2") || !wcsicmp(argv[i], L"--webkit")) -
trunk/Tools/MiniBrowser/win/Common.h
r247896 r252872 28 28 #include "stdafx.h" 29 29 #include "MainWindow.h" 30 #include "WebKitLegacyBrowserWindow.h"31 30 32 31 enum class BrowserWindowType { -
trunk/Tools/MiniBrowser/win/MainWindow.cpp
r249789 r252872 29 29 #include "Common.h" 30 30 #include "MiniBrowserLibResource.h" 31 #include "WebKitLegacyBrowserWindow.h" 31 #include <sstream> 32 33 #if USE(CF) 32 34 #include <CoreFoundation/CoreFoundation.h> 33 # include <sstream>35 #endif 34 36 35 37 #if ENABLE(WEBKIT) 36 38 #include "WebKitBrowserWindow.h" 39 #endif 40 41 #if ENABLE(WEBKIT_LEGACY) 42 #include "WebKitLegacyBrowserWindow.h" 37 43 #endif 38 44 … … 116 122 EnableMenuItem(GetMenu(m_hMainWnd), IDM_NEW_WEBKIT_WINDOW, MF_GRAYED); 117 123 #endif 124 #if !ENABLE(WEBKIT_LEGACY) 125 EnableMenuItem(GetMenu(m_hMainWnd), IDM_NEW_WEBKITLEGACY_WINDOW, MF_GRAYED); 126 #endif 118 127 119 128 m_hBackButtonWnd = CreateWindow(L"BUTTON", L"<", WS_CHILD | WS_VISIBLE | BS_TEXT, 0, 0, 0, 0, m_hMainWnd, reinterpret_cast<HMENU>(IDM_HISTORY_BACKWARD), hInstance, 0); … … 194 203 } 195 204 #endif 205 #if ENABLE(WEBKIT_LEGACY) 196 206 case IDM_NEW_WEBKITLEGACY_WINDOW: { 197 207 auto& newWindow = MainWindow::create().leakRef(); … … 200 210 break; 201 211 } 212 #endif 202 213 case IDM_CLOSE_WINDOW: 203 214 PostMessage(hWnd, WM_CLOSE, 0, 0); -
trunk/Tools/MiniBrowser/win/WinMain.cpp
r250117 r252872 33 33 #include "MiniBrowserLibResource.h" 34 34 #include "MiniBrowserReplace.h" 35 #include "WebKitLegacyBrowserWindow.h"36 #include <WebKitLegacy/WebKitCOMAPI.h>37 35 #include <wtf/win/SoftLinking.h> 36 37 #if USE(CF) 38 #include <CoreFoundation/CoreFoundation.h> 39 #endif 38 40 39 41 #if ENABLE(WEBKIT) 40 42 #include "WebKitBrowserWindow.h" 43 #endif 44 45 #if ENABLE(WEBKIT_LEGACY) 46 #include "WebKitLegacyBrowserWindow.h" 47 #include <WebKitLegacy/WebKitCOMAPI.h> 41 48 #endif 42 49 … … 73 80 ::SetProcessDPIAware(); 74 81 82 #if !ENABLE(WEBKIT_LEGACY) 83 auto factory = WebKitBrowserWindow::create; 84 #elif !ENABLE(WEBKIT) 75 85 auto factory = WebKitLegacyBrowserWindow::create; 76 #if ENABLE(WEBKIT) 77 if (options.windowType == BrowserWindowType::WebKit) 78 factory = WebKitBrowserWindow::create; 86 #else 87 auto factory = options.windowType == BrowserWindowType::WebKit ? WebKitBrowserWindow::create : WebKitLegacyBrowserWindow::create; 79 88 #endif 80 89 auto& mainWindow = MainWindow::create().leakRef(); … … 96 105 // Main message loop: 97 106 __try { 107 #if ENABLE(WEBKIT) 108 while (GetMessage(&msg, nullptr, 0, 0)) { 109 #if USE(CF) 110 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, true); 111 #endif 112 if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) { 113 TranslateMessage(&msg); 114 DispatchMessage(&msg); 115 } 116 } 117 #else 98 118 IWebKitMessageLoopPtr messageLoop; 99 119 … … 103 123 104 124 messageLoop->run(hAccelTable); 105 125 #endif 106 126 } __except(createCrashReport(GetExceptionInformation()), EXCEPTION_EXECUTE_HANDLER) { } 107 127 108 128 exit: 129 #if !ENABLE(WEBKIT) 109 130 shutDownWebKit(); 131 #endif 110 132 #ifdef _CRTDBG_MAP_ALLOC 111 133 _CrtDumpMemoryLeaks(); -
trunk/Tools/PlatformWin.cmake
r241858 r252872 1 1 add_subdirectory(ImageDiff) 2 3 if (ENABLE_WEBKIT OR ENABLE_WEBKIT_LEGACY) 4 add_subdirectory(MiniBrowser/win) 5 endif () 2 6 3 7 if (ENABLE_WEBKIT_LEGACY) 4 8 add_subdirectory(DumpRenderTree) 5 add_subdirectory(MiniBrowser/win)6 9 endif () 7 10
Note: See TracChangeset
for help on using the changeset viewer.