[Merge to M59] Fix DPI scaling on Linux with GTK3

> The device scale was determined by querying the value of the
> "gtk-xft-dpi" property from GtkSettings. In GTK2, this always returned
> the value of the "Xft/DPI" XSettings property. However, in GTK3, this
> returns the value of "Gdk/UnscaledDPI" if it is set, resulting in the
> wrong device scale being calculated on high DPI screens.
>
> Instead, we now query the "gdk-window-scaling-factor" setting from
> GdkScreen, which is derived from the value of the
> "Gdk/WindowScalingFactor" XSettings property. If this property is not
> set then we fall back to the previous code path, as environments that
> don't provide Gdk/WindowScalingFactor also won't provide
> Gdk/UnscaledDPI.
>
> BUG=716135
> TBR=erg@chromium.org
>
> patch from issue 2852593002 at patchset 20001 (http://crrev.com/2852593002#ps20001)
>
> Review-Url: https://codereview.chromium.org/2869763004
> Cr-Commit-Position: refs/heads/master@{#470142}

BUG=716135
TBR=erg@chromium.org
NOTRY=true
NOPRESUBMIT=true

Review-Url: https://codereview.chromium.org/2865253004
Cr-Commit-Position: refs/branch-heads/3071@{#481}
Cr-Branched-From: a106f0abbf69dad349d4aaf4bcc4f5d376dd2377-refs/heads/master@{#464641}
1 file changed