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

Issue 668472 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Regression:Unnecessary space is seen between text and 'Discard' button on download shelf.

Reported by dmascare...@etouch.net, Nov 24 2016

Issue description

Chrome Version:57.0.2929.3 (Official Build)3619fbd7f57a1d171fac4d4adedde499f17eec95-refs/branch-heads/2929@{#3} 32/64-bit.
OS:Windows (7,8,10)

What steps will reproduce the problem?
1. Launch chrome and navigate to http://parkerly.com/sb-tests/downloads/downloads.html
2. Click on 'badfile.exe -> somefile.exe' link and observe at download shelf.

Actual:Unnecessary space is seen between text and 'Discard' button on download shelf.
Expected:Space between text and 'Discard' button should be proper on download shelf. 

This is regression issue, broken in 'M 56' and below manual bisect info:

Good build:56.0.2900.0
Bad build:56.0.2902.0

Note: Issue is not seen on Mac and Linux OS.

 
danger.png
11.3 KB View Download
Cc: kkaluri@chromium.org
Labels: hasbisect-per-revision
Owner: jialiul@chromium.org
Status: Assigned (was: Unconfirmed)
Bisect Info:
===========

Good build : 56.0.2900.0,  Revision Range 	427219
Bad build  : 56.0.2902.0,  Revision Range 	427892

After executing the per-revision-bisect script, i got the following CL's between good and bad build versions
===========================================
https://chromium.googlesource.com/chromium/src/+log/f06c029695e6d3a62ea950c1ba0f60cf01c353a8..ab5c4fa44e1a46c0749b4f1f9c65688fce045137

The suspecting Change Log is :
-----------
https://chromium.googlesource.com/chromium/src/+/ab5c4fa44e1a46c0749b4f1f9c65688fce045137

From the above CL suspecting the below change
---------------------------
https://codereview.chromium.org/2443343002


jialiul@- Could you please look into this issue, if it's related to your change?  if not could you please help us to reassign this issue to the right owner.

Cc: jialiul@chromium.org
Owner: ----
Status: Available (was: Assigned)
My CL only changed warning strings, should not impact download waning layout. Could you assign it to an UI expert to take a look?
Just to update, still able to reproduce the issue on windows 7 using chrome version 57.0.2939.0 
Owner: jialiul@chromium.org
Status: Assigned (was: Available)
I took another look, it seems my CL triggered this regression, but not caused it. 
The true reason is  SizeLabelToMinWidth() function in download_item_view.cc (which hasn't been touched since 2013) seems not working probably with the new string (on Windows).

I'll try to fix this function in this week. 
Components: UI>Browser>SafeBrowsing
Project Member

Comment 6 by bugdroid1@chromium.org, Dec 9 2016

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

commit 047611df69b7f337f96d4ce684d21cb69baeb0b8
Author: jialiul <jialiul@chromium.org>
Date: Fri Dec 09 16:51:55 2016

Fix SizeLabelToMinWidth() function such that no unnecessary space
between warning label and Discard button on download shelf.

Note, this bug has been there for more than 3 years. The string
change in crrev.com/2443343002 exposed this issue. The reason this bug
was only reproducible on Win is because Win's font is narrower than
other OSs' (a.k.a label with the same text on Win yields a smaller width)

BUG= 668472 

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

[modify] https://crrev.com/047611df69b7f337f96d4ce684d21cb69baeb0b8/chrome/browser/ui/views/download/download_item_view.cc
[modify] https://crrev.com/047611df69b7f337f96d4ce684d21cb69baeb0b8/chrome/browser/ui/views/download/download_item_view.h
[add] https://crrev.com/047611df69b7f337f96d4ce684d21cb69baeb0b8/chrome/browser/ui/views/download/download_item_view_unittest.cc
[modify] https://crrev.com/047611df69b7f337f96d4ce684d21cb69baeb0b8/chrome/test/BUILD.gn

Labels: Merge-Request-56
Status: Fixed (was: Assigned)

Comment 8 by dimu@chromium.org, Dec 10 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 9 by bugdroid1@chromium.org, Dec 10 2016

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

commit fdc8672287946320d9547ddbc9bc29d721e30459
Author: Jialiu Lin <jialiul@chromium.org>
Date: Sat Dec 10 18:58:25 2016

Fix SizeLabelToMinWidth() function such that no unnecessary space between warning label and Discard button on download shelf.

Note, this bug has been there for more than 3 years. The string
change in crrev.com/2443343002 exposed this issue. The reason this bug
was only reproducible on Win is because Win's font is narrower than
other OSs' (a.k.a label with the same text on Win yields a smaller width)

BUG= 668472 

Review-Url: https://codereview.chromium.org/2556573002
Cr-Commit-Position: refs/heads/master@{#437563}
(cherry picked from commit 047611df69b7f337f96d4ce684d21cb69baeb0b8)

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

[modify] https://crrev.com/fdc8672287946320d9547ddbc9bc29d721e30459/chrome/browser/ui/views/download/download_item_view.cc
[modify] https://crrev.com/fdc8672287946320d9547ddbc9bc29d721e30459/chrome/browser/ui/views/download/download_item_view.h
[add] https://crrev.com/fdc8672287946320d9547ddbc9bc29d721e30459/chrome/browser/ui/views/download/download_item_view_unittest.cc
[modify] https://crrev.com/fdc8672287946320d9547ddbc9bc29d721e30459/chrome/test/BUILD.gn

Labels: TE-Verified-56.0.2924.28 TE-Verified-M56
Verified the issue on windows 10 using chrome beta version #56.0.2924.28 as per comment #0

Observed that space between text and 'Discard' button was proper on download shelf. Hence, the fix is working as expected.

Attaching screenshot for reference.

Hence, adding the verified labels.

Thanks...!!

668472.jpg
12.2 KB View Download

Sign in to add a comment