WebKit Bugzilla
Attachment 349010 Details for
Bug 171618
: [Win][Meta] Build WebKit using Clang
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
WIP patch
wip.patch (text/plain), 14.29 KB, created by
Fujii Hironori
on 2018-09-06 02:40:12 PDT
(
hide
)
Description:
WIP patch
Filename:
MIME Type:
Creator:
Fujii Hironori
Created:
2018-09-06 02:40:12 PDT
Size:
14.29 KB
patch
obsolete
>diff --git a/Source/JavaScriptCore/jit/JITMathIC.h b/Source/JavaScriptCore/jit/JITMathIC.h >index 4e00958d19f8..68167926fbae 100644 >--- a/Source/JavaScriptCore/jit/JITMathIC.h >+++ b/Source/JavaScriptCore/jit/JITMathIC.h >@@ -144,7 +144,7 @@ public: > }; > > auto replaceCall = [&] () { >-#if COMPILER(MSVC) >+#if COMPILER(MSVC) && !COMPILER(CLANG) > ftlThunkAwareRepatchCall(codeBlock, slowPathCallLocation().retagged<JSInternalPtrTag>(), callReplacement); > #else > ftlThunkAwareRepatchCall(codeBlock, slowPathCallLocation().template retagged<JSInternalPtrTag>(), callReplacement); >diff --git a/Source/WTF/wtf/Compiler.h b/Source/WTF/wtf/Compiler.h >index 798c3090c9b1..31461507a53e 100644 >--- a/Source/WTF/wtf/Compiler.h >+++ b/Source/WTF/wtf/Compiler.h >@@ -363,7 +363,7 @@ > > /* UNUSED_PARAM */ > >-#if !defined(UNUSED_PARAM) && COMPILER(MSVC) >+#if !defined(UNUSED_PARAM) && COMPILER(MSVC) && !COMPILER(CLANG) > #define UNUSED_PARAM(variable) (void)&variable > #endif > >diff --git a/Source/WebCore/inspector/InspectorStyleSheet.cpp b/Source/WebCore/inspector/InspectorStyleSheet.cpp >index 9d985819cb3d..4af708d2d316 100644 >--- a/Source/WebCore/inspector/InspectorStyleSheet.cpp >+++ b/Source/WebCore/inspector/InspectorStyleSheet.cpp >@@ -635,7 +635,7 @@ Ref<Inspector::Protocol::CSS::CSSStyle> InspectorStyle::styleWithProperties() co > const String& name = propertyEntry.name; > > // Visual Studio disagrees with other compilers as to whether 'class' is needed here. >-#if COMPILER(MSVC) >+#if COMPILER(MSVC) && !COMPILER(CLANG) > enum class Protocol::CSS::CSSPropertyStatus status; > #else > enum Inspector::Protocol::CSS::CSSPropertyStatus status; >diff --git a/Source/WebCore/platform/graphics/FloatRect.h b/Source/WebCore/platform/graphics/FloatRect.h >index 8d19f7f862ef..46923ace3b6b 100644 >--- a/Source/WebCore/platform/graphics/FloatRect.h >+++ b/Source/WebCore/platform/graphics/FloatRect.h >@@ -195,6 +195,7 @@ public: > #endif > > #if PLATFORM(WIN) >+ WEBCORE_EXPORT FloatRect(const RECT& rect); > WEBCORE_EXPORT FloatRect(const D2D1_RECT_F&); > WEBCORE_EXPORT operator D2D1_RECT_F() const; > #endif >diff --git a/Source/WebCore/platform/graphics/win/FloatRectDirect2D.cpp b/Source/WebCore/platform/graphics/win/FloatRectDirect2D.cpp >index 88d05e69538e..57f8356b0804 100644 >--- a/Source/WebCore/platform/graphics/win/FloatRectDirect2D.cpp >+++ b/Source/WebCore/platform/graphics/win/FloatRectDirect2D.cpp >@@ -29,6 +29,7 @@ > #if PLATFORM(WIN) > > #include "FloatPoint.h" >+#include "IntRect.h" > #include <d2d1.h> > > namespace WebCore { >@@ -50,6 +51,11 @@ static bool isInfiniteRect(const D2D1_RECT_F& rect) > return true; > } > >+FloatRect::FloatRect(const RECT& rect) >+ : FloatRect(IntRect(rect)) >+{ >+} >+ > FloatRect::FloatRect(const D2D1_RECT_F& r) > { > // Infinite Rect case: >diff --git a/Source/WebCore/platform/graphics/win/IntPointWin.cpp b/Source/WebCore/platform/graphics/win/IntPointWin.cpp >index f76749e8d370..a24369f1c99b 100644 >--- a/Source/WebCore/platform/graphics/win/IntPointWin.cpp >+++ b/Source/WebCore/platform/graphics/win/IntPointWin.cpp >@@ -53,7 +53,7 @@ IntPoint::IntPoint(const POINTS& p) > > IntPoint::operator POINTS() const > { >- POINTS p = {m_x, m_y}; >+ POINTS p = {static_cast<SHORT>(m_x), static_cast<SHORT>(m_y)}; > return p; > } > >diff --git a/Source/WebCore/platform/graphics/win/UniscribeController.cpp b/Source/WebCore/platform/graphics/win/UniscribeController.cpp >index a0147734475a..0b61626d453a 100644 >--- a/Source/WebCore/platform/graphics/win/UniscribeController.cpp >+++ b/Source/WebCore/platform/graphics/win/UniscribeController.cpp >@@ -369,8 +369,8 @@ bool UniscribeController::shapeAndPlaceItem(const UChar* cp, unsigned i, const F > glyphBuffer->setInitialAdvance(origin); > else > glyphBuffer->expandLastAdvance(origin); >- GlyphBufferAdvance advance(-origin.width() + advance, -origin.height()); >- glyphBuffer->add(glyph, fontData, advance); >+ GlyphBufferAdvance glyphAdvance(-origin.width() + advance, -origin.height()); >+ glyphBuffer->add(glyph, fontData, glyphAdvance); > } > > FloatRect glyphBounds = fontData->boundsForGlyph(glyph); >diff --git a/Source/WebCore/platform/win/StructuredExceptionHandlerSuppressor.cpp b/Source/WebCore/platform/win/StructuredExceptionHandlerSuppressor.cpp >index 66947fd59599..b12871aef5ac 100644 >--- a/Source/WebCore/platform/win/StructuredExceptionHandlerSuppressor.cpp >+++ b/Source/WebCore/platform/win/StructuredExceptionHandlerSuppressor.cpp >@@ -31,7 +31,7 @@ > extern "C" int __stdcall exceptionHandlerThunk(); // Defined in makesafeseh.asm > #endif > >-static bool exceptionShouldTerminateProgram(int code) >+static bool exceptionShouldTerminateProgram(DWORD code) > { > switch (code) { > #ifndef NDEBUG >diff --git a/Source/WebCore/platform/win/WheelEventWin.cpp b/Source/WebCore/platform/win/WheelEventWin.cpp >index c24aed18e543..13bb802b176b 100644 >--- a/Source/WebCore/platform/win/WheelEventWin.cpp >+++ b/Source/WebCore/platform/win/WheelEventWin.cpp >@@ -83,7 +83,7 @@ PlatformWheelEvent::PlatformWheelEvent(HWND hWnd, const FloatSize& delta, const > m_wheelTicksY = m_deltaY; > > // Global Position is just x, y location of event >- POINT point = {location.x(), location.y()}; >+ POINT point = flooredIntPoint(location); > float inverseScaleFactor = 1.0f / deviceScaleFactorForWindow(hWnd); > m_globalPosition = point; > m_globalPosition.scale(inverseScaleFactor, inverseScaleFactor); >diff --git a/Source/WebKit/UIProcess/win/WebInspectorProxyWin.cpp b/Source/WebKit/UIProcess/win/WebInspectorProxyWin.cpp >index 758133d92dbd..ee8627e2c35d 100644 >--- a/Source/WebKit/UIProcess/win/WebInspectorProxyWin.cpp >+++ b/Source/WebKit/UIProcess/win/WebInspectorProxyWin.cpp >@@ -231,7 +231,7 @@ WebPageProxy* WebInspectorProxy::platformCreateFrontendPage() > nullptr, // didRemoveNavigationGestureSnapshot > }; > >- RECT r = { 0, 0, initialWindowWidth, initialWindowHeight }; >+ RECT r = { 0, 0, static_cast<LONG>(initialWindowWidth), static_cast<LONG>(initialWindowHeight) }; > auto page = inspectedPage(); > m_inspectedViewWindow = page->viewWidget(); > m_inspectedViewParentWindow = ::GetParent(m_inspectedViewWindow); >diff --git a/Source/WebKitLegacy/win/DefaultPolicyDelegate.cpp b/Source/WebKitLegacy/win/DefaultPolicyDelegate.cpp >index 3b00fb9d7814..e8e5f5c4cc11 100644 >--- a/Source/WebKitLegacy/win/DefaultPolicyDelegate.cpp >+++ b/Source/WebKitLegacy/win/DefaultPolicyDelegate.cpp >@@ -179,7 +179,7 @@ HRESULT DefaultPolicyDelegate::unableToImplementPolicyWithError(_In_opt_ IWebVie > BString frameName; > frame->name(&frameName); > >- LOG_ERROR("called unableToImplementPolicyWithError:%S inFrame:%S", errorStr ? errorStr : TEXT(""), frameName ? frameName : TEXT("")); >+ LOG_ERROR("called unableToImplementPolicyWithError:%S inFrame:%S", errorStr ? static_cast<BSTR>(errorStr) : TEXT(""), frameName ? static_cast<BSTR>(frameName) : TEXT("")); > > return S_OK; > } >diff --git a/Source/WebKitLegacy/win/WebCoreSupport/WebInspectorClient.h b/Source/WebKitLegacy/win/WebCoreSupport/WebInspectorClient.h >index a4b4a03af0d9..8342fe03bb88 100644 >--- a/Source/WebKitLegacy/win/WebCoreSupport/WebInspectorClient.h >+++ b/Source/WebKitLegacy/win/WebCoreSupport/WebInspectorClient.h >@@ -141,7 +141,7 @@ private: > WTF::String m_inspectedURL; > bool m_destroyingInspectorView; > >- static friend LRESULT CALLBACK WebInspectorWndProc(HWND, UINT, WPARAM, LPARAM); >+ friend LRESULT CALLBACK WebInspectorWndProc(HWND, UINT, WPARAM, LPARAM); > }; > > #endif // !defined(WebInspectorClient_h) >diff --git a/Source/WebKitLegacy/win/WebLocalizableStrings.cpp b/Source/WebKitLegacy/win/WebLocalizableStrings.cpp >index c55607f6274b..de0221f545f3 100644 >--- a/Source/WebKitLegacy/win/WebLocalizableStrings.cpp >+++ b/Source/WebKitLegacy/win/WebLocalizableStrings.cpp >@@ -161,7 +161,7 @@ static CFStringRef copyLocalizedStringFromBundle(WebLocalizableStringsBundle* st > > CFStringRef result = CFCopyLocalizedStringWithDefaultValue(key.createCFString().get(), 0, bundle, notFound, 0); > >- ASSERT_WITH_MESSAGE(result != notFound, "could not find localizable string %s in bundle", key); >+ ASSERT_WITH_MESSAGE(result != notFound, "could not find localizable string %s in bundle", key.utf8().data()); > return result; > } > >diff --git a/Source/WebKitLegacy/win/WebNodeHighlight.cpp b/Source/WebKitLegacy/win/WebNodeHighlight.cpp >index 7847ed085b62..07a2f604f397 100644 >--- a/Source/WebKitLegacy/win/WebNodeHighlight.cpp >+++ b/Source/WebKitLegacy/win/WebNodeHighlight.cpp >@@ -41,6 +41,7 @@ > > using namespace WebCore; > >+LRESULT CALLBACK OverlayWndProc(HWND, UINT, WPARAM, LPARAM); > static LPCTSTR kOverlayWindowClassName = TEXT("WebNodeHighlightWindowClass"); > static ATOM registerOverlayClass(); > static LPCTSTR kWebNodeHighlightPointerProp = TEXT("WebNodeHighlightPointer"); >diff --git a/Source/WebKitLegacy/win/WebNodeHighlight.h b/Source/WebKitLegacy/win/WebNodeHighlight.h >index 2f8269a9c852..f9755bb8daea 100644 >--- a/Source/WebKitLegacy/win/WebNodeHighlight.h >+++ b/Source/WebKitLegacy/win/WebNodeHighlight.h >@@ -66,7 +66,7 @@ private: > HWND m_observedWindow; > bool m_showsWhileWebViewIsVisible; > >- friend static LRESULT CALLBACK OverlayWndProc(HWND, UINT, WPARAM, LPARAM); >+ friend LRESULT CALLBACK OverlayWndProc(HWND, UINT, WPARAM, LPARAM); > }; > > #endif // !defined(WebNodeHighlight_h) >diff --git a/Source/WebKitLegacy/win/WebPreferences.cpp b/Source/WebKitLegacy/win/WebPreferences.cpp >index f1d81d83dccf..9cdca6c1b42e 100644 >--- a/Source/WebKitLegacy/win/WebPreferences.cpp >+++ b/Source/WebKitLegacy/win/WebPreferences.cpp >@@ -61,10 +61,10 @@ static const String& oldPreferencesPath() > return path; > } > >-template<typename NumberType> struct CFNumberTraits { static const unsigned Type; }; >-template<> struct CFNumberTraits<int> { static const unsigned Type = kCFNumberSInt32Type; }; >-template<> struct CFNumberTraits<LONGLONG> { static const unsigned Type = kCFNumberLongLongType; }; >-template<> struct CFNumberTraits<float> { static const unsigned Type = kCFNumberFloat32Type; }; >+template<typename NumberType> struct CFNumberTraits { static const CFNumberType Type; }; >+template<> struct CFNumberTraits<int> { static const CFNumberType Type = kCFNumberSInt32Type; }; >+template<> struct CFNumberTraits<LONGLONG> { static const CFNumberType Type = kCFNumberLongLongType; }; >+template<> struct CFNumberTraits<float> { static const CFNumberType Type = kCFNumberFloat32Type; }; > > template<typename NumberType> > static NumberType numberValueForPreferencesValue(CFPropertyListRef value) >@@ -515,7 +515,7 @@ void WebPreferences::migrateWebKitPreferencesToCFPreferences() > if (!CFReadStreamOpen(stream.get())) > return; > >- CFPropertyListFormat format = kCFPropertyListBinaryFormat_v1_0 | kCFPropertyListXMLFormat_v1_0; >+ CFPropertyListFormat format = static_cast<CFPropertyListFormat>(kCFPropertyListBinaryFormat_v1_0 | kCFPropertyListXMLFormat_v1_0); > RetainPtr<CFPropertyListRef> plist = adoptCF(CFPropertyListCreateFromStream(0, stream.get(), 0, kCFPropertyListMutableContainersAndLeaves, &format, 0)); > CFReadStreamClose(stream.get()); > >diff --git a/Source/cmake/WebKitCompilerFlags.cmake b/Source/cmake/WebKitCompilerFlags.cmake >index 72dc5c967792..6bd1ff7fa690 100644 >--- a/Source/cmake/WebKitCompilerFlags.cmake >+++ b/Source/cmake/WebKitCompilerFlags.cmake >@@ -116,18 +116,17 @@ if (COMPILER_IS_GCC_OR_CLANG) > WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-Wno-unknown-pragmas) > add_definitions(-D__USE_MINGW_ANSI_STDIO=1) > endif () >+ # Warnings to be enabled >+ WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-Wall >+ -Wextra >+ -Wcast-align >+ -Wformat-security >+ -Wmissing-format-attribute >+ -Wpointer-arith >+ -Wundef >+ -Wwrite-strings) > endif () > >- # Warnings to be enabled >- WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-Wall >- -Wextra >- -Wcast-align >- -Wformat-security >- -Wmissing-format-attribute >- -Wpointer-arith >- -Wundef >- -Wwrite-strings) >- > # Warnings to be disabled > # FIXME: We should probably not be disabling -Wno-maybe-uninitialized? > WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-Qunused-arguments >diff --git a/Tools/DumpRenderTree/AccessibilityUIElement.h b/Tools/DumpRenderTree/AccessibilityUIElement.h >index 634ce8a8e411..7bc7d5af9de3 100644 >--- a/Tools/DumpRenderTree/AccessibilityUIElement.h >+++ b/Tools/DumpRenderTree/AccessibilityUIElement.h >@@ -65,6 +65,9 @@ class AccessibilityUIElement { > public: > AccessibilityUIElement(PlatformUIElement); > AccessibilityUIElement(const AccessibilityUIElement&); >+#if PLATFORM(WIN) >+ AccessibilityUIElement(nullptr_t); >+#endif > ~AccessibilityUIElement(); > > PlatformUIElement platformUIElement() const { return m_element; } >diff --git a/Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp b/Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp >index 4da226924424..dd08edba60fa 100644 >--- a/Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp >+++ b/Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp >@@ -53,6 +53,11 @@ AccessibilityUIElement::AccessibilityUIElement(PlatformUIElement element) > { > } > >+AccessibilityUIElement::AccessibilityUIElement(nullptr_t) >+ : m_element(nullptr) >+{ >+} >+ > AccessibilityUIElement::AccessibilityUIElement(const AccessibilityUIElement& other) > : m_element(other.m_element) > { >diff --git a/Tools/ImageDiff/cairo/PlatformImageCairo.cpp b/Tools/ImageDiff/cairo/PlatformImageCairo.cpp >index b8dc8f0a20f9..44416e98798b 100644 >--- a/Tools/ImageDiff/cairo/PlatformImageCairo.cpp >+++ b/Tools/ImageDiff/cairo/PlatformImageCairo.cpp >@@ -41,7 +41,7 @@ std::unique_ptr<PlatformImage> PlatformImage::createFromStdin(size_t imageSize) > { > struct ReadContext { > char buffer[2048]; >- unsigned long incomingBytes; >+ size_t incomingBytes; > unsigned long readBytes; > } context { { }, imageSize, 0 }; >
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 171618
:
349006
|
349010
|
349627
|
350006
|
350007
|
467870