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

Issue 674663 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Default font-size of form controls are too small in DSF>1.0

Project Member Reported by danakj@chromium.org, Dec 15 2016

Issue description

Chrome Version: 55.0.2883.87
OS: Windows 10

What steps will reproduce the problem?
(1) Use DSF 2.5
(2) Go to publish page for chromium codereview, such as https://codereview.chromium.org/2163023002/publish
(3) Type in the message box

What is the expected result?

Font should be similar size to other fonts on the page.

What happens instead?

Font is very small. Note that the subject/reviewers/cc form fields are decent sized though.

FWIW This is the case on crbug.com too, and the font as I type here in the crbug description is also very small. As is the "Untriaged" in the Status field, tho that is *not* fixed size, same with the Owner field, etc.
 

Comment 1 by danakj@chromium.org, Dec 15 2016

small forms.png
399 KB View Download

Comment 2 by bsep@chromium.org, Dec 15 2016

Just to confirm, you are using 2.5 dsf natively, and not with the force-device-scale-factor flag, correct? The latter has some known issues with font sizes.

Comment 3 by danakj@chromium.org, Dec 15 2016

Correct.

Comment 4 by tkent@chromium.org, Dec 16 2016

Cc: bsep@chromium.org
 Issue 674666  has been merged into this issue.

Comment 5 by tkent@chromium.org, Dec 16 2016

DevTools says the computed font-size of the TEXTAREA is 12px.  However, if I added style="font-size:12px" to the TEXTAREA, the text gets bigger.

Comment 6 by tkent@chromium.org, Dec 16 2016

Components: Blink>Fonts
Owner: tkent@chromium.org
Status: WontFix (was: Untriaged)
> DevTools says the computed font-size of the TEXTAREA is 12px.

It seems this is a DevTool bug.  Please ignore it.

Actual font-size of the TEXTAREA is 9.33333px.  It's the default font-size of form controls, and it comes from [1].  2.5 DSF just made the difference from other text more visible.


[1] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/layout/LayoutThemeFontProviderWin.cpp?l=69

Comment 7 by tkent@chromium.org, Dec 16 2016

Summary: Default font-size of form controls are smaller (was: With 2.5 DSF in many form fields, the text is too small)

Comment 8 by danakj@chromium.org, Dec 16 2016

Should the default font size be px then, not pt? It's hard to even read and looks real bad.

Comment 9 by tkent@chromium.org, Dec 19 2016

Cc: tkent@chromium.org
Components: UI>HighDPI
Owner: ----
Status: Available (was: WontFix)
Summary: Default font-size of form controls are too small in DSF>1.0 (was: Default font-size of form controls are smaller)
Ah, right.

This is a bug of LayoutThemeFontProviderWin.cpp.  pointsToPixels() should not multiply a value by FontCache::deviceScaleFactor() because both of s_defaultFontSize and the resultant font size are DIP.

If s_defaultFontSize is 16, CSSValueWebkit*Control is now:
  13.333px in DSF=1.0
  12px in DSF=1.5
  10.666px in DSF=2.0
  9.333px in DSF=2.5

Comment 10 by tkent@chromium.org, Dec 20 2016

Owner: tkent@chromium.org
Status: Started (was: Available)
Project Member

Comment 11 by bugdroid1@chromium.org, Dec 20 2016

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

commit a5ade1a60231b618854923338a13c8a53f44ee95
Author: tkent <tkent@chromium.org>
Date: Tue Dec 20 06:09:14 2016

Windows: Fix the default font size for form controls in non-1.0 device scale factor.

The font size was too small in DSF>1.0 because pointsToPixels() unnecessarily
multiplied the value by device scale factor.  Font sizes in this code should be
treated as DIP size.

BUG= 674663 

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

[modify] https://crrev.com/a5ade1a60231b618854923338a13c8a53f44ee95/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/a5ade1a60231b618854923338a13c8a53f44ee95/third_party/WebKit/LayoutTests/platform/win/virtual/scalefactor150/fast/hidpi/static/calendar-picker-appearance-expected.png
[modify] https://crrev.com/a5ade1a60231b618854923338a13c8a53f44ee95/third_party/WebKit/LayoutTests/platform/win/virtual/scalefactor150/fast/hidpi/static/data-suggestion-picker-appearance-expected.png
[modify] https://crrev.com/a5ade1a60231b618854923338a13c8a53f44ee95/third_party/WebKit/LayoutTests/platform/win/virtual/scalefactor150/fast/hidpi/static/popup-menu-appearance-expected.png
[modify] https://crrev.com/a5ade1a60231b618854923338a13c8a53f44ee95/third_party/WebKit/LayoutTests/platform/win/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png
[modify] https://crrev.com/a5ade1a60231b618854923338a13c8a53f44ee95/third_party/WebKit/LayoutTests/platform/win/virtual/scalefactor200/fast/hidpi/static/data-suggestion-picker-appearance-expected.png
[modify] https://crrev.com/a5ade1a60231b618854923338a13c8a53f44ee95/third_party/WebKit/LayoutTests/platform/win/virtual/scalefactor200/fast/hidpi/static/popup-menu-appearance-expected.png
[modify] https://crrev.com/a5ade1a60231b618854923338a13c8a53f44ee95/third_party/WebKit/LayoutTests/platform/win/virtual/scalefactor200withzoom/fast/hidpi/static/calendar-picker-appearance-expected.png
[modify] https://crrev.com/a5ade1a60231b618854923338a13c8a53f44ee95/third_party/WebKit/LayoutTests/platform/win/virtual/scalefactor200withzoom/fast/hidpi/static/data-suggestion-picker-appearance-expected.png
[modify] https://crrev.com/a5ade1a60231b618854923338a13c8a53f44ee95/third_party/WebKit/LayoutTests/platform/win/virtual/scalefactor200withzoom/fast/hidpi/static/popup-menu-appearance-expected.png
[modify] https://crrev.com/a5ade1a60231b618854923338a13c8a53f44ee95/third_party/WebKit/Source/core/layout/LayoutThemeFontProviderWin.cpp

Comment 12 by tkent@chromium.org, Dec 20 2016

Status: Fixed (was: Started)
Project Member

Comment 13 by bugdroid1@chromium.org, Dec 21 2016

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

commit 18dfb72352bb30a345f97bfe9fe9109dceebb539
Author: Rebaseline Bot <blink-rebaseline-bot@chromium.org>
Date: Wed Dec 21 06:15:44 2016

Auto-rebaseline for r439724

https://chromium.googlesource.com/chromium/src/+/a5ade1a60231b

BUG= 674663 
TBR=tkent@chromium.org

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

[modify] https://crrev.com/18dfb72352bb30a345f97bfe9fe9109dceebb539/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/18dfb72352bb30a345f97bfe9fe9109dceebb539/third_party/WebKit/LayoutTests/platform/win/virtual/scalefactor150/fast/hidpi/static/data-suggestion-picker-appearance-expected.png
[modify] https://crrev.com/18dfb72352bb30a345f97bfe9fe9109dceebb539/third_party/WebKit/LayoutTests/platform/win/virtual/scalefactor200/fast/hidpi/static/data-suggestion-picker-appearance-expected.png
[modify] https://crrev.com/18dfb72352bb30a345f97bfe9fe9109dceebb539/third_party/WebKit/LayoutTests/platform/win/virtual/scalefactor200withzoom/fast/hidpi/static/data-suggestion-picker-appearance-expected.png
[modify] https://crrev.com/18dfb72352bb30a345f97bfe9fe9109dceebb539/third_party/WebKit/LayoutTests/platform/win7/virtual/scalefactor150/fast/hidpi/static/calendar-picker-appearance-expected.png
[modify] https://crrev.com/18dfb72352bb30a345f97bfe9fe9109dceebb539/third_party/WebKit/LayoutTests/platform/win7/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png
[modify] https://crrev.com/18dfb72352bb30a345f97bfe9fe9109dceebb539/third_party/WebKit/LayoutTests/platform/win7/virtual/scalefactor200withzoom/fast/hidpi/static/calendar-picker-appearance-expected.png

Comment 14 by tkent@chromium.org, Dec 26 2016

Labels: Merge-Request-56
Verified with the latest canary.

Comment 15 by dimu@chromium.org, Dec 26 2016

Labels: -Merge-Request-56 Merge-Approved-56 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M56 (branch: 2924)
Project Member

Comment 16 by bugdroid1@chromium.org, Dec 26 2016

Labels: -merge-approved-56 merge-merged-2924
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/37448de2b9d69cd1286135bfaf0c3ac494d4f314

commit 37448de2b9d69cd1286135bfaf0c3ac494d4f314
Author: Kent Tamura <tkent@chromium.org>
Date: Mon Dec 26 00:32:19 2016

Merge "Windows: Fix the default font size for form controls in non-1.0 device scale factor." to M56

The font size was too small in DSF>1.0 because pointsToPixels() unnecessarily
multiplied the value by device scale factor.  Font sizes in this code should be
treated as DIP size.

BUG= 674663 

Review-Url: https://codereview.chromium.org/2587283002
Cr-Commit-Position: refs/heads/master@{#439724}
(cherry picked from commit a5ade1a60231b618854923338a13c8a53f44ee95)

Review-Url: https://codereview.chromium.org/2600853002 .
Cr-Commit-Position: refs/branch-heads/2924@{#616}
Cr-Branched-From: 3a87aecc31cd1ffe751dd72c04e5a96a1fc8108a-refs/heads/master@{#433059}

[modify] https://crrev.com/37448de2b9d69cd1286135bfaf0c3ac494d4f314/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/37448de2b9d69cd1286135bfaf0c3ac494d4f314/third_party/WebKit/Source/core/layout/LayoutThemeFontProviderWin.cpp

Cc: tkonch...@chromium.org
Labels: TE-Verified-56.0.2924.51 TE-Verified-M56
Tested the same on win10 with devicepixelratio 2.5 using chrome version 56.0.2924.51 - font looks similar to other font on the page.

Please find the screenshot

Fix works as expected
674663.png
258 KB View Download

Sign in to add a comment