Title: [270741] trunk/Source/WebKit
- Revision
- 270741
- Author
- [email protected]
- Date
- 2020-12-12 14:34:41 -0800 (Sat, 12 Dec 2020)
Log Message
[GTK4] Web view is incorrectly scaled on hidpi
https://bugs.webkit.org/show_bug.cgi?id=218353
Patch by Alexander Mikhaylenko <[email protected]> on 2020-12-12
Reviewed by Adrian Perez de Castro.
* UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
(WebKit::AcceleratedBackingStoreWayland::snapshot): Account for the scale factor.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (270740 => 270741)
--- trunk/Source/WebKit/ChangeLog 2020-12-12 21:06:43 UTC (rev 270740)
+++ trunk/Source/WebKit/ChangeLog 2020-12-12 22:34:41 UTC (rev 270741)
@@ -1,3 +1,13 @@
+2020-12-12 Alexander Mikhaylenko <[email protected]>
+
+ [GTK4] Web view is incorrectly scaled on hidpi
+ https://bugs.webkit.org/show_bug.cgi?id=218353
+
+ Reviewed by Adrian Perez de Castro.
+
+ * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
+ (WebKit::AcceleratedBackingStoreWayland::snapshot): Account for the scale factor.
+
2020-12-12 Commit Queue <[email protected]>
Unreviewed, reverting r270692.
Modified: trunk/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp (270740 => 270741)
--- trunk/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp 2020-12-12 21:06:43 UTC (rev 270740)
+++ trunk/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp 2020-12-12 22:34:41 UTC (rev 270741)
@@ -519,7 +519,9 @@
if (!tryEnsureTexture(texture, textureSize))
return;
- graphene_rect_t bounds = GRAPHENE_RECT_INIT(0, 0, static_cast<float>(textureSize.width()), static_cast<float>(textureSize.height()));
+ float deviceScaleFactor = m_webPage.deviceScaleFactor();
+
+ graphene_rect_t bounds = GRAPHENE_RECT_INIT(0, 0, static_cast<float>(textureSize.width() / deviceScaleFactor), static_cast<float>(textureSize.height() / deviceScaleFactor));
if (m_gdkGLContext) {
GRefPtr<GdkTexture> gdkTexture = adoptGRef(gdk_gl_texture_new(m_gdkGLContext.get(), texture, textureSize.width(), textureSize.height(), nullptr, nullptr));
gtk_snapshot_append_texture(gtkSnapshot, gdkTexture.get(), &bounds);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes