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

Issue 7511029: Implement Pango RenderText for Linux. (Closed)

Created:
9 years, 4 months ago by xji
Modified:
9 years, 3 months ago
CC:
chromium-reviews, Paweł Hajdan Jr.
Visibility:
Public.

Description

Implement Pango RenderText for Linux. Follow the I18N recommendations for BiDi text editing. BUG=90426 TEST=--use-pure-views text editing Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=99987

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 46

Patch Set 6 : fix cursor bounds for RTL UI #

Total comments: 133

Patch Set 7 : address comments, fix cursor bounds in non-insert-mode #

Patch Set 8 : address oshima's comment missed in last upload #

Patch Set 9 : '' #

Patch Set 10 : fix compilation error. using ICU functions for utf8/utf16 conversion #

Total comments: 46

Patch Set 11 : fix spell error, sync to latest #

Patch Set 12 : address comments on patch 20, move SetupPango to pango_util #

Total comments: 12

Patch Set 13 : '' #

Patch Set 14 : update comment about u_strToUTF8, exclude pango_util from win/mac #

Total comments: 8

Patch Set 15 : '' #

Patch Set 16 : add dcheck and todo #

Total comments: 44

Patch Set 17 : '' #

Patch Set 18 : '' #

Patch Set 19 : ClearComposition() before SetText(). DCHECK composition_range_ is invalid in SetText() #

Patch Set 20 : sync, fix couple of bugs #

Total comments: 31

Patch Set 21 : address comments #

Total comments: 15

Patch Set 22 : address comments #

Patch Set 23 : fix render_text_unittest.DefaultStyle failure: init composition_range_ as invalid range #

Patch Set 24 : sync #

Total comments: 8

Patch Set 25 : '' #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+956 lines, -177 lines) Patch
M ui/gfx/canvas_skia_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 4 chunks +2 lines, -157 lines 0 comments Download
A ui/gfx/pango_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +31 lines, -0 lines 0 comments Download
A ui/gfx/pango_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +189 lines, -0 lines 0 comments Download
M ui/gfx/render_text.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 5 chunks +13 lines, -5 lines 0 comments Download
M ui/gfx/render_text.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 11 chunks +38 lines, -12 lines 0 comments Download
M ui/gfx/render_text_linux.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +100 lines, -1 line 0 comments Download
M ui/gfx/render_text_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +571 lines, -1 line 1 comment Download
M ui/ui.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 3 chunks +10 lines, -0 lines 0 comments Download
M views/controls/textfield/textfield_views_model.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 36 (0 generated)
xji
PTAL. Known issues: 1. need add tests. 2. move cursor left/right by word is not ...
9 years, 4 months ago (2011-08-18 21:43:39 UTC) #1
oshima
looked at just styles. I'll leave msw for logical part. http://codereview.chromium.org/7511029/diff/13008/ui/gfx/gtk_util.h File ui/gfx/gtk_util.h (right): http://codereview.chromium.org/7511029/diff/13008/ui/gfx/gtk_util.h#newcode71 ...
9 years, 4 months ago (2011-08-19 18:44:06 UTC) #2
msw
I tried not to overlap with oshima's comments on the previous patch set, but I ...
9 years, 4 months ago (2011-08-19 23:16:59 UTC) #3
xji
http://codereview.chromium.org/7511029/diff/13008/ui/gfx/gtk_util.h File ui/gfx/gtk_util.h (right): http://codereview.chromium.org/7511029/diff/13008/ui/gfx/gtk_util.h#newcode71 ui/gfx/gtk_util.h:71: class Font; On 2011/08/19 18:44:07, oshima wrote: > move ...
9 years, 4 months ago (2011-08-20 00:53:05 UTC) #4
xji
On 2011/08/19 23:16:59, msw wrote: > I tried not to overlap with oshima's comments on ...
9 years, 4 months ago (2011-08-20 00:58:06 UTC) #5
oshima
On Fri, Aug 19, 2011 at 5:58 PM, <xji@chromium.org> wrote: > On 2011/08/19 23:16:59, msw ...
9 years, 4 months ago (2011-08-20 01:03:15 UTC) #6
xji
Thanks for the review and great feedback. I will ask a co-worker to check the ...
9 years, 4 months ago (2011-08-22 23:57:28 UTC) #7
msw
Cool, this is looking better. I'm not so keen on adding code to gtk_util.*. Oshima, ...
9 years, 4 months ago (2011-08-23 08:01:01 UTC) #8
oshima
On 2011/08/23 08:01:01, msw wrote: > Cool, this is looking better. > > I'm not ...
9 years, 4 months ago (2011-08-23 21:44:10 UTC) #9
xji
Oshima: looks like setup pango has a dependency on gtk, please check out http://codereview.chromium.org/7511029/diff/36002/ui/gfx/pango_util.cc?context=10&column_width=80 at ...
9 years, 4 months ago (2011-08-23 23:52:52 UTC) #10
oshima
On Tue, Aug 23, 2011 at 4:52 PM, <xji@chromium.org> wrote: > Oshima: looks like setup ...
9 years, 4 months ago (2011-08-24 01:26:25 UTC) #11
msw
http://codereview.chromium.org/7511029/diff/28004/ui/gfx/render_text_linux.cc File ui/gfx/render_text_linux.cc (right): http://codereview.chromium.org/7511029/diff/28004/ui/gfx/render_text_linux.cc#newcode409 ui/gfx/render_text_linux.cc:409: return SelectionModel(caret - 1, caret - 1, SelectionModel::LEADING); On ...
9 years, 4 months ago (2011-08-24 08:55:30 UTC) #12
oshima
http://codereview.chromium.org/7511029/diff/36002/ui/gfx/pango_util.cc File ui/gfx/pango_util.cc (right): http://codereview.chromium.org/7511029/diff/36002/ui/gfx/pango_util.cc#newcode22 ui/gfx/pango_util.cc:22: cairo_font_options_t* cairo_font_options = NULL; On 2011/08/24 08:55:30, msw wrote: ...
9 years, 4 months ago (2011-08-24 21:12:30 UTC) #13
msw
On 2011/08/24 21:12:30, oshima wrote: > http://codereview.chromium.org/7511029/diff/36002/ui/gfx/pango_util.cc > File ui/gfx/pango_util.cc (right): > > http://codereview.chromium.org/7511029/diff/36002/ui/gfx/pango_util.cc#newcode22 > ...
9 years, 4 months ago (2011-08-24 21:16:43 UTC) #14
xji
patch 13 address comments on patch 12. And it changed some code to avoid across ...
9 years, 4 months ago (2011-08-25 03:15:17 UTC) #15
markus.icu
http://codereview.chromium.org/7511029/diff/28004/ui/gfx/render_text_linux.cc File ui/gfx/render_text_linux.cc (right): http://codereview.chromium.org/7511029/diff/28004/ui/gfx/render_text_linux.cc#newcode534 ui/gfx/render_text_linux.cc:534: u_strToUTF8WithSub(NULL, 0, &utf8_index, text().data(), index, On 2011/08/23 08:01:01, msw ...
9 years, 4 months ago (2011-08-25 19:09:03 UTC) #16
xji
Thanks for the review. http://codereview.chromium.org/7511029/diff/55001/ui/gfx/render_text_linux.cc File ui/gfx/render_text_linux.cc (right): http://codereview.chromium.org/7511029/diff/55001/ui/gfx/render_text_linux.cc#newcode22 ui/gfx/render_text_linux.cc:22: return c * (0xffff / ...
9 years, 4 months ago (2011-08-25 19:22:19 UTC) #17
msw
http://codereview.chromium.org/7511029/diff/60014/ui/gfx/pango_util.cc File ui/gfx/pango_util.cc (right): http://codereview.chromium.org/7511029/diff/60014/ui/gfx/pango_util.cc#newcode189 ui/gfx/pango_util.cc:189: } } // namespace gfx Also, Lint thinks this ...
9 years, 3 months ago (2011-08-29 20:38:04 UTC) #18
xji
http://codereview.chromium.org/7511029/diff/60014/ui/gfx/render_text_linux.cc File ui/gfx/render_text_linux.cc (right): http://codereview.chromium.org/7511029/diff/60014/ui/gfx/render_text_linux.cc#newcode25 ui/gfx/render_text_linux.cc:25: } On 2011/08/29 20:38:05, msw wrote: > } // ...
9 years, 3 months ago (2011-08-30 00:39:41 UTC) #19
msw
LGTM; I hope a Pango expert will also verify this change. http://codereview.chromium.org/7511029/diff/60014/ui/gfx/render_text_linux.cc File ui/gfx/render_text_linux.cc (right): ...
9 years, 3 months ago (2011-08-30 01:17:07 UTC) #20
xji
http://codereview.chromium.org/7511029/diff/60014/ui/gfx/render_text_linux.cc File ui/gfx/render_text_linux.cc (right): http://codereview.chromium.org/7511029/diff/60014/ui/gfx/render_text_linux.cc#newcode220 ui/gfx/render_text_linux.cc:220: return SelectionModel(text().length(), caret, SelectionModel::LEADING); On 2011/08/30 01:17:07, msw wrote: ...
9 years, 3 months ago (2011-08-30 04:39:39 UTC) #21
xji
http://codereview.chromium.org/7511029/diff/60014/views/controls/textfield/textfield_views_model.cc File views/controls/textfield/textfield_views_model.cc (right): http://codereview.chromium.org/7511029/diff/60014/views/controls/textfield/textfield_views_model.cc#newcode614 views/controls/textfield/textfield_views_model.cc:614: ClearComposition(); On 2011/08/30 01:17:07, msw wrote: > On 2011/08/30 ...
9 years, 3 months ago (2011-08-31 19:01:06 UTC) #22
xji
Since I am still waiting Behdad's review, I am continuing changing the code. I will ...
9 years, 3 months ago (2011-09-03 00:50:04 UTC) #23
msw
On 2011/09/03 00:50:04, xji wrote: > Since I am still waiting Behdad's review, I am ...
9 years, 3 months ago (2011-09-03 01:26:06 UTC) #24
behdad_google
Hi Xiaomei, Thanks for the great work! I reviewed part of it, comments below. I'll ...
9 years, 3 months ago (2011-09-06 16:05:03 UTC) #25
xji
On 2011/09/03 01:26:06, msw wrote: > On 2011/09/03 00:50:04, xji wrote: > > Since I ...
9 years, 3 months ago (2011-09-06 17:30:45 UTC) #26
behdad_google
On 2011/09/06 17:30:45, xji wrote: > > It wont affect GetStringWidth() which will get the ...
9 years, 3 months ago (2011-09-06 17:35:11 UTC) #27
xji
On 2011/09/06 17:35:11, behdad_google wrote: > On 2011/09/06 17:30:45, xji wrote: > > > > ...
9 years, 3 months ago (2011-09-06 18:21:14 UTC) #28
xji
Thanks for the review! http://codereview.chromium.org/7511029/diff/79001/ui/gfx/render_text_linux.cc File ui/gfx/render_text_linux.cc (right): http://codereview.chromium.org/7511029/diff/79001/ui/gfx/render_text_linux.cc#newcode20 ui/gfx/render_text_linux.cc:20: // it should also massage ...
9 years, 3 months ago (2011-09-06 19:54:12 UTC) #29
behdad_google
On 2011/09/06 19:54:12, xji wrote: > Thanks for the review! > > http://codereview.chromium.org/7511029/diff/79001/ui/gfx/render_text_linux.cc > File ...
9 years, 3 months ago (2011-09-06 21:40:37 UTC) #30
behdad_google
So, here's the next batch. Nothing major, but there's some cleanup you can do. The ...
9 years, 3 months ago (2011-09-06 21:57:17 UTC) #31
xji
On 2011/09/06 21:40:37, behdad_google wrote: > On 2011/09/06 19:54:12, xji wrote: > > Thanks for ...
9 years, 3 months ago (2011-09-07 17:11:22 UTC) #32
xji
As we discussed, I am going to commit the current version. Please continue to review ...
9 years, 3 months ago (2011-09-07 17:14:36 UTC) #33
behdad_google
A few more. http://codereview.chromium.org/7511029/diff/83016/ui/gfx/render_text_linux.cc File ui/gfx/render_text_linux.cc (right): http://codereview.chromium.org/7511029/diff/83016/ui/gfx/render_text_linux.cc#newcode220 ui/gfx/render_text_linux.cc:220: return SelectionModel(0, 0, SelectionModel::LEADING); Humm, if ...
9 years, 3 months ago (2011-09-07 18:11:36 UTC) #34
xji
http://codereview.chromium.org/7511029/diff/83016/ui/gfx/render_text_linux.cc File ui/gfx/render_text_linux.cc (right): http://codereview.chromium.org/7511029/diff/83016/ui/gfx/render_text_linux.cc#newcode220 ui/gfx/render_text_linux.cc:220: return SelectionModel(0, 0, SelectionModel::LEADING); On 2011/09/07 18:11:36, behdad_google wrote: ...
9 years, 3 months ago (2011-09-07 18:44:30 UTC) #35
behdad_google
9 years, 3 months ago (2011-09-09 18:25:30 UTC) #36
http://codereview.chromium.org/7511029/diff/84006/ui/gfx/render_text_linux.cc
File ui/gfx/render_text_linux.cc (right):

http://codereview.chromium.org/7511029/diff/84006/ui/gfx/render_text_linux.cc...
ui/gfx/render_text_linux.cc:29: // to avoid conversion.
Alternatively, we can just cache the mapping between U16 and U8 indices, if they
are used often.

Powered by Google App Engine
This is Rietveld 408576698