Diff
Modified: trunk/Source/WebKit/ChangeLog (239365 => 239366)
--- trunk/Source/WebKit/ChangeLog 2018-12-19 03:21:15 UTC (rev 239365)
+++ trunk/Source/WebKit/ChangeLog 2018-12-19 04:35:34 UTC (rev 239366)
@@ -1,3 +1,33 @@
+2018-12-18 Fujii Hironori <[email protected]>
+
+ [Win][Clang] Fix compilation warnings under Source/WebKit directory
+ https://bugs.webkit.org/show_bug.cgi?id=192695
+
+ Reviewed by Alex Christensen.
+
+ * 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/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-18 Wenson Hsieh <[email protected]>
[macOS] fast/forms/datalist/datalist-textinput-suggestions-order.html sometimes crashes after r239337
Modified: trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheData.cpp (239365 => 239366)
--- trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheData.cpp 2018-12-19 03:21:15 UTC (rev 239365)
+++ trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheData.cpp 2018-12-19 04:35:34 UTC (rev 239366)
@@ -142,6 +142,7 @@
return !memcmp(a.data(), b.data(), a.size());
}
+#if !OS(WINDOWS)
static Salt makeSalt()
{
Salt salt;
@@ -150,6 +151,7 @@
*reinterpret_cast<uint32_t*>(&salt[4]) = cryptographicallyRandomNumber();
return salt;
}
+#endif
std::optional<Salt> readOrMakeSalt(const String& path)
{
Modified: trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheFileSystem.cpp (239365 => 239366)
--- trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheFileSystem.cpp 2018-12-19 03:21:15 UTC (rev 239365)
+++ trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheFileSystem.cpp 2018-12-19 04:35:34 UTC (rev 239366)
@@ -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 @@
ASSERT_NOT_REACHED();
return DirectoryEntryType::File;
}
-#else
return DirectoryEntryType::File;
+}
#endif
-}
void traverseDirectory(const String& path, const Function<void (const String&, DirectoryEntryType)>& function)
{
Modified: trunk/Source/WebKit/Platform/win/ModuleWin.cpp (239365 => 239366)
--- trunk/Source/WebKit/Platform/win/ModuleWin.cpp 2018-12-19 03:21:15 UTC (rev 239365)
+++ trunk/Source/WebKit/Platform/win/ModuleWin.cpp 2018-12-19 04:35:34 UTC (rev 239366)
@@ -51,7 +51,8 @@
{
if (!m_module)
return 0;
- return ::GetProcAddress(m_module, functionName);
+ auto proc = ::GetProcAddress(m_module, functionName);
+ return reinterpret_cast<void*>(proc);
}
}
Modified: trunk/Source/WebKit/UIProcess/DrawingAreaProxyImpl.cpp (239365 => 239366)
--- trunk/Source/WebKit/UIProcess/DrawingAreaProxyImpl.cpp 2018-12-19 03:21:15 UTC (rev 239365)
+++ trunk/Source/WebKit/UIProcess/DrawingAreaProxyImpl.cpp 2018-12-19 04:35:34 UTC (rev 239366)
@@ -200,8 +200,10 @@
}
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.
Modified: trunk/Source/WebKit/UIProcess/DrawingAreaProxyImpl.h (239365 => 239366)
--- trunk/Source/WebKit/UIProcess/DrawingAreaProxyImpl.h 2018-12-19 03:21:15 UTC (rev 239365)
+++ trunk/Source/WebKit/UIProcess/DrawingAreaProxyImpl.h 2018-12-19 04:35:34 UTC (rev 239366)
@@ -76,10 +76,12 @@
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 };
Modified: trunk/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp (239365 => 239366)
--- trunk/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp 2018-12-19 03:21:15 UTC (rev 239365)
+++ trunk/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp 2018-12-19 04:35:34 UTC (rev 239366)
@@ -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:
Modified: trunk/Source/WebKit/UIProcess/win/WebInspectorProxyWin.cpp (239365 => 239366)
--- trunk/Source/WebKit/UIProcess/win/WebInspectorProxyWin.cpp 2018-12-19 03:21:15 UTC (rev 239365)
+++ trunk/Source/WebKit/UIProcess/win/WebInspectorProxyWin.cpp 2018-12-19 04:35:34 UTC (rev 239366)
@@ -301,9 +301,6 @@
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 @@
return;
if (!m_inspectorDetachWindow) {
- static bool haveRegisteredClass = false;
registerWindowClass();
m_inspectorDetachWindow = ::CreateWindowEx(0, WebInspectorProxyClassName, 0, WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, CW_USEDEFAULT, initialWindowWidth, initialWindowHeight,
Modified: trunk/Source/WebKit/UIProcess/win/WebPopupMenuProxyWin.cpp (239365 => 239366)
--- trunk/Source/WebKit/UIProcess/win/WebPopupMenuProxyWin.cpp 2018-12-19 03:21:15 UTC (rev 239365)
+++ trunk/Source/WebKit/UIProcess/win/WebPopupMenuProxyWin.cpp 2018-12-19 04:35:34 UTC (rev 239366)
@@ -50,8 +50,6 @@
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
Modified: trunk/Source/WebKit/UIProcess/win/WebPopupMenuProxyWin.h (239365 => 239366)
--- trunk/Source/WebKit/UIProcess/win/WebPopupMenuProxyWin.h 2018-12-19 03:21:15 UTC (rev 239365)
+++ trunk/Source/WebKit/UIProcess/win/WebPopupMenuProxyWin.h 2018-12-19 04:35:34 UTC (rev 239366)
@@ -45,8 +45,8 @@
}
~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);
Modified: trunk/Source/WebKit/UIProcess/win/WebView.cpp (239365 => 239366)
--- trunk/Source/WebKit/UIProcess/win/WebView.cpp 2018-12-19 03:21:15 UTC (rev 239365)
+++ trunk/Source/WebKit/UIProcess/win/WebView.cpp 2018-12-19 04:35:34 UTC (rev 239366)
@@ -474,10 +474,8 @@
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);
}
Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/curl/WebFrameNetworkingContext.h (239365 => 239366)
--- trunk/Source/WebKit/WebProcess/WebCoreSupport/curl/WebFrameNetworkingContext.h 2018-12-19 03:21:15 UTC (rev 239365)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/curl/WebFrameNetworkingContext.h 2018-12-19 04:35:34 UTC (rev 239366)
@@ -47,7 +47,7 @@
WebFrameLoaderClient* webFrameLoaderClient() const;
#if PLATFORM(WIN)
- WebCore::ResourceError blockedError(const WebCore::ResourceRequest&) const;
+ WebCore::ResourceError blockedError(const WebCore::ResourceRequest&) const override;
#endif
private:
Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp (239365 => 239366)
--- trunk/Source/WebKit/WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp 2018-12-19 03:21:15 UTC (rev 239365)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp 2018-12-19 04:35:34 UTC (rev 239366)
@@ -111,7 +111,6 @@
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);