Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(330)

Issue 911303002: Fix text wrapping problem in the download_item_controller on Yosemite. (Closed)

Created:
5 years, 10 months ago by shrike
Modified:
5 years, 9 months ago
Reviewers:
asanka, Nico
CC:
benjhayden+dwatch_chromium.org, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix text wrapping problem in the download_item_controller on Yosemite. The code in [DownloadItemController showDangerousWarning:] calls [GTMUILocalizerAndLayoutTweaker sizeToFitFixedHeightTextField:minWidth:] to wrap the warning string within the DownloadItemController's dangerousDownloadLabel_ textField. Within the nib this textField is 22 points tall and holds two lines of text. Under Yosemite, however, the font metrics have changed and the two lines are now 24 points tall. This cl insets the dangerousDownloadLabel_'s frame height by -2 points when running on Yosemite. dangerousDownloadLabel_ is not as tall as its superview, so the new frame still fits comfortably within the superview's frame. BUG=454782 TEST=Follow instructions in bug 454782 and confirm that text is wrapping properly on Yosemite. Committed: https://crrev.com/4ba4f927840199e4b84a530b43ad2de7402e157c Cr-Commit-Position: refs/heads/master@{#318927}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Swapped in IsOSYosemiteOrLater() for IsOSYosemite() #

Patch Set 3 : Changed how compute textfield resize delta #

Total comments: 6

Patch Set 4 : Simplified code to compute required field height #

Patch Set 5 : Resize download item textfield in xib rather than in code #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M chrome/app/nibs/DownloadItem.xib View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 35 (5 generated)
shrike
This is the simplest approach I could think of to address the issue, but please ...
5 years, 10 months ago (2015-02-11 00:14:27 UTC) #2
Nico
https://codereview.chromium.org/911303002/diff/1/chrome/browser/ui/cocoa/download/download_item_controller.mm File chrome/browser/ui/cocoa/download/download_item_controller.mm (right): https://codereview.chromium.org/911303002/diff/1/chrome/browser/ui/cocoa/download/download_item_controller.mm#newcode137 chrome/browser/ui/cocoa/download/download_item_controller.mm:137: if (base::mac::IsOSYosemite()) { IsOSYosemiteOrLater() probably?
5 years, 10 months ago (2015-02-11 03:45:54 UTC) #4
shrike
PTAL https://codereview.chromium.org/911303002/diff/1/chrome/browser/ui/cocoa/download/download_item_controller.mm File chrome/browser/ui/cocoa/download/download_item_controller.mm (right): https://codereview.chromium.org/911303002/diff/1/chrome/browser/ui/cocoa/download/download_item_controller.mm#newcode137 chrome/browser/ui/cocoa/download/download_item_controller.mm:137: if (base::mac::IsOSYosemite()) { On 2015/02/11 03:45:53, Nico wrote: ...
5 years, 10 months ago (2015-02-11 16:45:35 UTC) #5
Nico
lgtm, I can't think of anything better either. Can't think of a good way to ...
5 years, 10 months ago (2015-02-11 19:27:37 UTC) #6
shrike
Hello asanka, thakis added you as a reviewer - do you have any comments on ...
5 years, 10 months ago (2015-02-20 17:09:39 UTC) #7
Nico
I think you can land this. I added asanka more as an fyi for him.
5 years, 10 months ago (2015-02-20 21:06:38 UTC) #8
asanka
On 2015/02/20 at 21:06:38, thakis wrote: > I think you can land this. I added ...
5 years, 10 months ago (2015-02-20 21:19:16 UTC) #9
shrike
On 2015/02/20 21:19:16, asanka wrote: > On 2015/02/20 at 21:06:38, thakis wrote: > > I ...
5 years, 10 months ago (2015-02-21 00:56:36 UTC) #11
asanka
Assuming thakis is okay with the general direction of the CL. https://codereview.chromium.org/911303002/diff/40001/chrome/browser/ui/cocoa/download/download_item_controller.mm File chrome/browser/ui/cocoa/download/download_item_controller.mm (right): ...
5 years, 10 months ago (2015-02-21 02:14:54 UTC) #12
Nico
I'll hand this off to asanka. Computing is fine with me too. (I'd do the ...
5 years, 10 months ago (2015-02-21 23:22:51 UTC) #13
shrike
PTAL https://codereview.chromium.org/911303002/diff/40001/chrome/browser/ui/cocoa/download/download_item_controller.mm File chrome/browser/ui/cocoa/download/download_item_controller.mm (right): https://codereview.chromium.org/911303002/diff/40001/chrome/browser/ui/cocoa/download/download_item_controller.mm#newcode140 chrome/browser/ui/cocoa/download/download_item_controller.mm:140: // after the computation (except for, of course, ...
5 years, 10 months ago (2015-02-23 20:12:14 UTC) #14
asanka
https://codereview.chromium.org/911303002/diff/40001/chrome/browser/ui/cocoa/download/download_item_controller.mm File chrome/browser/ui/cocoa/download/download_item_controller.mm (right): https://codereview.chromium.org/911303002/diff/40001/chrome/browser/ui/cocoa/download/download_item_controller.mm#newcode145 chrome/browser/ui/cocoa/download/download_item_controller.mm:145: [dangerousDownloadLabel_ setStringValue:@"Two lines\nof text"]; On 2015/02/23 at 20:12:14, shrike ...
5 years, 10 months ago (2015-02-24 03:16:13 UTC) #15
shrike
On 2015/02/24 03:16:13, asanka wrote: > showDangerousWarning is called at most once per download. It's ...
5 years, 10 months ago (2015-02-24 16:52:07 UTC) #16
shrike
On 2015/02/24 16:52:07, shrike wrote: > It would be simpler to make the textfield a ...
5 years, 10 months ago (2015-02-25 17:16:36 UTC) #17
asanka
On 2015/02/25 at 17:16:36, shrike wrote: > On 2015/02/24 16:52:07, shrike wrote: > > It ...
5 years, 10 months ago (2015-02-25 17:26:47 UTC) #18
asanka
On 2015/02/25 at 17:26:47, asanka wrote: > On 2015/02/25 at 17:16:36, shrike wrote: > > ...
5 years, 10 months ago (2015-02-25 17:27:27 UTC) #19
Nico
On 2015/02/25 17:27:27, asanka wrote: > On 2015/02/25 at 17:26:47, asanka wrote: > > On ...
5 years, 10 months ago (2015-02-25 19:41:55 UTC) #20
shrike
On 2015/02/25 19:41:55, Nico wrote: > On 2015/02/25 17:27:27, asanka wrote: > okay. If it ...
5 years, 9 months ago (2015-02-27 20:05:11 UTC) #21
asanka
On 2015/02/27 at 20:05:11, shrike wrote: > On 2015/02/25 19:41:55, Nico wrote: > > On ...
5 years, 9 months ago (2015-02-27 22:50:29 UTC) #22
asanka
On 2015/02/27 at 22:50:29, asanka wrote: > On 2015/02/27 at 20:05:11, shrike wrote: > > ...
5 years, 9 months ago (2015-02-27 22:54:50 UTC) #23
shrike
On 2015/02/27 22:54:50, asanka wrote: > > You can look at json.output of the "isolate ...
5 years, 9 months ago (2015-02-27 23:04:39 UTC) #24
asanka
On 2015/02/27 at 23:04:39, shrike wrote: > On 2015/02/27 22:54:50, asanka wrote: > > > ...
5 years, 9 months ago (2015-02-27 23:23:24 UTC) #25
shrike
On 2015/02/27 23:23:24, asanka wrote: > > Thank you! Next problem is it says it ...
5 years, 9 months ago (2015-03-02 17:40:51 UTC) #26
shrike
On 2015/03/02 17:40:51, shrike wrote: > Thank you - that worked. Remaining problem is I ...
5 years, 9 months ago (2015-03-02 21:54:24 UTC) #27
asanka
On 2015/03/02 21:54:24, shrike wrote: > On 2015/03/02 17:40:51, shrike wrote: > > Thank you ...
5 years, 9 months ago (2015-03-03 18:05:29 UTC) #28
asanka
On 2015/03/03 18:05:29, asanka wrote: > On 2015/03/02 21:54:24, shrike wrote: > > On 2015/03/02 ...
5 years, 9 months ago (2015-03-03 18:06:03 UTC) #29
shrike
On 2015/03/03 18:06:03, asanka wrote: > > * Search Google for "filetype:swf". SWF is a ...
5 years, 9 months ago (2015-03-03 18:48:23 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/911303002/80001
5 years, 9 months ago (2015-03-03 18:49:38 UTC) #33
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 9 months ago (2015-03-03 19:25:19 UTC) #34
commit-bot: I haz the power
5 years, 9 months ago (2015-03-03 19:26:12 UTC) #35
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/4ba4f927840199e4b84a530b43ad2de7402e157c
Cr-Commit-Position: refs/heads/master@{#318927}

Powered by Google App Engine
This is Rietveld 408576698