Default font-size of form controls are too small in DSF>1.0 |
||||||||||
Issue descriptionChrome 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.
,
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.
,
Dec 15 2016
Correct.
,
Dec 16 2016
,
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.
,
Dec 16 2016
> 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
,
Dec 16 2016
,
Dec 16 2016
Should the default font size be px then, not pt? It's hard to even read and looks real bad.
,
Dec 19 2016
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
,
Dec 20 2016
,
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
,
Dec 20 2016
,
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
,
Dec 26 2016
Verified with the latest canary.
,
Dec 26 2016
Your change meets the bar and is auto-approved for M56 (branch: 2924)
,
Dec 26 2016
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
,
Jan 4 2017
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 |
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by danakj@chromium.org
, Dec 15 2016399 KB
399 KB View Download