Changeset 239092 in webkit
- Timestamp:
- Dec 11, 2018 5:15:55 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r239091 r239092 1 2018-12-11 Fujii Hironori <Hironori.Fujii@sony.com> 2 3 [Win][Clang] Fix warning -Wmissing-field-initializers 4 https://bugs.webkit.org/show_bug.cgi?id=192584 5 6 Reviewed by Yusuke Suzuki. 7 8 Initialize a struct with '{ }' instead of '= {0}'. 9 10 No new tests, no behavior changes. 11 12 * platform/graphics/win/FontCacheWin.cpp: 13 (WebCore::FontCache::lastResortFallbackFont): 14 * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp: 15 (WebCore::MediaPlayerPrivateFullscreenWindow::createWindow): 16 * platform/win/ClipboardUtilitiesWin.cpp: 17 (WebCore::setFileDescriptorData): 18 (WebCore::setFileContentData): 19 (WebCore::setUCharData): 20 (WebCore::setUtf8Data): 21 (WebCore::setCFData): 22 * platform/win/CursorWin.cpp: 23 (WebCore::createSharedCursor): 24 * platform/win/DefWndProcWindowClass.cpp: 25 (WebCore::registerClass): 26 * platform/win/DragImageWin.cpp: 27 (WebCore::createDragImageIconForCachedImageFilename): 28 * platform/win/PasteboardWin.cpp: 29 (WebCore::writeURL): 30 (WebCore::Pasteboard::writeString): 31 (WebCore::Pasteboard::writeRangeToDataObject): 32 (WebCore::Pasteboard::writePlainTextToDataObject): 33 (WebCore::writeFileToDataObject): 34 (WebCore::Pasteboard::writeMarkup): 35 * platform/win/PopupMenuWin.cpp: 36 (WebCore::PopupMenuWin::show): 37 * platform/win/SSLKeyGeneratorWin.cpp: 38 (WebCore::WebCore::signedPublicKeyAndChallengeString): 39 1 40 2018-12-11 Jer Noble <jer.noble@apple.com> 2 41 -
trunk/Source/WebCore/platform/graphics/win/FontCacheWin.cpp
r238298 r239092 375 375 376 376 // Fall back to Non-client metrics fonts. 377 NONCLIENTMETRICS nonClientMetrics = {0};377 NONCLIENTMETRICS nonClientMetrics { }; 378 378 nonClientMetrics.cbSize = sizeof(nonClientMetrics); 379 379 if (SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(nonClientMetrics), &nonClientMetrics, 0)) { -
trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp
r216702 r239092 62 62 static LPCWSTR windowClassName = L"MediaPlayerPrivateFullscreenWindowClass"; 63 63 if (!windowAtom) { 64 WNDCLASSEX wcex = {0};64 WNDCLASSEX wcex { }; 65 65 wcex.cbSize = sizeof(wcex); 66 66 wcex.style = CS_HREDRAW | CS_VREDRAW; … … 73 73 ASSERT(!m_hwnd); 74 74 75 MONITORINFO mi = {0};75 MONITORINFO mi { }; 76 76 mi.cbSize = sizeof(MONITORINFO); 77 77 if (!GetMonitorInfo(MonitorFromWindow(parentHwnd, MONITOR_DEFAULTTONEAREST), &mi)) -
trunk/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp
r238771 r239092 425 425 String pathname = passedPathname; 426 426 427 STGMEDIUM medium = { 0};427 STGMEDIUM medium { }; 428 428 medium.tymed = TYMED_HGLOBAL; 429 429 … … 447 447 void setFileContentData(IDataObject* dataObject, int size, void* dataBlob) 448 448 { 449 STGMEDIUM medium = { 0};449 STGMEDIUM medium { }; 450 450 medium.tymed = TYMED_HGLOBAL; 451 451 … … 755 755 void setUCharData(IDataObject* data, FORMATETC* format, const Vector<String>& dataStrings) 756 756 { 757 STGMEDIUM medium = {0};757 STGMEDIUM medium { }; 758 758 medium.tymed = TYMED_HGLOBAL; 759 759 … … 767 767 void setUtf8Data(IDataObject* data, FORMATETC* format, const Vector<String>& dataStrings) 768 768 { 769 STGMEDIUM medium = {0};769 STGMEDIUM medium { }; 770 770 medium.tymed = TYMED_HGLOBAL; 771 771 … … 786 786 void setCFData(IDataObject* data, FORMATETC* format, const Vector<String>& dataStrings) 787 787 { 788 STGMEDIUM medium = {0};788 STGMEDIUM medium { }; 789 789 medium.tymed = TYMED_HGLOBAL; 790 790 -
trunk/Source/WebCore/platform/win/CursorWin.cpp
r217406 r239092 112 112 SelectObject(xorMaskDC.get(), oldXorMask); 113 113 114 ICONINFO icon = {0};114 ICONINFO icon { }; 115 115 icon.fIcon = FALSE; 116 116 icon.xHotspot = effectiveHotSpot.x(); -
trunk/Source/WebCore/platform/win/DefWndProcWindowClass.cpp
r84635 r239092 36 36 static ATOM registerClass() 37 37 { 38 WNDCLASSW wndClass = {0};38 WNDCLASSW wndClass { }; 39 39 wndClass.lpszClassName = className; 40 40 wndClass.lpfnWndProc = ::DefWindowProcW; -
trunk/Source/WebCore/platform/win/DragImageWin.cpp
r238771 r239092 74 74 DragImageRef createDragImageIconForCachedImageFilename(const String& filename) 75 75 { 76 SHFILEINFO shfi = {0};76 SHFILEINFO shfi { }; 77 77 String fname = filename; 78 78 if (FAILED(SHGetFileInfo(stringToNullTerminatedWChar(fname).data(), FILE_ATTRIBUTE_NORMAL, &shfi, sizeof(shfi), SHGFI_ICON | SHGFI_USEFILEATTRIBUTES))) -
trunk/Source/WebCore/platform/win/PasteboardWin.cpp
r238771 r239092 374 374 } 375 375 376 STGMEDIUM medium = {0};376 STGMEDIUM medium { }; 377 377 medium.tymed = TYMED_HGLOBAL; 378 378 … … 418 418 419 419 if (winType == ClipboardDataTypeText) { 420 STGMEDIUM medium = {0};420 STGMEDIUM medium { }; 421 421 medium.tymed = TYMED_HGLOBAL; 422 422 medium.hGlobal = createGlobalData(data); … … 441 441 return; 442 442 443 STGMEDIUM medium = {0};443 STGMEDIUM medium { }; 444 444 medium.tymed = TYMED_HGLOBAL; 445 445 … … 506 506 return; 507 507 508 STGMEDIUM medium = {0};508 STGMEDIUM medium { }; 509 509 medium.tymed = TYMED_HGLOBAL; 510 510 … … 607 607 HRESULT hr = S_OK; 608 608 FORMATETC* fe; 609 STGMEDIUM medium = {0};609 STGMEDIUM medium { }; 610 610 medium.tymed = TYMED_HGLOBAL; 611 611 … … 1064 1064 markupToCFHTML(markup, "", data); 1065 1065 1066 STGMEDIUM medium = {0};1066 STGMEDIUM medium { }; 1067 1067 medium.tymed = TYMED_HGLOBAL; 1068 1068 -
trunk/Source/WebCore/platform/win/PopupMenuWin.cpp
r234808 r239092 162 162 163 163 if (shouldAnimate) { 164 RECT viewRect = {0};164 RECT viewRect { }; 165 165 ::GetWindowRect(hostWindow, &viewRect); 166 166 if (!::IsRectEmpty(&viewRect)) -
trunk/Source/WebCore/platform/win/SSLKeyGeneratorWin.cpp
r226205 r239092 61 61 break; 62 62 63 CERT_KEYGEN_REQUEST_INFO requestInfo = { 0};63 CERT_KEYGEN_REQUEST_INFO requestInfo { }; 64 64 requestInfo.dwVersion = CERT_KEYGEN_REQUEST_V1; 65 65 requestInfo.pwszChallengeString = L""; … … 72 72 requestInfo.pwszChallengeString = const_cast<wchar_t*>(localChallengeWide.data()); 73 73 74 CRYPT_ALGORITHM_IDENTIFIER signAlgo = { 0};74 CRYPT_ALGORITHM_IDENTIFIER signAlgo { }; 75 75 signAlgo.pszObjId = szOID_RSA_SHA1RSA; 76 76 -
trunk/Source/WebKit/ChangeLog
r239080 r239092 1 2018-12-11 Fujii Hironori <Hironori.Fujii@sony.com> 2 3 [Win][Clang] Fix warning -Wmissing-field-initializers 4 https://bugs.webkit.org/show_bug.cgi?id=192584 5 6 Reviewed by Yusuke Suzuki. 7 8 Initialize a struct with '{ }' instead of '= {0}'. 9 10 * UIProcess/Launcher/win/ProcessLauncherWin.cpp: 11 (WebKit::ProcessLauncher::launchProcess): 12 * UIProcess/win/WebPopupMenuProxyWin.cpp: 13 (WebKit::WebPopupMenuProxyWin::showPopupMenu): 14 * UIProcess/win/WebView.cpp: 15 (WebKit::WebView::initializeToolTipWindow): 16 (WebKit::WebView::setToolTip): 17 1 18 2018-12-11 Chris Dumez <cdumez@apple.com> 2 19 -
trunk/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp
r236690 r239092 88 88 auto commandLine = stringToNullTerminatedWChar(commandLineBuilder.toString()); 89 89 90 STARTUPINFO startupInfo = { 0};90 STARTUPINFO startupInfo { }; 91 91 startupInfo.cb = sizeof(startupInfo); 92 92 startupInfo.dwFlags = STARTF_USESHOWWINDOW; 93 93 startupInfo.wShowWindow = SW_HIDE; 94 PROCESS_INFORMATION processInformation = { 0};94 PROCESS_INFORMATION processInformation { }; 95 95 BOOL result = ::CreateProcess(0, commandLine.data(), 0, 0, true, 0, 0, 0, &startupInfo, &processInformation); 96 96 -
trunk/Source/WebKit/UIProcess/win/WebPopupMenuProxyWin.cpp
r235265 r239092 219 219 220 220 if (shouldAnimate) { 221 RECT viewRect = {0};221 RECT viewRect { }; 222 222 ::GetWindowRect(hostWindow, &viewRect); 223 223 -
trunk/Source/WebKit/UIProcess/win/WebView.cpp
r235265 r239092 654 654 return; 655 655 656 TOOLINFO info = { 0};656 TOOLINFO info { }; 657 657 info.cbSize = sizeof(info); 658 658 info.uFlags = TTF_IDISHWND | TTF_SUBCLASS; … … 872 872 873 873 if (!toolTip.isEmpty()) { 874 TOOLINFO info = { 0};874 TOOLINFO info { }; 875 875 info.cbSize = sizeof(info); 876 876 info.uFlags = TTF_IDISHWND; -
trunk/Source/WebKitLegacy/win/ChangeLog
r238894 r239092 1 2018-12-11 Fujii Hironori <Hironori.Fujii@sony.com> 2 3 [Win][Clang] Fix warning -Wmissing-field-initializers 4 https://bugs.webkit.org/show_bug.cgi?id=192584 5 6 Reviewed by Yusuke Suzuki. 7 8 Initialize a struct with '{ }' instead of '= {0}'. 9 10 * WebKitMessageLoop.cpp: 11 (WebKitMessageLoop::run): 12 * WebView.cpp: 13 (WebView::onMenuCommand): 14 (WebView::gesture): 15 (WebView::setShouldInvertColors): 16 (WebView::initializeToolTipWindow): 17 (WebView::setToolTip): 18 (WebView::fullScreenClientForceRepaint): 19 1 20 2018-12-05 Wenson Hsieh <wenson_hsieh@apple.com> 2 21 -
trunk/Source/WebKitLegacy/win/WebKitMessageLoop.cpp
r229048 r239092 85 85 HRESULT WebKitMessageLoop::run(_In_ HACCEL hAccelTable) 86 86 { 87 MSG msg = { 0};87 MSG msg { }; 88 88 89 89 while (GetMessage(&msg, 0, 0, 0)) { -
trunk/Source/WebKitLegacy/win/WebView.cpp
r238775 r239092 1786 1786 unsigned index = static_cast<unsigned>(wParam); 1787 1787 1788 MENUITEMINFO menuItemInfo = { 0};1788 MENUITEMINFO menuItemInfo { }; 1789 1789 menuItemInfo.cbSize = sizeof(menuItemInfo); 1790 1790 menuItemInfo.fMask = MIIM_STRING; … … 1998 1998 HGESTUREINFO gestureHandle = reinterpret_cast<HGESTUREINFO>(lParam); 1999 1999 2000 GESTUREINFO gi = {0};2000 GESTUREINFO gi { }; 2001 2001 gi.cbSize = sizeof(GESTUREINFO); 2002 2002 … … 2485 2485 #endif 2486 2486 2487 RECT windowRect = {0};2487 RECT windowRect { }; 2488 2488 frameRect(&windowRect); 2489 2489 … … 3192 3192 return; 3193 3193 3194 TOOLINFO info = {0};3194 TOOLINFO info { }; 3195 3195 info.cbSize = sizeof(info); 3196 3196 info.uFlags = TTF_IDISHWND | TTF_SUBCLASS ; … … 3214 3214 3215 3215 if (!m_toolTip.isEmpty()) { 3216 TOOLINFO info = {0};3216 TOOLINFO info { }; 3217 3217 info.cbSize = sizeof(info); 3218 3218 info.uFlags = TTF_IDISHWND; … … 7577 7577 { 7578 7578 ASSERT(m_fullscreenController); 7579 RECT windowRect = {0};7579 RECT windowRect { }; 7580 7580 frameRect(&windowRect); 7581 7581 repaint(windowRect, true /*contentChanged*/, true /*immediate*/, false /*contentOnly*/); -
trunk/Tools/ChangeLog
r239080 r239092 1 2018-12-11 Fujii Hironori <Hironori.Fujii@sony.com> 2 3 [Win][Clang] Fix warning -Wmissing-field-initializers 4 https://bugs.webkit.org/show_bug.cgi?id=192584 5 6 Reviewed by Yusuke Suzuki. 7 8 Initialize a struct with '{ }' instead of '= {0}'. 9 10 * DumpRenderTree/win/DumpRenderTree.cpp: 11 (runTest): 12 * DumpRenderTree/win/EventSender.cpp: 13 (makeMsg): 14 (replaySavedEvents): 15 (beginDragWithFilesCallback): 16 * DumpRenderTree/win/PixelDumpSupportWin.cpp: 17 (createBitmapContextFromWebView): 18 * MiniBrowser/win/WebKitLegacyBrowserWindow.cpp: 19 (updateMenuItemForHistoryItem): 20 * MiniBrowser/win/WinMain.cpp: 21 (wWinMain): 22 * TestWebKitAPI/win/HostWindow.cpp: 23 (TestWebKitAPI::HostWindow::clientRect const): 24 (TestWebKitAPI::HostWindow::registerWindowClass): 25 * TestWebKitAPI/win/PlatformWebViewWin.cpp: 26 (TestWebKitAPI::PlatformWebView::registerWindowClass): 27 * WebKitTestRunner/win/PlatformWebViewWin.cpp: 28 (WTR::registerWindowClass): 29 (WTR::PlatformWebView::windowFrame): 30 (WTR::PlatformWebView::windowSnapshotImage): 31 1 32 2018-12-11 Chris Dumez <cdumez@apple.com> 2 33 -
trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp
r237099 r239092 1232 1232 workQueue.setFrozen(false); 1233 1233 1234 MSG msg = { 0};1234 MSG msg { }; 1235 1235 HWND hostWindow; 1236 1236 webView->hostWindow(&hostWindow); -
trunk/Tools/DumpRenderTree/win/EventSender.cpp
r230355 r239092 121 121 static MSG makeMsg(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) 122 122 { 123 MSG result = {0};123 MSG result { }; 124 124 result.hwnd = hwnd; 125 125 result.message = message; … … 363 363 replayingSavedEvents = true; 364 364 365 MSG msg = { 0};365 MSG msg { }; 366 366 367 367 while (startOfQueue < endOfQueue && !msgQueue[startOfQueue].delay) { … … 697 697 files.append(0); 698 698 699 STGMEDIUM hDropMedium = {0};699 STGMEDIUM hDropMedium { }; 700 700 hDropMedium.tymed = TYMED_HGLOBAL; 701 701 SIZE_T dropFilesSize = sizeof(DROPFILES) + (sizeof(WCHAR) * files.size()); … … 714 714 GlobalUnlock(hDropMedium.hGlobal); 715 715 716 STGMEDIUM hFileNameMedium = {0};716 STGMEDIUM hFileNameMedium { }; 717 717 hFileNameMedium.tymed = TYMED_HGLOBAL; 718 718 SIZE_T hFileNameSize = sizeof(WCHAR) * files.size(); … … 926 926 927 927 if (!eventSenderClass) { 928 JSClassDefinition classDefinition = {0};928 JSClassDefinition classDefinition { }; 929 929 classDefinition.staticFunctions = staticFunctions; 930 930 classDefinition.staticValues = staticValues; -
trunk/Tools/DumpRenderTree/win/PixelDumpSupportWin.cpp
r237622 r239092 63 63 return nullptr; 64 64 65 BITMAPINFO bmp = {0};65 BITMAPINFO bmp { }; 66 66 bmp.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); 67 67 bmp.bmiHeader.biWidth = frame.right - frame.left; … … 80 80 SendMessage(webViewWindow, WM_PRINT, reinterpret_cast<WPARAM>(memoryDC.get()), PRF_CLIENT | PRF_CHILDREN | PRF_OWNED); 81 81 82 BITMAP info = {0};82 BITMAP info { }; 83 83 GetObject(bitmap, sizeof(info), &info); 84 84 ASSERT(info.bmBitsPixel == 32); -
trunk/Tools/MiniBrowser/win/WebKitLegacyBrowserWindow.cpp
r238051 r239092 330 330 UINT menuID = IDM_HISTORY_LINK0 + currentHistoryItem; 331 331 332 MENUITEMINFO menuItemInfo = { 0};332 MENUITEMINFO menuItemInfo { }; 333 333 menuItemInfo.cbSize = sizeof(MENUITEMINFO); 334 334 menuItemInfo.fMask = MIIM_TYPE; -
trunk/Tools/MiniBrowser/win/WinMain.cpp
r232862 r239092 42 42 #endif 43 43 44 MSG msg = {0};44 MSG msg { }; 45 45 HACCEL hAccelTable; 46 46 -
trunk/Tools/TestWebKitAPI/win/HostWindow.cpp
r95955 r239092 51 51 RECT HostWindow::clientRect() const 52 52 { 53 RECT rect = {0};53 RECT rect { }; 54 54 if (!::GetClientRect(m_window, &rect)) { 55 RECT emptyRect = {0};55 RECT emptyRect { }; 56 56 return emptyRect; 57 57 } … … 66 66 initialized = true; 67 67 68 WNDCLASSEXW wndClass = {0};68 WNDCLASSEXW wndClass { }; 69 69 wndClass.cbSize = sizeof(wndClass); 70 70 wndClass.style = CS_HREDRAW | CS_VREDRAW; -
trunk/Tools/TestWebKitAPI/win/PlatformWebViewWin.cpp
r230744 r239092 48 48 initialized = true; 49 49 50 WNDCLASSEXW wndClass = {0};50 WNDCLASSEXW wndClass { }; 51 51 wndClass.cbSize = sizeof(wndClass); 52 52 wndClass.style = CS_HREDRAW | CS_VREDRAW; -
trunk/Tools/WebKitTestRunner/win/PlatformWebViewWin.cpp
r238939 r239092 50 50 initialized = true; 51 51 52 WNDCLASSEXW wndClass = {0};52 WNDCLASSEXW wndClass { }; 53 53 wndClass.cbSize = sizeof(wndClass); 54 54 wndClass.style = CS_HREDRAW | CS_VREDRAW; … … 118 118 WKRect PlatformWebView::windowFrame() 119 119 { 120 WKRect wkFrame = {0};120 WKRect wkFrame { }; 121 121 RECT r; 122 122 … … 204 204 auto memoryDC = adoptGDIObject(::CreateCompatibleDC(windowDC)); 205 205 206 BITMAPINFO bitmapInfo = {0};206 BITMAPINFO bitmapInfo { }; 207 207 WKRect wkFrame = windowFrame(); 208 208 bitmapInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); … … 231 231 SRCCOPY); 232 232 233 BITMAP bitmapTag = {0};233 BITMAP bitmapTag { }; 234 234 GetObject(bitmap.get(), sizeof(bitmapTag), &bitmapTag); 235 235 ASSERT(bitmapTag.bmBitsPixel == 32);
Note: See TracChangeset
for help on using the changeset viewer.