WebKit Bugzilla
Attachment 357426 Details for
Bug 192695
: [Win][Clang] Fix compilation warnings under Source/WebKit directory
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192695-20181217135318.patch (text/plain), 12.50 KB, created by
Fujii Hironori
on 2018-12-16 20:53:19 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Fujii Hironori
Created:
2018-12-16 20:53:19 PST
Size:
12.50 KB
patch
obsolete
>Subversion Revision: 239262 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 71e152e10e7435374bb5b5977d437e6db79a62a3..385c1b066f2c53f9ad9b6fc31208a6c07ae4cf9c 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,35 @@ >+2018-12-16 Fujii Hironori <Hironori.Fujii@sony.com> >+ >+ [Win][Clang] Fix compilation warnings under Source/WebKit directory >+ https://bugs.webkit.org/show_bug.cgi?id=192695 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * NetworkProcess/cache/NetworkCacheData.cpp: >+ (makeSalt): Enclosed by #if !OS(WINDOWS). >+ * NetworkProcess/cache/NetworkCacheFileSystem.cpp: >+ (WebKit::NetworkCache::directoryEntryType): Ditto. >+ * Platform/win/ModuleWin.cpp: >+ (WebKit::Module::platformFunctionPointer const): Cast a function pointer with reinterpret_cast<void*>(). >+ * UIProcess/DrawingAreaProxyImpl.cpp: >+ (WebKit::DrawingAreaProxyImpl::DrawingMonitor::DrawingMonitor): >+ Moved the initializer of m_webPage in order to be encluded by #if PLATFORM(GTK). >+ * UIProcess/DrawingAreaProxyImpl.h: Ditto. >+ * UIProcess/Launcher/win/ProcessLauncherWin.cpp: >+ (WebKit::processName): Removed the duplicated 'const' type qualifier. >+ * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: >+ (generateRequestID): Enclosed by #if ENABLE(MEDIA_STREAM). >+ * UIProcess/win/WebInspectorProxyWin.cpp: >+ (WebKit::WebInspectorProxy::platformAttach): Removed an unused variable. >+ (WebKit::WebInspectorProxy::platformDetach): Ditto. >+ * UIProcess/win/WebPopupMenuProxyWin.cpp: Ditto. >+ * UIProcess/win/WebView.cpp: >+ (WebKit::WebView::paint): Ditto. >+ (WebKit::WebPopupMenu::setUpPlatformData): Ditto. >+ * UIProcess/win/WebPopupMenuProxyWin.h: Marked override methods with 'override'. >+ * WebProcess/WebCoreSupport/curl/WebFrameNetworkingContext.h: Ditto. >+ * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp: Removed an unused variable. >+ > 2018-12-16 Chris Fleizach <cfleizach@apple.com> > > AX: Support keyboard access preference for iOS in WebKit >diff --git a/Source/WebKit/NetworkProcess/cache/NetworkCacheData.cpp b/Source/WebKit/NetworkProcess/cache/NetworkCacheData.cpp >index a6e37be49128564091afb542083b755e710af101..56447e4e4f43c2f1633ccad79ece6351ebfa4791 100644 >--- a/Source/WebKit/NetworkProcess/cache/NetworkCacheData.cpp >+++ b/Source/WebKit/NetworkProcess/cache/NetworkCacheData.cpp >@@ -142,6 +142,7 @@ bool bytesEqual(const Data& a, const Data& b) > return !memcmp(a.data(), b.data(), a.size()); > } > >+#if !OS(WINDOWS) > static Salt makeSalt() > { > Salt salt; >@@ -150,6 +151,7 @@ static Salt makeSalt() > *reinterpret_cast<uint32_t*>(&salt[4]) = cryptographicallyRandomNumber(); > return salt; > } >+#endif > > std::optional<Salt> readOrMakeSalt(const String& path) > { >diff --git a/Source/WebKit/NetworkProcess/cache/NetworkCacheFileSystem.cpp b/Source/WebKit/NetworkProcess/cache/NetworkCacheFileSystem.cpp >index 45cf26ab9d2a72fc33b3e368fa2f58fe45adfa2f..25bef7f92e8eb366a94f4bcd37983b16a9de3508 100644 >--- a/Source/WebKit/NetworkProcess/cache/NetworkCacheFileSystem.cpp >+++ b/Source/WebKit/NetworkProcess/cache/NetworkCacheFileSystem.cpp >@@ -51,9 +51,9 @@ > namespace WebKit { > namespace NetworkCache { > >+#if !OS(WINDOWS) > static DirectoryEntryType directoryEntryType(uint8_t dtype) > { >-#if !OS(WINDOWS) > switch (dtype) { > case DT_DIR: > return DirectoryEntryType::Directory; >@@ -63,10 +63,9 @@ static DirectoryEntryType directoryEntryType(uint8_t dtype) > ASSERT_NOT_REACHED(); > return DirectoryEntryType::File; > } >-#else > return DirectoryEntryType::File; >-#endif > } >+#endif > > void traverseDirectory(const String& path, const Function<void (const String&, DirectoryEntryType)>& function) > { >diff --git a/Source/WebKit/Platform/win/ModuleWin.cpp b/Source/WebKit/Platform/win/ModuleWin.cpp >index fefbc26858d363e65bc65f08a537a658f3a26cb2..7b65d778691662fdb5ff60d73689d2cecc9b32fc 100644 >--- a/Source/WebKit/Platform/win/ModuleWin.cpp >+++ b/Source/WebKit/Platform/win/ModuleWin.cpp >@@ -51,7 +51,8 @@ void* Module::platformFunctionPointer(const char* functionName) const > { > if (!m_module) > return 0; >- return ::GetProcAddress(m_module, functionName); >+ auto proc = ::GetProcAddress(m_module, functionName); >+ return reinterpret_cast<void*>(proc); > } > > } >diff --git a/Source/WebKit/UIProcess/DrawingAreaProxyImpl.cpp b/Source/WebKit/UIProcess/DrawingAreaProxyImpl.cpp >index 573d32a5d2c71e28b2bd51bf3efe58400bb4da02..9070b5afb5ab4813bb2dc3d3bfabf2da678471d8 100644 >--- a/Source/WebKit/UIProcess/DrawingAreaProxyImpl.cpp >+++ b/Source/WebKit/UIProcess/DrawingAreaProxyImpl.cpp >@@ -200,8 +200,10 @@ void DrawingAreaProxyImpl::discardBackingStore() > } > > DrawingAreaProxyImpl::DrawingMonitor::DrawingMonitor(WebPageProxy& webPage) >- : m_webPage(webPage) >- , m_timer(RunLoop::main(), this, &DrawingMonitor::stop) >+ : m_timer(RunLoop::main(), this, &DrawingMonitor::stop) >+#if PLATFORM(GTK) >+ , m_webPage(webPage) >+#endif > { > #if USE(GLIB_EVENT_LOOP) > // Give redraws more priority. >diff --git a/Source/WebKit/UIProcess/DrawingAreaProxyImpl.h b/Source/WebKit/UIProcess/DrawingAreaProxyImpl.h >index 96652252ea3aa453eb48188d06012dee7cbf3c3e..0af777fce4407d2361dad3fbdffe76a1bbc37b89 100644 >--- a/Source/WebKit/UIProcess/DrawingAreaProxyImpl.h >+++ b/Source/WebKit/UIProcess/DrawingAreaProxyImpl.h >@@ -76,10 +76,12 @@ private: > void stop(); > void didDraw(); > >- WebPageProxy& m_webPage; > MonotonicTime m_startTime; > WTF::Function<void (CallbackBase::Error)> m_callback; > RunLoop::Timer<DrawingMonitor> m_timer; >+#if PLATFORM(GTK) >+ WebPageProxy& m_webPage; >+#endif > }; > > bool m_isBackingStoreDiscardable { true }; >diff --git a/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp b/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp >index 0f7607b5d15b5860e81277b183947274648f48bd..577e469cade111bd1484cc8140a4d342d5587b63 100644 >--- a/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp >+++ b/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp >@@ -35,7 +35,7 @@ > > namespace WebKit { > >-static const LPCWSTR processName(ProcessLauncher::ProcessType processType) >+static LPCWSTR processName(ProcessLauncher::ProcessType processType) > { > switch (processType) { > case ProcessLauncher::ProcessType::Web: >diff --git a/Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp b/Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp >index 95f553dd225ebcaf3db8f9ad02b57a43a8bcbf83..e7b37084d9b21c8578b165817de2dc9603e3538e 100644 >--- a/Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp >+++ b/Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp >@@ -41,13 +41,13 @@ using namespace WebCore; > > #if ENABLE(MEDIA_STREAM) > static const MediaProducer::MediaStateFlags activeCaptureMask = MediaProducer::HasActiveAudioCaptureDevice | MediaProducer::HasActiveVideoCaptureDevice; >-#endif > > static uint64_t generateRequestID() > { > static uint64_t uniqueRequestID = 1; > return uniqueRequestID++; > } >+#endif > > UserMediaPermissionRequestManagerProxy::UserMediaPermissionRequestManagerProxy(WebPageProxy& page) > : m_page(page) >diff --git a/Source/WebKit/UIProcess/win/WebInspectorProxyWin.cpp b/Source/WebKit/UIProcess/win/WebInspectorProxyWin.cpp >index cbfe30e9e0be8321518196355f779808b824f2f6..91cff619bb9af9e3ac54c3b05652e2b30ee3db69 100644 >--- a/Source/WebKit/UIProcess/win/WebInspectorProxyWin.cpp >+++ b/Source/WebKit/UIProcess/win/WebInspectorProxyWin.cpp >@@ -301,9 +301,6 @@ void WebInspectorProxy::platformAttach() > static const unsigned minimumAttachedWidth = 750; > static const unsigned minimumAttachedHeight = 250; > >- unsigned inspectedHeight = platformInspectedWindowHeight(); >- unsigned inspectedWidth = platformInspectedWindowWidth(); >- > if (m_inspectorDetachWindow && ::GetParent(m_inspectorViewWindow) == m_inspectorDetachWindow) { > ::SetParent(m_inspectorViewWindow, m_inspectedViewParentWindow); > ::ShowWindow(m_inspectorDetachWindow, SW_HIDE); >@@ -327,7 +324,6 @@ void WebInspectorProxy::platformDetach() > return; > > if (!m_inspectorDetachWindow) { >- static bool haveRegisteredClass = false; > registerWindowClass(); > m_inspectorDetachWindow = ::CreateWindowEx(0, WebInspectorProxyClassName, 0, WS_OVERLAPPEDWINDOW, > CW_USEDEFAULT, CW_USEDEFAULT, initialWindowWidth, initialWindowHeight, >diff --git a/Source/WebKit/UIProcess/win/WebPopupMenuProxyWin.cpp b/Source/WebKit/UIProcess/win/WebPopupMenuProxyWin.cpp >index a0f963d3774319968e9f4f65544bdb6404f11fde..980e0b7bb01227a323a6d45a957da8b93bd28b73 100644 >--- a/Source/WebKit/UIProcess/win/WebPopupMenuProxyWin.cpp >+++ b/Source/WebKit/UIProcess/win/WebPopupMenuProxyWin.cpp >@@ -50,8 +50,6 @@ static const LPCWSTR kWebKit2WebPopupMenuProxyWindowClassName = L"WebKit2WebPopu > static constexpr int defaultAnimationDuration = 200; > static constexpr int maxPopupHeight = 320; > static constexpr int popupWindowBorderWidth = 1; >-static constexpr int separatorPadding = 4; >-static constexpr int separatorHeight = 1; > > // This is used from within our custom message pump when we want to send a > // message to the web view and not have our message stolen and sent to >diff --git a/Source/WebKit/UIProcess/win/WebPopupMenuProxyWin.h b/Source/WebKit/UIProcess/win/WebPopupMenuProxyWin.h >index 0292d96c928612acc2919f8ca7cf5fe223d8ee6e..4694c47bb79901b066849ccbcbb464c327a4c089 100644 >--- a/Source/WebKit/UIProcess/win/WebPopupMenuProxyWin.h >+++ b/Source/WebKit/UIProcess/win/WebPopupMenuProxyWin.h >@@ -45,8 +45,8 @@ public: > } > ~WebPopupMenuProxyWin(); > >- virtual void showPopupMenu(const WebCore::IntRect&, WebCore::TextDirection, double pageScaleFactor, const Vector<WebPopupItem>&, const PlatformPopupMenuData&, int32_t selectedIndex); >- virtual void hidePopupMenu(); >+ void showPopupMenu(const WebCore::IntRect&, WebCore::TextDirection, double pageScaleFactor, const Vector<WebPopupItem>&, const PlatformPopupMenuData&, int32_t selectedIndex) override; >+ void hidePopupMenu() override; > > bool setFocusedIndex(int index, bool hotTracking = false); > >diff --git a/Source/WebKit/UIProcess/win/WebView.cpp b/Source/WebKit/UIProcess/win/WebView.cpp >index f9b885dc1e2352883b4f6a22ed875f362ee85035..ef7919c720fe717b590919bb85b458185ba50fb1 100644 >--- a/Source/WebKit/UIProcess/win/WebView.cpp >+++ b/Source/WebKit/UIProcess/win/WebView.cpp >@@ -474,10 +474,8 @@ void WebView::paint(HDC hdc, const IntRect& dirtyRect) > cairo_surface_destroy(surface); > > Vector<IntRect> unpaintedRects = unpaintedRegion.rects(); >- for (size_t i = 0; i < unpaintedRects.size(); ++i) { >- RECT winRect = unpaintedRects[i]; >- drawPageBackground(hdc, m_page.get(), unpaintedRects[i]); >- } >+ for (auto& rect : unpaintedRects) >+ drawPageBackground(hdc, m_page.get(), rect); > } else > drawPageBackground(hdc, m_page.get(), dirtyRect); > } >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/curl/WebFrameNetworkingContext.h b/Source/WebKit/WebProcess/WebCoreSupport/curl/WebFrameNetworkingContext.h >index f830e687cb4f5863c773d8bc4dd4bca48c5083f5..f40c5e8572eff765e727f828db4364668da02299 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/curl/WebFrameNetworkingContext.h >+++ b/Source/WebKit/WebProcess/WebCoreSupport/curl/WebFrameNetworkingContext.h >@@ -47,7 +47,7 @@ public: > WebFrameLoaderClient* webFrameLoaderClient() const; > > #if PLATFORM(WIN) >- WebCore::ResourceError blockedError(const WebCore::ResourceRequest&) const; >+ WebCore::ResourceError blockedError(const WebCore::ResourceRequest&) const override; > #endif > > private: >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp b/Source/WebKit/WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp >index e4b7cd000b07520d06f7ce61d444eb855cdc60c1..3c1ea064873c451352816473a0ad222608297bc7 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp >+++ b/Source/WebKit/WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp >@@ -111,7 +111,6 @@ void WebPopupMenu::setUpPlatformData(const WebCore::IntRect& pageCoordinates, Pl > > String itemText = m_popupClient->itemText(index); > >- TextDirection direction = itemText.defaultWritingDirection() == U_RIGHT_TO_LEFT ? TextDirection::RTL : TextDirection::LTR; > TextRun textRun(itemText, 0, 0, AllowTrailingExpansion, itemStyle.textDirection(), itemStyle.hasTextDirectionOverride()); > > notSelectedBackingStoreContext->setFillColor(optionTextColor);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192695
:
357309
|
357426
|
357648