Title: [245394] trunk/Source/WebKit
Revision
245394
Author
[email protected]
Date
2019-05-16 04:48:52 -0700 (Thu, 16 May 2019)

Log Message

[WPE] Rendering on a HiDPI display looks scaled up instead of rendered at 2x
https://bugs.webkit.org/show_bug.cgi?id=185764

Patch by Ryan Walklin <[email protected]> on 2019-05-16
Reviewed by Carlos Garcia Campos.

Add a function to the wpe_view_backend_client struct which accepts a device scale factor
configured through wpe_view_backend_dispatch_set_device_scale_factor() and calls
setIntrinsicDeviceScaleFactor for the the current View.Page object. The
function definition has been added in libwpe 1.3.

* UIProcess/API/wpe/WPEView.cpp:
(WKWPE::m_backend): Add set_device_scale_factor implementation declared by libwpe.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (245393 => 245394)


--- trunk/Source/WebKit/ChangeLog	2019-05-16 09:31:16 UTC (rev 245393)
+++ trunk/Source/WebKit/ChangeLog	2019-05-16 11:48:52 UTC (rev 245394)
@@ -1,3 +1,18 @@
+2019-05-16  Ryan Walklin  <[email protected]>
+
+        [WPE] Rendering on a HiDPI display looks scaled up instead of rendered at 2x
+        https://bugs.webkit.org/show_bug.cgi?id=185764
+
+        Reviewed by Carlos Garcia Campos.
+
+        Add a function to the wpe_view_backend_client struct which accepts a device scale factor
+        configured through wpe_view_backend_dispatch_set_device_scale_factor() and calls
+        setIntrinsicDeviceScaleFactor for the the current View.Page object. The
+        function definition has been added in libwpe 1.3.
+
+        * UIProcess/API/wpe/WPEView.cpp:
+        (WKWPE::m_backend): Add set_device_scale_factor implementation declared by libwpe.
+
 2019-05-15  Devin Rousso  <[email protected]>
 
         Web Inspector: user gesture toggle should also force user interaction flag

Modified: trunk/Source/WebKit/UIProcess/API/wpe/WPEView.cpp (245393 => 245394)


--- trunk/Source/WebKit/UIProcess/API/wpe/WPEView.cpp	2019-05-16 09:31:16 UTC (rev 245393)
+++ trunk/Source/WebKit/UIProcess/API/wpe/WPEView.cpp	2019-05-16 11:48:52 UTC (rev 245394)
@@ -100,9 +100,19 @@
                 flags.add(WebCore::ActivityState::IsInWindow);
             view.setViewState(flags);
         },
-        // padding
+        // get_accessible
         nullptr,
+#if WPE_CHECK_VERSION(1, 3, 0)
+        // set_device_scale_factor
+        [](void* data, float scale)
+        {
+            auto& view = *reinterpret_cast<View*>(data);
+            view.page().setIntrinsicDeviceScaleFactor(scale);
+        },
+#else
         nullptr,
+#endif // WPE_CHECK_VERSION(1, 3, 0)
+        // padding,
         nullptr
     };
     wpe_view_backend_set_backend_client(m_backend, &s_backendClient, this);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to