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

Issue 7892044: Implement move by word, fix rendering of Arabic shape joining (Closed)

Created:
9 years, 3 months ago by xji
Modified:
9 years, 3 months ago
Reviewers:
msw, behdad_google, behdad
CC:
chromium-reviews, Paweł Hajdan Jr., jshin+watch_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

1. Implement move cursor left/right by word. 2. Fix pango rendering of Arabic joining shapes. In Pango, different font means different runs, and it breaks arabic shaping across run boundaries. Do not reset font attribute if it is the same as default. BUG=90426 TEST=RenderTextTest.MoveLeftRightByWord*. Build chromeos, open it with --use-pure-views, type in تسیک then select the 2nd and 3rd characters, check whether the characters' shapes changes (from joining to not joining). Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=102359

Patch Set 1 #

Patch Set 2 : fix lint error #

Total comments: 25

Patch Set 3 : address comment #

Total comments: 5

Patch Set 4 : sync #

Patch Set 5 : sync #

Unified diffs Side-by-side diffs Delta from patch set Stats (+263 lines, -10 lines) Patch
M ui/gfx/render_text_linux.h View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M ui/gfx/render_text_linux.cc View 1 2 3 4 9 chunks +93 lines, -10 lines 0 comments Download
M ui/gfx/render_text_unittest.cc View 1 2 3 4 1 chunk +165 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
xji
9 years, 3 months ago (2011-09-14 23:08:03 UTC) #1
msw
http://codereview.chromium.org/7892044/diff/4002/base/i18n/break_iterator.h File base/i18n/break_iterator.h (right): http://codereview.chromium.org/7892044/diff/4002/base/i18n/break_iterator.h#newcode91 base/i18n/break_iterator.h:91: // Under BREAK_WORD mode, returns true if |position| is ...
9 years, 3 months ago (2011-09-15 01:26:00 UTC) #2
behdad_google
LGTM. On 2011/09/15 01:26:00, msw wrote: > http://codereview.chromium.org/7892044/diff/4002/base/i18n/break_iterator.h > File base/i18n/break_iterator.h (right): > > http://codereview.chromium.org/7892044/diff/4002/base/i18n/break_iterator.h#newcode91 ...
9 years, 3 months ago (2011-09-15 17:14:03 UTC) #3
xji
http://codereview.chromium.org/7892044/diff/4002/base/i18n/break_iterator.h File base/i18n/break_iterator.h (right): http://codereview.chromium.org/7892044/diff/4002/base/i18n/break_iterator.h#newcode91 base/i18n/break_iterator.h:91: // Under BREAK_WORD mode, returns true if |position| is ...
9 years, 3 months ago (2011-09-15 22:58:09 UTC) #4
msw
9 years, 3 months ago (2011-09-17 00:27:10 UTC) #5
Just grammatical nits; LGTM.

http://codereview.chromium.org/7892044/diff/4002/ui/gfx/render_text_linux.cc
File ui/gfx/render_text_linux.cc (right):

http://codereview.chromium.org/7892044/diff/4002/ui/gfx/render_text_linux.cc#...
ui/gfx/render_text_linux.cc:621: // TODO(xji): keep a vector of runs to avoid
use single-linked list.
On 2011/09/15 22:58:09, xji wrote:
> On 2011/09/15 01:26:00, msw wrote:
> > Nits: "*K*eep", "us*ing*", "singl*y*" and "list*s*"
> 
> done except "lists", it is one list.

Technically that's grammatically incorrect, you'll need a preposition with a
singular noun in that case:
"... to avoid using *a* singly-linked list."

http://codereview.chromium.org/7892044/diff/9001/ui/gfx/render_text_unittest.cc
File ui/gfx/render_text_unittest.cc (right):

http://codereview.chromium.org/7892044/diff/9001/ui/gfx/render_text_unittest....
ui/gfx/render_text_unittest.cc:284: // Moving cursor by word from "abC|" to left
should return "|abC".
"Moving *the* cursor"... "to *the* left"
Same corrections below.

http://codereview.chromium.org/7892044/diff/9001/ui/gfx/render_text_unittest....
ui/gfx/render_text_unittest.cc:292: // Moving cursor by word from "|abC" to
right returns "abC|".
"Moving *the* cursor"... "to *the* right"

http://codereview.chromium.org/7892044/diff/9001/ui/gfx/render_text_unittest....
ui/gfx/render_text_unittest.cc:299: // For logical text "BCa", moving cursor by
word from "aCB|" to left returns
"moving *the* cursor"... "to *the* left"

http://codereview.chromium.org/7892044/diff/9001/ui/gfx/render_text_unittest....
ui/gfx/render_text_unittest.cc:306: // Moving cursor by word from "|aCB" to
right should return "returns "aCB|".
You have a stray bit of text ("returns)...
"*the* right"

http://codereview.chromium.org/7892044/diff/9001/ui/gfx/render_text_unittest....
ui/gfx/render_text_unittest.cc:307: // But since end of text is always treated
as a word breaker, it returns
"word break" I don't think 'breaker' is correct.

Powered by Google App Engine
This is Rietveld 408576698