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

Issue 3437002: Make status bubble expand on Mac to fit URLs longer than the standard width.... (Closed)

Created:
10 years, 3 months ago by Miranda Callahan
Modified:
9 years, 7 months ago
Reviewers:
Nico
CC:
chromium-reviews, pam+watch_chromium.org, ben+cc_chromium.org
Visibility:
Public.

Description

Make status bubble expand on Mac to fit URLs longer than the standard width. BUG=43193, 55770 TEST=status bubble resizes on Mac to fit URLs longer than standard bubble size. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=59832

Patch Set 1 : '' #

Total comments: 5

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 15

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+192 lines, -9 lines) Patch
M chrome/browser/cocoa/status_bubble_mac.h View 1 2 3 4 chunks +25 lines, -2 lines 0 comments Download
M chrome/browser/cocoa/status_bubble_mac.mm View 1 2 3 10 chunks +117 lines, -7 lines 0 comments Download
M chrome/browser/cocoa/status_bubble_mac_unittest.mm View 1 chunk +50 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Nico
General comment: Please be explicit which of your numbers are in view coordinate space and ...
10 years, 3 months ago (2010-09-15 22:08:44 UTC) #1
Miranda Callahan
On 2010/09/15 22:08:44, Nico wrote: > General comment: Please be explicit which of your numbers ...
10 years, 3 months ago (2010-09-15 22:35:52 UTC) #2
Miranda Callahan
http://codereview.chromium.org/3437002/diff/11002/12002 File chrome/browser/cocoa/status_bubble_mac.mm (right): http://codereview.chromium.org/3437002/diff/11002/12002#newcode595 chrome/browser/cocoa/status_bubble_mac.mm:595: int max_bubble_width = window_frame.size.width; On 2010/09/15 22:08:44, Nico wrote: ...
10 years, 3 months ago (2010-09-15 22:36:00 UTC) #3
Nico
On 2010/09/15 22:35:52, Miranda Callahan wrote: > On 2010/09/15 22:08:44, Nico wrote: > > General ...
10 years, 3 months ago (2010-09-15 22:49:38 UTC) #4
Nico
http://codereview.chromium.org/3437002/diff/11002/12002 File chrome/browser/cocoa/status_bubble_mac.mm (right): http://codereview.chromium.org/3437002/diff/11002/12002#newcode595 chrome/browser/cocoa/status_bubble_mac.mm:595: int max_bubble_width = window_frame.size.width; On 2010/09/15 22:36:00, Miranda Callahan ...
10 years, 3 months ago (2010-09-15 22:49:45 UTC) #5
Miranda Callahan
On 2010/09/15 22:49:38, Nico wrote: > On 2010/09/15 22:35:52, Miranda Callahan wrote: > > On ...
10 years, 3 months ago (2010-09-17 00:53:24 UTC) #6
Nico
LG with comments http://codereview.chromium.org/3437002/diff/7002/15002 File chrome/browser/cocoa/status_bubble_mac.h (right): http://codereview.chromium.org/3437002/diff/7002/15002#newcode155 chrome/browser/cocoa/status_bubble_mac.h:155: // Used to elide the original ...
10 years, 3 months ago (2010-09-17 16:06:31 UTC) #7
Miranda Callahan
10 years, 3 months ago (2010-09-17 16:33:12 UTC) #8
http://codereview.chromium.org/3437002/diff/7002/15002
File chrome/browser/cocoa/status_bubble_mac.h (right):

http://codereview.chromium.org/3437002/diff/7002/15002#newcode155
chrome/browser/cocoa/status_bubble_mac.h:155: // Used to elide the original URL
if it's wider than the standard width.
On 2010/09/17 16:06:36, Nico wrote:
> s/Used.*it's/Needs to be passed to ElideUrl if it's/

Fixed, and added more detail so as not to release an "it's" into the world
without a proper antecedent.  :-)

http://codereview.chromium.org/3437002/diff/7002/15003
File chrome/browser/cocoa/status_bubble_mac.mm (right):

http://codereview.chromium.org/3437002/diff/7002/15003#newcode138
chrome/browser/cocoa/status_bubble_mac.mm:138: frame.size.width =
NSWidth(CalculateWindowFrame(false));
On 2010/09/17 16:06:36, Nico wrote:
> CalculateWindowFrame(/*expand=*/false);
> 
> also elsewhere

Never seen this style before, but I like it.  Done.

http://codereview.chromium.org/3437002/diff/7002/15003#newcode149
chrome/browser/cocoa/status_bubble_mac.mm:149: text_width = scaled_width.width;
On 2010/09/17 16:06:36, Nico wrote:
> static_cast<int>

Done.

http://codereview.chromium.org/3437002/diff/7002/15003#newcode161
chrome/browser/cocoa/status_bubble_mac.mm:161: // hover delay breaks things.
ExpandBubble is called explicitly in tests.
On 2010/09/17 16:06:36, Nico wrote:
> can you expand on "breaks things"?

Changed to explain that tests shouldn't use animation.

http://codereview.chromium.org/3437002/diff/7002/15003#newcode600
chrome/browser/cocoa/status_bubble_mac.mm:600: int max_bubble_width =
NSWidth(window_frame);
On 2010/09/17 16:06:36, Nico wrote:
> CGFloat, not int

Done.

http://codereview.chromium.org/3437002/diff/7002/15003#newcode601
chrome/browser/cocoa/status_bubble_mac.mm:601: int standard_bubble_width =
NSWidth(CalculateWindowFrame(false));
On 2010/09/17 16:06:36, Nico wrote:
> CGFloat

Done.

http://codereview.chromium.org/3437002/diff/7002/15003#newcode610
chrome/browser/cocoa/status_bubble_mac.mm:610: // Scale width from gfx::Font in
window coordinates to view coordinates.
On 2010/09/17 16:06:36, Nico wrote:
> this comment is the wrong way round. should be:
> 
> // Scale width from gfx::Font in view coordinates to window coordinates.
> 
> (you're calling toView:nil below, not fromView:nil. and that's correct, only
the
> comment is wrong)

Done.

Powered by Google App Engine
This is Rietveld 408576698