Modified: trunk/Tools/ChangeLog (271946 => 271947)
--- trunk/Tools/ChangeLog 2021-01-27 12:39:27 UTC (rev 271946)
+++ trunk/Tools/ChangeLog 2021-01-27 14:03:16 UTC (rev 271947)
@@ -1,3 +1,17 @@
+2021-01-27 Carlos Garcia Campos <[email protected]>
+
+ [GTK] Test /webkit/WebKitSettings/webkit-settings is failing since r271354
+ https://bugs.webkit.org/show_bug.cgi?id=221033
+
+ Reviewed by Adrian Perez de Castro.
+
+ Since r271354 the font values set in WebKitSettings are always the same you get no matter what the current DPI
+ is. The scaling factor is applied to the font size without actually changing the setting.
+
+ * TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp:
+ (testWebKitSettings): Update the test to check the correct behavior.
+ * TestWebKitAPI/glib/TestExpectations.json: Remove expectation for the test.
+
2021-01-27 Youenn Fablet <[email protected]>
[MacOS] Enable NSURLSession WebSocket code path in WebKitTestRunner
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp (271946 => 271947)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp 2021-01-27 12:39:27 UTC (rev 271946)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp 2021-01-27 14:03:16 UTC (rev 271947)
@@ -164,8 +164,7 @@
g_assert_cmpuint(webkit_settings_font_size_to_points(8), ==, 6);
g_assert_cmpuint(webkit_settings_font_size_to_points(24), ==, 18);
- // Test font size on DPI change. The font size value in pixels should scale
- // accordingly, while the font size value in points should remain the same.
+ // Test font size on DPI change.
if (gtkSettings) {
// At 96 DPI, 20 pixels is 15 points.
webkit_settings_set_default_font_size(settings, 20);
@@ -176,12 +175,12 @@
// Set DPI to 120. The scaling factor is 120 / 96 == 1.25.
g_object_set(gtkSettings, "gtk-xft-dpi", 120 * 1024, nullptr);
- g_assert_cmpuint(webkit_settings_get_default_font_size(settings), ==, 25);
- g_assert_cmpuint(webkit_settings_font_size_to_points(webkit_settings_get_default_font_size(settings)), ==, 15);
- g_assert_cmpuint(webkit_settings_get_default_monospace_font_size(settings), ==, 20);
- g_assert_cmpuint(webkit_settings_font_size_to_points(webkit_settings_get_default_monospace_font_size(settings)), ==, 12);
+ g_assert_cmpuint(webkit_settings_get_default_font_size(settings), ==, 20);
+ g_assert_cmpuint(webkit_settings_font_size_to_points(webkit_settings_get_default_font_size(settings) * 1.25), ==, 15);
+ g_assert_cmpuint(webkit_settings_get_default_monospace_font_size(settings), ==, 16);
+ g_assert_cmpuint(webkit_settings_font_size_to_points(webkit_settings_get_default_monospace_font_size(settings) * 1.25), ==, 12);
- // Set DPI back to 96. The scaling factor is 96 / 120 == 0.8.
+ // Set DPI back to 96.
g_object_set(gtkSettings, "gtk-xft-dpi", 96 * 1024, nullptr);
g_assert_cmpuint(webkit_settings_get_default_font_size(settings), ==, 20);
g_assert_cmpuint(webkit_settings_font_size_to_points(webkit_settings_get_default_font_size(settings)), ==, 15);
Modified: trunk/Tools/TestWebKitAPI/glib/TestExpectations.json (271946 => 271947)
--- trunk/Tools/TestWebKitAPI/glib/TestExpectations.json 2021-01-27 12:39:27 UTC (rev 271946)
+++ trunk/Tools/TestWebKitAPI/glib/TestExpectations.json 2021-01-27 14:03:16 UTC (rev 271947)
@@ -31,9 +31,6 @@
},
"TestWebKitSettings": {
"subtests": {
- "/webkit/WebKitSettings/webkit-settings": {
- "expected": {"gtk": {"status": ["FAIL"], "bug": "webkit.org/b/220922"}}
- },
"/webkit/WebKitSettings/_javascript_-markup": {
"expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/220922"}}
}