Bug 56866

Summary: [GTK] Force DumpRenderTree to use 96 DPI
Product: WebKit Reporter: Martin Robinson <mrobinson>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, alex, eric, webkit.review.bot, xan.lopez
Priority: P3 Keywords: Gtk
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Bug Depends on:    
Bug Blocks: 57068    
Attachments:
Description Flags
Patch none

Description Martin Robinson 2011-03-22 14:54:52 PDT
Forcing DumpRenderTree to use 96 DPI will fix a few issues:

1. Allow for consistent runs across different systems. Depending on when font sizes were calculated in DRT runs, the DPI was different. 
2. Fix the size of the menu list arrow in DRT results. The default GTK+ font size was specified in terms of 72 DPI, which resulted in large sized arrows.
3. Allow the DumpRenderTree (WebKit1) to share more DRT results with the WebKitTestRunner (WebKit2), which uses pixel font sizes and 92 DPI always.
Comment 1 Martin Robinson 2011-03-25 10:52:16 PDT
Created attachment 86958 [details]
Patch
Comment 2 Martin Robinson 2011-03-25 11:05:19 PDT
This patch does not include the many pixel and expected results changes. Essentially any test with a menu list will change. I plan to generate those after landing both this patch and https://bugs.webkit.org/show_bug.cgi?id=57068 to avoid churn.
Comment 3 Martin Robinson 2011-03-25 11:14:48 PDT
Comment on attachment 86958 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=86958&action=review

> Tools/DumpRenderTree/gtk/DumpRenderTree.cpp:427
> +                 "default-font-size", 12,
> +                 "default-monospace-font-size", 10,

I will leave a comment here when landing that says something like this: // WebGTK+ accepts font sizes in points, so these match other platforms' DRTs for 96 DPI.
Comment 4 Xan Lopez 2011-03-25 11:18:55 PDT
Comment on attachment 86958 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=86958&action=review

OK.

> Tools/ChangeLog:14
> +        (setDefaultsToConsistentStateValuesForTesting): Update the font sizes to reflect the new font size.

s/font size/DPI/

> Tools/DumpRenderTree/gtk/DumpRenderTree.cpp:141
> +                 "gtk-xft-dpi", 98304, // This is 96 * 1024 or 96 DPI according to the GTK+ docs.

wat.
Comment 5 Martin Robinson 2011-03-26 11:52:29 PDT
Committed r82033: <http://trac.webkit.org/changeset/82033>
Comment 6 WebKit Review Bot 2011-03-26 12:51:32 PDT
http://trac.webkit.org/changeset/82033 might have broken GTK Linux 32-bit Release
The following tests are not passing:
fast/forms/input-appearance-spinbutton-disabled-readonly.html
fast/forms/input-appearance-spinbutton-layer.html
fast/forms/input-appearance-spinbutton-visibility.html
fast/harness/override-preferences-2.html