New issue
Advanced search Search tips

Issue 697407 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug

Blocking:
issue 454835



Sign in to add a comment

Mac: Eliding issue in Downloads bar with chrome://flags/#enable-harfbuzz-rendertext enabled

Project Member Reported by tapted@chromium.org, Mar 1 2017

Issue description

Chrome Version       : 56.0.2924.87
and Version 58.0.3026.3 canary
OS Version: OS X 10.12.3


What steps will reproduce the problem?
1. Download something whose filename gets elided
2. Observe the elided filename in the downloads bar

What is the expected result?

Text fits in downloads bar with the correct padding


What happens instead of that?

Doesn't - see attached. For the samples below it's clearly wrong in m56 - but that might just be the confluence of window width text strings involved.

UserAgentString: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36

 
expected-canary.png
25.0 KB View Download
actual-canary.png
24.6 KB View Download
actual-m56.png
15.6 KB View Download
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 10 2018

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

commit 15bd76a4f4ac3109352c1f4745e2f1541cc142f3
Author: Trent Apted <tapted@chromium.org>
Date: Wed Jan 10 01:44:08 2018

Allow Mac UI to gfx::ElideFilename() with the correct typesetter.

On Mac, Secondary UI can be typeset differently to Browser UI,
since one is drawn by Views and the other by Cocoa. This can
influence things like text width in subtle ways. On Mac,
gfx::Elide methods need to be aware of how the text will eventually
be typeset.

This CL adds enum class gfx::Typesetter, which can be fed through
to gfx:: methods used for eliding text or determining its width.

For the first step, update callers of gfx::ElideFilename to use the
correct typesetter.

Bug:  798927 ,  697407 
Change-Id: I7eea58391475a68fefc469e7b87729664087777d
Reviewed-on: https://chromium-review.googlesource.com/848695
Reviewed-by: Michael Wasserman <msw@chromium.org>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Commit-Queue: Trent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528199}
[modify] https://crrev.com/15bd76a4f4ac3109352c1f4745e2f1541cc142f3/chrome/browser/download/download_item_model.cc
[modify] https://crrev.com/15bd76a4f4ac3109352c1f4745e2f1541cc142f3/chrome/browser/ui/cocoa/download/download_item_cell.mm
[modify] https://crrev.com/15bd76a4f4ac3109352c1f4745e2f1541cc142f3/chrome/browser/ui/cocoa/download/md_download_item_view.mm
[modify] https://crrev.com/15bd76a4f4ac3109352c1f4745e2f1541cc142f3/ui/gfx/canvas.cc
[modify] https://crrev.com/15bd76a4f4ac3109352c1f4745e2f1541cc142f3/ui/gfx/canvas.h
[modify] https://crrev.com/15bd76a4f4ac3109352c1f4745e2f1541cc142f3/ui/gfx/canvas_notimplemented.cc
[modify] https://crrev.com/15bd76a4f4ac3109352c1f4745e2f1541cc142f3/ui/gfx/canvas_skia.cc
[modify] https://crrev.com/15bd76a4f4ac3109352c1f4745e2f1541cc142f3/ui/gfx/render_text.cc
[modify] https://crrev.com/15bd76a4f4ac3109352c1f4745e2f1541cc142f3/ui/gfx/render_text.h
[modify] https://crrev.com/15bd76a4f4ac3109352c1f4745e2f1541cc142f3/ui/gfx/text_constants.h
[modify] https://crrev.com/15bd76a4f4ac3109352c1f4745e2f1541cc142f3/ui/gfx/text_elider.cc
[modify] https://crrev.com/15bd76a4f4ac3109352c1f4745e2f1541cc142f3/ui/gfx/text_elider.h
[modify] https://crrev.com/15bd76a4f4ac3109352c1f4745e2f1541cc142f3/ui/gfx/text_elider_unittest.cc
[modify] https://crrev.com/15bd76a4f4ac3109352c1f4745e2f1541cc142f3/ui/gfx/text_utils.h
[modify] https://crrev.com/15bd76a4f4ac3109352c1f4745e2f1541cc142f3/ui/gfx/text_utils_android.cc
[modify] https://crrev.com/15bd76a4f4ac3109352c1f4745e2f1541cc142f3/ui/gfx/text_utils_ios.mm
[modify] https://crrev.com/15bd76a4f4ac3109352c1f4745e2f1541cc142f3/ui/gfx/text_utils_skia.cc

Comment 2 by tapted@chromium.org, Jan 17 2018

Status: Fixed (was: Available)

Sign in to add a comment