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

Issue 888965 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 1
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Regression: Incorrect font-family applied to all cr-input instances

Reported by shruti.j...@etouch.net, Sep 25

Issue description

Chrome version: 71.0.3561.0 (Official Build) Revision 59edfd1d195efd57c937c950c1fd2a708a83f1f0-refs/branch-heads/3561@{#1}(32/64-bit)
OS : Windows (7, 8, 8.1 ,10)

What steps will reproduce the problem?
1.Launch chrome and Navigate to chrome://settings/fonts.
2.Set Minimum Font size to huge.
3.Under Addresses and More ,Click on Add Address.
4.In Name field type 'f' and observe.

Actual Result : Cursor overlaps with 'f' in Name field of Address section.
Expected Result : Cursor should be seen at proper place with respect to 'f' in Name field of Address section.

This is a regression issue broken in ‘M-71’ and below is the 'Chromium bisect' information:
Good Build : 71.0.3560.0 (Revision :593539)
Bad Build : 71.0.3561.0 (Revision :593801) 

Chromium bisect URL :
https://chromium.googlesource.com/chromium/src/+log/7c6bf828dee7af0643fe63f1d6b245148d6e78bd..6b9706d935f92b2e90824ca37c16b0fddb13e4df?pretty=fuller&n=10000

Suspect : r593775

@Yue Cen  : Could you please check whether this is caused with respect to your change, if not please help us in assigning it to the right owner.

Note : 
1. Tried to perform 'per-revision' bisect but it shows "We don't have enough builds to bisect" error message (tried on different machines but still got the same error.)
2. Hence providing suspect through 'Chromium bisect'.

Thank you..!
 
Expected_Result.mp4
658 KB View Download
Actual_Result.mp4
565 KB View Download
Cc: scottchen@chromium.org
Hey Scott, the changes in https://chromium-review.googlesource.com/c/chromium/src/+/1220373 somehow affect the font in other cr-inputs. And it is even more strange that the affected font doesn't become the one we specify in the mixin. Do you have any ideas why this happens?
Added screenshots.
Before_Changes.png
16.6 KB View Download
After_Changes.png
15.5 KB View Download
Can you post a screenshot of the devtools CSS inspector for the input that should not be affected? What is the font-family? 
Did more debugging on this one, the affected font in other cr-inputs ends up with a generated property as follows:

font-family: var(--cr-input-input_-_font-family,apply-shim-inherit);

It looks like "apply-shim-inherit" will use the browser default font.
Screenshot from 2018-09-26 15-45-34.png
107 KB View Download
Interesting. So firstly that means that the problem only happens with optimize_webui=true (which is the default value).

Secondly, this might be an issue with the polymer-css-build tool invoked in optimized pages. You can see the actual final code under

out/<out_folder>/gen/chrome/browser/resources/settings/vulcanized.html
Summary: Regression: Incorrect font-family applied to all cr-input instances (was: Regression: Cursor overlaps with 'f' in Name field of Address section.)
Renaming the bug as well, since this affects all inputs, and the problem is not the overlapping 'f', but the incorrect font.
Did some more testing:

If we remove "font-family: inherit;" inside #input, "apply-shim-inherit" won't be added into the final code (vulcanized.html).

Who do you think it's the best person to look into this issue? In the meantime, should we revert the change that uses the mixin so that at least not all the cr-inputs will be affected.
Briefly chatted with dfreedm@ from the polymer team. 'apply-shim-inherit' is not the appropriate fallback value for font-family. So this is something that could be fixed in polymer-css-bulid itself.

We can either wait for the fix, or a workaround is the following:

1) Don't use --cr-input-input mixin for setting the font-family.
2) In cr-input expose a dedicated CSS variable just for font-family, for example --cr-input-input-font-family
3) Use that CSS var from password_edit_dialog.html
Cc: dfreedm@chromium.org
This looks like a bug where the @apply library tries to handle mixins of the form `--foo: { color: inherit; };`. This mixin should generate `--foo_-_color: apply-shim-inherit`, which is an invalid value to force the `@apply --foo` to invalidate the property and naturally inherit the color value;

The replacement is done as a regexp over the whole string, but it is accidentally targeting fallback values for variables.

I'll have a fix out as soon as possible.
Cc: rsgingerrs@chromium.org
Owner: dfreedm@chromium.org
Thanks Daniel. I'll reassign this to you then.
Status: ExternalDependency (was: Assigned)
Cc: dpa...@chromium.org rbpotter@chromium.org
 Issue 890105  has been merged into this issue.
Expecting an updated polymer-css-build version sometime tomorrow, which should address the issue. If that's the case, I don't think we need to land a workaround.
Thanks for the update.
Owner: dpa...@chromium.org
Latest version of polymer-css-build has just been pushed to https://github.com/Polymer/polymer-css-build/commit/c32c64eff2cfb11790bc9a334541f501e4ef1c86. Will try it shortly and verify whether it fixes the issue.
Status: Started (was: ExternalDependency)
CL candidate at https://chromium-review.googlesource.com/c/chromium/src/+/1252379.
Project Member

Comment 19 by bugdroid1@chromium.org, Sep 29

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

commit f41e3e132eb8acf717d598db08858ca47312b1ca
Author: dpapad <dpapad@chromium.org>
Date: Sat Sep 29 00:59:53 2018

WebUI: Update polymer-css-build to version 0.3.3.

The previous version suffered from a bug that caused some properties defined in
CSS mixins to have improper fallback values.

Bug:  888965 
Change-Id: I56c39162bdd2d99ac9a3c370c0fbf22ad359c0b1
Reviewed-on: https://chromium-review.googlesource.com/1252379
Reviewed-by: Scott Chen <scottchen@chromium.org>
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595276}
[modify] https://crrev.com/f41e3e132eb8acf717d598db08858ca47312b1ca/third_party/node/node_modules.tar.gz.sha1
[modify] https://crrev.com/f41e3e132eb8acf717d598db08858ca47312b1ca/third_party/node/package.json

Labels: TE-Verified-M71 TE-Verified-71.0.3567.0
Update:

Rechecked the above issue using latest canary build #71.0.3567.0 on Windows (7, 8, 8.1 ,10) and issue is fixed.
Now,Cursor is seen at proper place with respect to 'f' in Name field of Address section.

Please find below attached screen cast

Thank You...
Canary_Behaviour#71.0.3567.0.mp4
571 KB View Download
Status: Fixed (was: Started)
Cc: phanindra.mandapaka@chromium.org
 Issue 889727  has been merged into this issue.

Sign in to add a comment