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

Issue 354014: Fullscreen Exit Bubble should not elide its label.... (Closed)

Created:
11 years, 1 month ago by Finnur
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com, ben+cc_chromium.org
Visibility:
Public.

Description

Fullscreen Exit Bubble should not elide its label. When drawing a Label it is important to adjust for RTL not just when drawing, but also when computing the size of the string. Before this change, we'd compute using Font::GetStringWidth (which uses ::GetTextExtentPoint32 *without* adjusting the string for RTL) and draw using DoDrawText (which adjusts for RTL and then draws using ::DrawText). After this change, we now use SizeStringInt for computing (so we now compute and draw using the same ::DrawText function, thereby adjusting the string for RTL in both cases). BUG=17949 TEST=Run chrome with --lang=he, press F11 and the string in the bubble at the top should not be elided. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=30863

Patch Set 1 #

Total comments: 3

Patch Set 2 : '' #

Total comments: 1

Patch Set 3 : '' #

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -1 line) Patch
M views/controls/label.cc View 1 2 3 2 chunks +7 lines, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
Finnur
Dave, you were the last person to attempt such a change and backed out. I ...
11 years, 1 month ago (2009-11-02 23:59:26 UTC) #1
Peter Kasting
LGTM. If any callers call both GetTextSize() and GetHeightForWidth(), maybe we should have a single ...
11 years, 1 month ago (2009-11-03 00:05:51 UTC) #2
Peter Kasting
11 years, 1 month ago (2009-11-03 00:05:56 UTC) #3
Finnur
Fixed indentation problem and uploaded. http://codereview.chromium.org/354014/diff/1/2 File views/controls/label.cc (right): http://codereview.chromium.org/354014/diff/1/2#newcode267 Line 267: int w = ...
11 years, 1 month ago (2009-11-03 00:31:52 UTC) #4
Peter Kasting
On 2009/11/03 00:31:52, Finnur wrote: > http://codereview.chromium.org/354014/diff/1/2#newcode267 > Line 267: int w = MAXINT, h ...
11 years, 1 month ago (2009-11-03 00:34:43 UTC) #5
Finnur
I uploaded this after changing it to use std::numeric_limits. As for the width being set ...
11 years, 1 month ago (2009-11-03 03:32:21 UTC) #6
DaveMoore
11 years, 1 month ago (2009-11-03 17:48:14 UTC) #7
LGTM, but we should at least add a comment indicating that it's invalid for
multiline labels...perhaps even check for it in the code.

Powered by Google App Engine
This is Rietveld 408576698