Title: [239666] trunk/Tools
Revision
239666
Author
[email protected]
Date
2019-01-06 19:27:22 -0800 (Sun, 06 Jan 2019)

Log Message

[Win][Clang] Fix compilation warnings of MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=193029

Reviewed by Ross Kirsling.

* MiniBrowser/win/MiniBrowserWebHost.h: Removed unused m_oldFont
and m_URLBarFont. Reorder member variables to fix -Wreorder
warning.
* MiniBrowser/win/PageLoadTestClient.cpp:
(PageLoadTestClient::PageLoadTestClient): Reorder the member initializer list.
* MiniBrowser/win/PageLoadTestClient.h: Removed 'virtual' of
pageLoadStartedAtTime and pageLoadEndedAtTime. Removed unused
m_currentURLIndex.
* MiniBrowser/win/WebKitBrowserWindow.cpp:
(WebKitBrowserWindow::WebKitBrowserWindow): Initialize
navigationClient with '{ }' to fix the missing field warning.
* MiniBrowser/win/WebKitLegacyBrowserWindow.cpp:
(initDocStruct): Changed the argument type docname to const.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (239665 => 239666)


--- trunk/Tools/ChangeLog	2019-01-07 02:08:20 UTC (rev 239665)
+++ trunk/Tools/ChangeLog	2019-01-07 03:27:22 UTC (rev 239666)
@@ -1,3 +1,24 @@
+2019-01-06  Fujii Hironori  <[email protected]>
+
+        [Win][Clang] Fix compilation warnings of MiniBrowser
+        https://bugs.webkit.org/show_bug.cgi?id=193029
+
+        Reviewed by Ross Kirsling.
+
+        * MiniBrowser/win/MiniBrowserWebHost.h: Removed unused m_oldFont
+        and m_URLBarFont. Reorder member variables to fix -Wreorder
+        warning.
+        * MiniBrowser/win/PageLoadTestClient.cpp:
+        (PageLoadTestClient::PageLoadTestClient): Reorder the member initializer list.
+        * MiniBrowser/win/PageLoadTestClient.h: Removed 'virtual' of
+        pageLoadStartedAtTime and pageLoadEndedAtTime. Removed unused
+        m_currentURLIndex.
+        * MiniBrowser/win/WebKitBrowserWindow.cpp:
+        (WebKitBrowserWindow::WebKitBrowserWindow): Initialize
+        navigationClient with '{ }' to fix the missing field warning.
+        * MiniBrowser/win/WebKitLegacyBrowserWindow.cpp:
+        (initDocStruct): Changed the argument type docname to const.
+
 2019-01-06  Jiewen Tan  <[email protected]>
 
         [WebAuthN] Import U2F command/response converters from Chromium

Modified: trunk/Tools/MiniBrowser/win/MiniBrowserWebHost.h (239665 => 239666)


--- trunk/Tools/MiniBrowser/win/MiniBrowserWebHost.h	2019-01-07 02:08:20 UTC (rev 239665)
+++ trunk/Tools/MiniBrowser/win/MiniBrowserWebHost.h	2019-01-07 03:27:22 UTC (rev 239666)
@@ -77,8 +77,6 @@
     HRESULT updateAddressBar(IWebView&);
 
 private:
+    WebKitLegacyBrowserWindow* m_client { nullptr };
     HWND m_hURLBarWnd { 0 };
-    HGDIOBJ m_URLBarFont { 0 };
-    HGDIOBJ m_oldFont { 0 };
-    WebKitLegacyBrowserWindow* m_client { nullptr };
 };

Modified: trunk/Tools/MiniBrowser/win/PageLoadTestClient.cpp (239665 => 239666)


--- trunk/Tools/MiniBrowser/win/PageLoadTestClient.cpp	2019-01-07 02:08:20 UTC (rev 239665)
+++ trunk/Tools/MiniBrowser/win/PageLoadTestClient.cpp	2019-01-07 03:27:22 UTC (rev 239666)
@@ -37,8 +37,8 @@
 
 PageLoadTestClient::PageLoadTestClient(WebKitLegacyBrowserWindow* host, bool pageLoadTesting)
     : m_host(host)
+    , m_waitForLoadToReallyEnd(this, &PageLoadTestClient::endPageLoad)
     , m_repetitions(pageLoadTesting ? 20 : 1)
-    , m_waitForLoadToReallyEnd(this, &PageLoadTestClient::endPageLoad)
     , m_pageLoadTesting(pageLoadTesting)
 {
 }

Modified: trunk/Tools/MiniBrowser/win/PageLoadTestClient.h (239665 => 239666)


--- trunk/Tools/MiniBrowser/win/PageLoadTestClient.h	2019-01-07 02:08:20 UTC (rev 239665)
+++ trunk/Tools/MiniBrowser/win/PageLoadTestClient.h	2019-01-07 03:27:22 UTC (rev 239666)
@@ -127,8 +127,8 @@
     void clearPageLoadState();
     bool shouldConsiderPageLoadEnded() const;
 
-    virtual void pageLoadStartedAtTime(CFAbsoluteTime);
-    virtual void pageLoadEndedAtTime(CFAbsoluteTime);
+    void pageLoadStartedAtTime(CFAbsoluteTime);
+    void pageLoadEndedAtTime(CFAbsoluteTime);
     void dumpRunStatistics();
 
     WebKitLegacyBrowserWindow* m_host;
@@ -146,7 +146,6 @@
     double m_geometricMeanProductSum { 1.0 };
     unsigned m_frames { 0 };
     unsigned m_onLoadEvents { 0 };
-    unsigned m_currentURLIndex { 0 };
     unsigned m_currentRepetition { 0 };
     unsigned m_pagesTimed { 0 };
     unsigned m_repetitions;

Modified: trunk/Tools/MiniBrowser/win/WebKitBrowserWindow.cpp (239665 => 239666)


--- trunk/Tools/MiniBrowser/win/WebKitBrowserWindow.cpp	2019-01-07 02:08:20 UTC (rev 239665)
+++ trunk/Tools/MiniBrowser/win/WebKitBrowserWindow.cpp	2019-01-07 03:27:22 UTC (rev 239666)
@@ -104,7 +104,9 @@
     m_view = adoptWK(WKViewCreate(rect, conf.get(), mainWnd));
     auto page = WKViewGetPage(m_view.get());
 
-    WKPageNavigationClientV0 navigationClient = {{ 0, this }};
+    WKPageNavigationClientV0 navigationClient = { };
+    navigationClient.base.version = 0;
+    navigationClient.base.clientInfo = this;
     navigationClient.didFinishNavigation = didFinishNavigation;
     navigationClient.didCommitNavigation = didCommitNavigation;
     navigationClient.didReceiveAuthenticationChallenge = didReceiveAuthenticationChallenge;

Modified: trunk/Tools/MiniBrowser/win/WebKitLegacyBrowserWindow.cpp (239665 => 239666)


--- trunk/Tools/MiniBrowser/win/WebKitLegacyBrowserWindow.cpp	2019-01-07 02:08:20 UTC (rev 239665)
+++ trunk/Tools/MiniBrowser/win/WebKitLegacyBrowserWindow.cpp	2019-01-07 03:27:22 UTC (rev 239666)
@@ -612,7 +612,7 @@
     return pdlg.hDC;
 }
 
-static void initDocStruct(DOCINFO* di, TCHAR* docname)
+static void initDocStruct(DOCINFO* di, const wchar_t* docname)
 {
     memset(di, 0, sizeof(DOCINFO));
     di->cbSize = sizeof(DOCINFO);

Modified: trunk/Tools/MiniBrowser/win/WebKitLegacyBrowserWindow.h (239665 => 239666)


--- trunk/Tools/MiniBrowser/win/WebKitLegacyBrowserWindow.h	2019-01-07 02:08:20 UTC (rev 239665)
+++ trunk/Tools/MiniBrowser/win/WebKitLegacyBrowserWindow.h	2019-01-07 03:27:22 UTC (rev 239666)
@@ -120,8 +120,6 @@
 
     std::vector<IWebHistoryItemPtr> m_historyItems;
 
-    std::unique_ptr<PageLoadTestClient> m_pageLoadTestClient;
-
     IWebViewPtr m_webView;
     IWebViewPrivatePtr m_webViewPrivate;
 
@@ -144,4 +142,6 @@
     HWND m_viewWnd { nullptr };
 
     bool m_useLayeredWebView;
+
+    std::unique_ptr<PageLoadTestClient> m_pageLoadTestClient;
 };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to