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

Issue 10384168: Fix incorrect forcing of text directionality in canvas_skia.cc. (Closed)

Created:
8 years, 7 months ago by Alexei Svitkine (slow)
Modified:
8 years, 7 months ago
Reviewers:
xji
CC:
chromium-reviews
Visibility:
Public.

Description

Fix incorrect forcing of text directionality in canvas_skia.cc. There were two issues: 1. RTL wrapping was simply not happening if your UI language locale was not RTL. Which made FORCE_RTL_DIRECTIONALITY not work. 2. RTL wrapping was not being applied in the SizeStringInt() path, which resulted in an inconsistency between the needed width for SizeStringInt() and DrawStringInt(), causing a problem with the label code resulting in truncation. This CL fixes both issues. BUG=128073, 105550 TEST=See testcases attached to bug. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=137535

Patch Set 1 : . #

Total comments: 2

Patch Set 2 : #

Total comments: 2

Patch Set 3 : #

Patch Set 4 : #

Total comments: 4

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -16 lines) Patch
M ui/gfx/canvas_skia.cc View 1 2 3 4 6 chunks +40 lines, -16 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
Alexei Svitkine (slow)
.
8 years, 7 months ago (2012-05-14 21:46:22 UTC) #1
Alexei Svitkine (slow)
8 years, 7 months ago (2012-05-14 21:47:37 UTC) #2
xji
http://codereview.chromium.org/10384168/diff/2003/ui/gfx/canvas_skia.cc File ui/gfx/canvas_skia.cc (right): http://codereview.chromium.org/10384168/diff/2003/ui/gfx/canvas_skia.cc#newcode31 ui/gfx/canvas_skia.cc:31: base::i18n::WrapStringWithLTRFormatting(text); This is a bit tricky. In systems without ...
8 years, 7 months ago (2012-05-14 22:50:51 UTC) #3
xji
http://codereview.chromium.org/10384168/diff/2003/ui/gfx/canvas_skia.cc File ui/gfx/canvas_skia.cc (right): http://codereview.chromium.org/10384168/diff/2003/ui/gfx/canvas_skia.cc#newcode31 ui/gfx/canvas_skia.cc:31: base::i18n::WrapStringWithLTRFormatting(text); long term wise, I think we should be ...
8 years, 7 months ago (2012-05-14 23:09:10 UTC) #4
Alexei Svitkine (slow)
> We had similar problem before when render tooltip. > And what we did last ...
8 years, 7 months ago (2012-05-15 15:09:04 UTC) #5
Alexei Svitkine (slow)
I've updated the CL to have the logic you suggested. I'm still not sure I'm ...
8 years, 7 months ago (2012-05-15 15:47:01 UTC) #6
xji
On 2012/05/15 15:47:01, Alexei Svitkine wrote: > I've updated the CL to have the logic ...
8 years, 7 months ago (2012-05-15 19:41:53 UTC) #7
xji
http://codereview.chromium.org/10384168/diff/10003/ui/gfx/canvas_skia.cc File ui/gfx/canvas_skia.cc (right): http://codereview.chromium.org/10384168/diff/10003/ui/gfx/canvas_skia.cc#newcode42 ui/gfx/canvas_skia.cc:42: base::i18n::WrapStringWithLTRFormatting(text); I think in our current Uniscribe implementation of ...
8 years, 7 months ago (2012-05-15 19:42:07 UTC) #8
Alexei Svitkine (slow)
Thanks for the explanation. I'll update comments in the code to explain this.
8 years, 7 months ago (2012-05-15 19:44:33 UTC) #9
Alexei Svitkine (slow)
I've updated the CL to fix the issues and it now works correctly with the ...
8 years, 7 months ago (2012-05-16 17:52:01 UTC) #10
xji
lgtm. http://codereview.chromium.org/10384168/diff/15001/ui/gfx/canvas_skia.cc File ui/gfx/canvas_skia.cc (right): http://codereview.chromium.org/10384168/diff/15001/ui/gfx/canvas_skia.cc#newcode29 ui/gfx/canvas_skia.cc:29: // default RenderText directionality is already LTR. I ...
8 years, 7 months ago (2012-05-16 19:53:12 UTC) #11
Alexei Svitkine (slow)
Thanks! http://codereview.chromium.org/10384168/diff/15001/ui/gfx/canvas_skia.cc File ui/gfx/canvas_skia.cc (right): http://codereview.chromium.org/10384168/diff/15001/ui/gfx/canvas_skia.cc#newcode29 ui/gfx/canvas_skia.cc:29: // default RenderText directionality is already LTR. On ...
8 years, 7 months ago (2012-05-16 20:11:17 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/asvitkine@chromium.org/10384168/9003
8 years, 7 months ago (2012-05-16 20:11:31 UTC) #13
commit-bot: I haz the power
8 years, 7 months ago (2012-05-16 22:14:07 UTC) #14
Change committed as 137535

Powered by Google App Engine
This is Rietveld 408576698