[Win][DLLLauncher] Remove --highDPI switch
authorHironori.Fujii@sony.com <Hironori.Fujii@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Aug 2018 17:43:42 +0000 (17:43 +0000)
committerHironori.Fujii@sony.com <Hironori.Fujii@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Aug 2018 17:43:42 +0000 (17:43 +0000)
https://bugs.webkit.org/show_bug.cgi?id=188255

Reviewed by Yusuke Suzuki.

Bug 149417 has added `--highDPI` switch to make MiniBrowser DPI
aware. But, Bug 158733 has made MiniBrowser always DPI aware. It
became useless since the change. Remove the switch.

This change fixes the issue all dump render tree tests are failing
in WinCairo port if high DPI display is connected.

* MiniBrowser/win/Common.cpp:
(parseCommandLine): Removed `--highDPI` switch.
* win/DLLLauncher/DLLLauncherMain.cpp:
(wWinMain): Do not call SetProcessDPIAware.
(shouldUseHighDPI): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234607 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/MiniBrowser/win/Common.cpp
Tools/win/DLLLauncher/DLLLauncherMain.cpp

index 658bd91..a19864c 100644 (file)
@@ -1,3 +1,23 @@
+2018-08-06  Fujii Hironori  <Hironori.Fujii@sony.com>
+
+        [Win][DLLLauncher] Remove --highDPI switch
+        https://bugs.webkit.org/show_bug.cgi?id=188255
+
+        Reviewed by Yusuke Suzuki.
+
+        Bug 149417 has added `--highDPI` switch to make MiniBrowser DPI
+        aware. But, Bug 158733 has made MiniBrowser always DPI aware. It
+        became useless since the change. Remove the switch.
+
+        This change fixes the issue all dump render tree tests are failing
+        in WinCairo port if high DPI display is connected.
+
+        * MiniBrowser/win/Common.cpp:
+        (parseCommandLine): Removed `--highDPI` switch.
+        * win/DLLLauncher/DLLLauncherMain.cpp:
+        (wWinMain): Do not call SetProcessDPIAware.
+        (shouldUseHighDPI): Deleted.
+
 2018-08-06  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         [iOS] Tests that try to interact with the QuickType bar time out on iOS 11+
index 3588fc4..ac38f01 100644 (file)
@@ -178,8 +178,6 @@ CommandLineOptions parseCommandLine()
             options.useFullDesktop = true;
         else if (!wcsicmp(argv[i], L"--performance"))
             options.pageLoadTesting = true;
-        else if (!wcsicmp(argv[i], L"--highDPI"))
-            continue; // ignore
         else if (!wcsicmp(argv[i], L"--wk1") || !wcsicmp(argv[i], L"--legacy"))
             options.windowType = MainWindow::BrowserWindowType::WebKitLegacy;
 #if ENABLE(WEBKIT)
index fcf1a87..1d22daa 100644 (file)
@@ -167,33 +167,12 @@ static wstring getLastErrorString(HRESULT hr)
     return errorMessage;
 }
 
-static bool shouldUseHighDPI()
-{
-#ifdef WIN_CAIRO
-    return true;
-#else
-    int argc = 0;
-    WCHAR** argv = CommandLineToArgvW(GetCommandLineW(), &argc);
-    for (int i = 1; i < argc; ++i) {
-        if (!wcsicmp(argv[i], L"--highDPI"))
-            return true;
-    }
-
-    return false;
-#endif
-}
-
 #if USE_CONSOLE_ENTRY_POINT
 int main(int argc, const char* argv[])
 #else
 int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPWSTR lpstrCmdLine, _In_ int nCmdShow)
 #endif
 {
-    if (shouldUseHighDPI()) {
-        BOOL didIt = SetProcessDPIAware();
-        _ASSERT(didIt);
-    }
-
 #ifdef _CRTDBG_MAP_ALLOC
     _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
     _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);