Changeset 239366 in webkit


Ignore:
Timestamp:
Dec 18, 2018 8:35:34 PM (5 years ago)
Author:
Fujii Hironori
Message:

[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.
Location:
trunk/Source/WebKit
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r239363 r239366  
     12018-12-18  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        [Win][Clang] Fix compilation warnings under Source/WebKit directory
     4        https://bugs.webkit.org/show_bug.cgi?id=192695
     5
     6        Reviewed by Alex Christensen.
     7
     8        * NetworkProcess/cache/NetworkCacheData.cpp:
     9        (makeSalt): Enclosed by #if !OS(WINDOWS).
     10        * NetworkProcess/cache/NetworkCacheFileSystem.cpp:
     11        (WebKit::NetworkCache::directoryEntryType): Ditto.
     12        * Platform/win/ModuleWin.cpp:
     13        (WebKit::Module::platformFunctionPointer const): Cast a function pointer with reinterpret_cast<void*>().
     14        * UIProcess/DrawingAreaProxyImpl.cpp:
     15        (WebKit::DrawingAreaProxyImpl::DrawingMonitor::DrawingMonitor):
     16        Moved the initializer of m_webPage in order to be encluded by #if PLATFORM(GTK).
     17        * UIProcess/DrawingAreaProxyImpl.h: Ditto.
     18        * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
     19        (WebKit::processName): Removed the duplicated 'const' type qualifier.
     20        * UIProcess/win/WebInspectorProxyWin.cpp:
     21        (WebKit::WebInspectorProxy::platformAttach): Removed an unused variable.
     22        (WebKit::WebInspectorProxy::platformDetach): Ditto.
     23        * UIProcess/win/WebPopupMenuProxyWin.cpp: Ditto.
     24        * UIProcess/win/WebView.cpp:
     25        (WebKit::WebView::paint): Ditto.
     26        (WebKit::WebPopupMenu::setUpPlatformData): Ditto.
     27        * UIProcess/win/WebPopupMenuProxyWin.h: Marked override methods with 'override'.
     28        * WebProcess/WebCoreSupport/curl/WebFrameNetworkingContext.h: Ditto.
     29        * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp: Removed an unused variable.
     30
    1312018-12-18  Wenson Hsieh  <wenson_hsieh@apple.com>
    232
  • trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheData.cpp

    r228455 r239366  
    143143}
    144144
     145#if !OS(WINDOWS)
    145146static Salt makeSalt()
    146147{
     
    151152    return salt;
    152153}
     154#endif
    153155
    154156std::optional<Salt> readOrMakeSalt(const String& path)
  • trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheFileSystem.cpp

    r237266 r239366  
    5252namespace NetworkCache {
    5353
     54#if !OS(WINDOWS)
    5455static DirectoryEntryType directoryEntryType(uint8_t dtype)
    5556{
    56 #if !OS(WINDOWS)
    5757    switch (dtype) {
    5858    case DT_DIR:
     
    6464        return DirectoryEntryType::File;
    6565    }
    66 #else
    6766    return DirectoryEntryType::File;
     67}
    6868#endif
    69 }
    7069
    7170void traverseDirectory(const String& path, const Function<void (const String&, DirectoryEntryType)>& function)
  • trunk/Source/WebKit/Platform/win/ModuleWin.cpp

    r223966 r239366  
    5252    if (!m_module)
    5353        return 0;
    54     return ::GetProcAddress(m_module, functionName);
     54    auto proc = ::GetProcAddress(m_module, functionName);
     55    return reinterpret_cast<void*>(proc);
    5556}
    5657
  • trunk/Source/WebKit/UIProcess/DrawingAreaProxyImpl.cpp

    r229209 r239366  
    201201
    202202DrawingAreaProxyImpl::DrawingMonitor::DrawingMonitor(WebPageProxy& webPage)
    203     : m_webPage(webPage)
    204     , m_timer(RunLoop::main(), this, &DrawingMonitor::stop)
     203    : m_timer(RunLoop::main(), this, &DrawingMonitor::stop)
     204#if PLATFORM(GTK)
     205    , m_webPage(webPage)
     206#endif
    205207{
    206208#if USE(GLIB_EVENT_LOOP)
  • trunk/Source/WebKit/UIProcess/DrawingAreaProxyImpl.h

    r229174 r239366  
    7777        void didDraw();
    7878
    79         WebPageProxy& m_webPage;
    8079        MonotonicTime m_startTime;
    8180        WTF::Function<void (CallbackBase::Error)> m_callback;
    8281        RunLoop::Timer<DrawingMonitor> m_timer;
     82#if PLATFORM(GTK)
     83        WebPageProxy& m_webPage;
     84#endif
    8385    };
    8486
  • trunk/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp

    r239092 r239366  
    3636namespace WebKit {
    3737
    38 static const LPCWSTR processName(ProcessLauncher::ProcessType processType)
     38static LPCWSTR processName(ProcessLauncher::ProcessType processType)
    3939{
    4040    switch (processType) {
  • trunk/Source/WebKit/UIProcess/win/WebInspectorProxyWin.cpp

    r238771 r239366  
    302302    static const unsigned minimumAttachedHeight = 250;
    303303
    304     unsigned inspectedHeight = platformInspectedWindowHeight();
    305     unsigned inspectedWidth = platformInspectedWindowWidth();
    306 
    307304    if (m_inspectorDetachWindow && ::GetParent(m_inspectorViewWindow) == m_inspectorDetachWindow) {
    308305        ::SetParent(m_inspectorViewWindow, m_inspectedViewParentWindow);
     
    328325
    329326    if (!m_inspectorDetachWindow) {
    330         static bool haveRegisteredClass = false;
    331327        registerWindowClass();
    332328        m_inspectorDetachWindow = ::CreateWindowEx(0, WebInspectorProxyClassName, 0, WS_OVERLAPPEDWINDOW,
  • trunk/Source/WebKit/UIProcess/win/WebPopupMenuProxyWin.cpp

    r239092 r239366  
    5151static constexpr int maxPopupHeight = 320;
    5252static constexpr int popupWindowBorderWidth = 1;
    53 static constexpr int separatorPadding = 4;
    54 static constexpr int separatorHeight = 1;
    5553
    5654// This is used from within our custom message pump when we want to send a
  • trunk/Source/WebKit/UIProcess/win/WebPopupMenuProxyWin.h

    r234442 r239366  
    4646    ~WebPopupMenuProxyWin();
    4747
    48     virtual void showPopupMenu(const WebCore::IntRect&, WebCore::TextDirection, double pageScaleFactor, const Vector<WebPopupItem>&, const PlatformPopupMenuData&, int32_t selectedIndex);
    49     virtual void hidePopupMenu();
     48    void showPopupMenu(const WebCore::IntRect&, WebCore::TextDirection, double pageScaleFactor, const Vector<WebPopupItem>&, const PlatformPopupMenuData&, int32_t selectedIndex) override;
     49    void hidePopupMenu() override;
    5050
    5151    bool setFocusedIndex(int index, bool hotTracking = false);
  • trunk/Source/WebKit/UIProcess/win/WebView.cpp

    r239092 r239366  
    475475
    476476        Vector<IntRect> unpaintedRects = unpaintedRegion.rects();
    477         for (size_t i = 0; i < unpaintedRects.size(); ++i) {
    478             RECT winRect = unpaintedRects[i];
    479             drawPageBackground(hdc, m_page.get(), unpaintedRects[i]);
    480         }
     477        for (auto& rect : unpaintedRects)
     478            drawPageBackground(hdc, m_page.get(), rect);
    481479    } else
    482480        drawPageBackground(hdc, m_page.get(), dirtyRect);
  • trunk/Source/WebKit/WebProcess/WebCoreSupport/curl/WebFrameNetworkingContext.h

    r224961 r239366  
    4848
    4949#if PLATFORM(WIN)
    50     WebCore::ResourceError blockedError(const WebCore::ResourceRequest&) const;
     50    WebCore::ResourceError blockedError(const WebCore::ResourceRequest&) const override;
    5151#endif
    5252
  • trunk/Source/WebKit/WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp

    r235205 r239366  
    112112        String itemText = m_popupClient->itemText(index);
    113113
    114         TextDirection direction = itemText.defaultWritingDirection() == U_RIGHT_TO_LEFT ? TextDirection::RTL : TextDirection::LTR;
    115114        TextRun textRun(itemText, 0, 0, AllowTrailingExpansion, itemStyle.textDirection(), itemStyle.hasTextDirectionOverride());
    116115
Note: See TracChangeset for help on using the changeset viewer.