Title: [243685] trunk/Tools
Revision
243685
Author
[email protected]
Date
2019-03-31 18:38:09 -0700 (Sun, 31 Mar 2019)

Log Message

[Win][WebKit] MiniBrowser should support high DPI display
https://bugs.webkit.org/show_bug.cgi?id=196391

Reviewed by Alex Christensen.

* MiniBrowser/win/WebKitBrowserWindow.cpp:
(WebKitBrowserWindow::WebKitBrowserWindow): Call resetZoom to set the page zoom factor.
(WebKitBrowserWindow::resetZoom): Changed the default page zoom factor from 1 to the device scale factor.
* MiniBrowser/win/stdafx.h: Define WEBCORE_EXPORT.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (243684 => 243685)


--- trunk/Tools/ChangeLog	2019-03-31 20:01:44 UTC (rev 243684)
+++ trunk/Tools/ChangeLog	2019-04-01 01:38:09 UTC (rev 243685)
@@ -1,3 +1,15 @@
+2019-03-31  Fujii Hironori  <[email protected]>
+
+        [Win][WebKit] MiniBrowser should support high DPI display
+        https://bugs.webkit.org/show_bug.cgi?id=196391
+
+        Reviewed by Alex Christensen.
+
+        * MiniBrowser/win/WebKitBrowserWindow.cpp:
+        (WebKitBrowserWindow::WebKitBrowserWindow): Call resetZoom to set the page zoom factor.
+        (WebKitBrowserWindow::resetZoom): Changed the default page zoom factor from 1 to the device scale factor.
+        * MiniBrowser/win/stdafx.h: Define WEBCORE_EXPORT.
+
 2019-03-31  Sam Weinig  <[email protected]>
 
         Remove more i386 specific configurations

Modified: trunk/Tools/MiniBrowser/win/WebKitBrowserWindow.cpp (243684 => 243685)


--- trunk/Tools/MiniBrowser/win/WebKitBrowserWindow.cpp	2019-03-31 20:01:44 UTC (rev 243684)
+++ trunk/Tools/MiniBrowser/win/WebKitBrowserWindow.cpp	2019-04-01 01:38:09 UTC (rev 243685)
@@ -27,6 +27,7 @@
 
 #include "MiniBrowserLibResource.h"
 #include "common.h"
+#include <WebCore/GDIUtilities.h>
 #include <WebKit/WKAuthenticationChallenge.h>
 #include <WebKit/WKAuthenticationDecisionListener.h>
 #include <WebKit/WKCertificateInfoCurl.h>
@@ -140,6 +141,7 @@
     WKPageSetPageUIClient(page, &uiClient.base);
 
     updateProxySettings();
+    resetZoom();
 }
 
 void WebKitBrowserWindow::updateProxySettings()
@@ -263,7 +265,7 @@
 void WebKitBrowserWindow::resetZoom()
 {
     auto page = WKViewGetPage(m_view.get());
-    WKPageSetPageZoomFactor(page, 1);
+    WKPageSetPageZoomFactor(page, WebCore::deviceScaleFactorForWindow(hwnd()));
 }
 
 void WebKitBrowserWindow::zoomIn()

Modified: trunk/Tools/MiniBrowser/win/stdafx.h (243684 => 243685)


--- trunk/Tools/MiniBrowser/win/stdafx.h	2019-03-31 20:01:44 UTC (rev 243684)
+++ trunk/Tools/MiniBrowser/win/stdafx.h	2019-04-01 01:38:09 UTC (rev 243685)
@@ -68,3 +68,5 @@
 #include <crtdbg.h>
 #endif
 #endif
+
+#define WEBCORE_EXPORT WTF_IMPORT
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to