New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 723931 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Bug-Regression



Sign in to add a comment

HiDPI scaling no longer considers font scaling

Reported by cole.mic...@gmail.com, May 18 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3095.5 Safari/537.36

Steps to reproduce the problem:
1. Install Chrome stable
2. Install Chrome dev
3. Be on a HiDPI GNOME setup
4. Notice that Chrome dev is "too big".

What is the expected behavior?
Chrome properly respects the font scaling and scales down the UI accordingly.

What went wrong?
It didn't.

Did this work before? Yes Chrome 58

Chrome version: 60.0.3095.5  Channel: n/a
OS Version: 
Flash Version: Shockwave Flash 26.0 r0
 
dev-vs-stable.png
240 KB View Download
tweak-fonts.png
324 KB View Download
tweak-window.png
352 KB View Download
Note the page zoom was confirmed to be at 100% in both Chrome dev and Chrome stable in the attached screenshot(s).
Cc: thomasanderson@chromium.org osh...@chromium.org
Labels: Needs-Triage-M58 Needs-Bisect

Comment 4 by hdodda@chromium.org, May 19 2017

Cc: hdodda@chromium.org
Labels: Needs-Feedback
Tested the issue on ubuntu 14.04 carbon X1 using chrome M58 #58.0.3029.110 and M60 #60.0.3103.0 and issue is reproduced with the following steps :

1. Had set the machine dpi to 2 and page zoom is 100 % .
2. Installed chrome dev M60 #60.0.3100.0 and chrome stabel m58 #58.0.3029.110 
3. Compared both chrome stable and dev and didn't observe any difference.

@cole.mickens-- Could you please check steps and attached screenshot and confirm us if we had missed any steps in reprodcing the issue .

Thanks!
723931.png
275 KB View Download
Yes, this is missing repro steps.

You need to use gnome-tweak-tool to change the font scaling to 75%. See my attached screenshots.
Project Member

Comment 6 by sheriffbot@chromium.org, May 19 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "hdodda@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 7 by hdodda@chromium.org, May 22 2017

Labels: Needs-Feedback
Tested the issue on ubuntu 14.04 using chrome M58 #58.0.3029.110 , using the tweak tool , tried changing the fonts scaling and unable to find the option of chnaging window scaling in windows.

Attached screencast for reference.

@cole.mickens-- Could you please check attached screencast and confirm us if we had to enable any other settings to find window scaling options.

Thanks!
I don't know what else to say. It's trivial to repro this. I've given the exact steps and provided screenshots of the settings that are necessary to trigger the repro.

It may be necessary to use a distro that is not 3 years old.
This is being reported by another person as well: https://bugs.chromium.org/p/chromium/issues/detail?id=716135#c26
Project Member

Comment 10 by sheriffbot@chromium.org, May 22 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "hdodda@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: e...@chromium.org
Labels: -Pri-2 Pri-1
Owner: thomasanderson@chromium.org
Status: Assigned (was: Unconfirmed)
Cc: chris.co...@canonical.com
Project Member

Comment 13 by bugdroid1@chromium.org, May 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/40910b90874699376e21625f26e580ff42541b1d

commit 40910b90874699376e21625f26e580ff42541b1d
Author: thomasanderson <thomasanderson@chromium.org>
Date: Tue May 23 17:45:47 2017

Gtk: Consider font dpi when calculating device scale factor

Gtk2 did not have a global window scaling setting (so the only way to
scale up widgets was with a custom theme).  However, it did allow font
scaling with gdk-xft-dpi (backed by XSetting Xft/DPI).

Gtk3 adds (non-fractional) global window scaling with
gdk-window-scaling-factor (XSetting Gdk/WindowScalingFactor).  To
ensure that fonts were not scaled up twice (once from
gdk-window-scaling-factor and once from gdk-xft-dpi), a new setting
was added in [1] that overrides gdk-xft-dpi: gdk-unscaled-dpi
(XSetting Gdk/UnscaledDPI).  gdk-xft-dpi was kept around for
compatibility with apps like Chromium that still need it.

When modifying these settings, an invariant should be maintained:
gdk-xft-dpi = gtk-window-scaling-factor * gdk-unscaled-dpi.  Chromium
should have been able to keep using gdk-xft-dpi, but this invariant is
violated when changing the settings using gnome-tweak-tool, where I
have gdk-window-scaling-factor = 2, gdk-unscaled-dpi = 98304, and
gdk-xft-dpi = 98304 (gdk-xft-dpi should be 196608).

[2] changed Gtk builds to use the window scaling factor, which is
incorrect because it did not consider font scaling, making fractional
scaling impossible.

This CL takes gdk-unscaled-dpi into the calculation as well, and
continues to fallback on using gdk-xft-dpi if the other variables are
unavailable, which can happen on Gtk2.

[1] https://git.gnome.org/browse/gtk+/commit/?id=4b9c08f48d6f5be43b0795d3eee462d60b5f9e1f
[2] https://codereview.chromium.org/2869763004

BUG= 723931 
R=erg@chromium.org,chris.coulson@canonical.com
CC=oshima@chromium.org

Review-Url: https://codereview.chromium.org/2899943002
Cr-Commit-Position: refs/heads/master@{#473966}

[modify] https://crrev.com/40910b90874699376e21625f26e580ff42541b1d/chrome/browser/ui/libgtkui/gtk_ui.cc

Project Member

Comment 14 by bugdroid1@chromium.org, May 23 2017

Labels: merge-merged-3071
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5afa8d4f6e8ed276821ecaa4ec62b501e90d8d37

commit 5afa8d4f6e8ed276821ecaa4ec62b501e90d8d37
Author: thomasanderson <thomasanderson@chromium.org>
Date: Tue May 23 18:15:35 2017

Gtk: Consider font dpi when calculating device scale factor

> Gtk2 did not have a global window scaling setting (so the only way to
> scale up widgets was with a custom theme).  However, it did allow font
> scaling with gdk-xft-dpi (backed by XSetting Xft/DPI).
>
> Gtk3 adds (non-fractional) global window scaling with
> gdk-window-scaling-factor (XSetting Gdk/WindowScalingFactor).  To
> ensure that fonts were not scaled up twice (once from
> gdk-window-scaling-factor and once from gdk-xft-dpi), a new setting
> was added in [1] that overrides gdk-xft-dpi: gdk-unscaled-dpi
> (XSetting Gdk/UnscaledDPI).  gdk-xft-dpi was kept around for
> compatibility with apps like Chromium that still need it.
>
> When modifying these settings, an invariant should be maintained:
> gdk-xft-dpi = gtk-window-scaling-factor * gdk-unscaled-dpi.  Chromium
> should have been able to keep using gdk-xft-dpi, but this invariant is
> violated when changing the settings using gnome-tweak-tool, where I
> have gdk-window-scaling-factor = 2, gdk-unscaled-dpi = 98304, and
> gdk-xft-dpi = 98304 (gdk-xft-dpi should be 196608).
>
> [2] changed Gtk builds to use the window scaling factor, which is
> incorrect because it did not consider font scaling, making fractional
> scaling impossible.
>
> This CL takes gdk-unscaled-dpi into the calculation as well, and
> continues to fallback on using gdk-xft-dpi if the other variables are
> unavailable, which can happen on Gtk2.
>
> [1] https://git.gnome.org/browse/gtk+/commit/?id=4b9c08f48d6f5be43b0795d3eee462d60b5f9e1f
> [2] https://codereview.chromium.org/2869763004
>
> BUG= 723931 
> R=erg@chromium.org,chris.coulson@canonical.com
> CC=oshima@chromium.org
>
> Review-Url: https://codereview.chromium.org/2899943002
> Cr-Commit-Position: refs/heads/master@{#473966}

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

Review-Url: https://codereview.chromium.org/2900133002
Cr-Commit-Position: refs/branch-heads/3071@{#674}
Cr-Branched-From: a106f0abbf69dad349d4aaf4bcc4f5d376dd2377-refs/heads/master@{#464641}

[modify] https://crrev.com/5afa8d4f6e8ed276821ecaa4ec62b501e90d8d37/chrome/browser/ui/libgtkui/gtk_ui.cc

Labels: -Needs-Bisect -Needs-Triage-M58
Status: Fixed (was: Assigned)
Should be fixed now.  If any users still see the issue in the next beta release, please comment here and I will reopen this issue.

Sign in to add a comment