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

Issue 7458014: Implement Uniscribe RenderText for Windows. (Closed)

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

Description

Implement Uniscribe RenderText for Windows. Follow the I18N recommendations for BiDi text editing. Visual cursor movement and logical selection over BiDi text. Cleanup some common RenderText code and interfaces. Fixup TextfieldExample for views_examples. Known issues: Word breaking is not well implemented. Font sizes and vertical alignments are slightly off. Text styles break runs (colors can affect glyph shaping). Composition/selection ranges aren't stylized. BUG=90426 TEST=--use-pure-views text editing Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=98785

Patch Set 1 : Implement Uniscribe RenderText for Windows. #

Patch Set 2 : Added naive styling and better caching. #

Patch Set 3 : Begin cursor and selection work. #

Patch Set 4 : Merge SelectionModel, refining cursor interaction. #

Patch Set 5 : Add WORD_BREAK and complex text support; numerous fixes. #

Patch Set 6 : Add RTL display support, add MoveCursorTo size_t, fix SelectWord. #

Patch Set 7 : Add simple BreakIterator support, use scoped_array, fix home/end, invalidate on toggle insert, etc. #

Total comments: 14

Patch Set 8 : Adjust Windows-like word breaks, update tests, address comments. #

Patch Set 9 : Fix Linux build error. #

Total comments: 8

Patch Set 10 : Address comments, re-layout on SetDisplayRect and ApplyDefaultStyle. #

Total comments: 8

Patch Set 11 : Address nits. #

Total comments: 37

Patch Set 12 : Address comments, move some code. #

Patch Set 13 : Fix RenderText::RightEndSelectionModel. #

Total comments: 9

Patch Set 14 : Seek parity with RenderTextLinux, nix tentative word breaking, address comments. #

Total comments: 9

Patch Set 15 : Update DCHECK #

Patch Set 16 : Add Skia drawPosText support. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+892 lines, -94 lines) Patch
M ui/gfx/render_text.h View 1 2 3 4 5 6 7 8 9 10 11 7 chunks +34 lines, -18 lines 0 comments Download
M ui/gfx/render_text.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 11 chunks +98 lines, -44 lines 0 comments Download
M ui/gfx/render_text_win.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +104 lines, -0 lines 0 comments Download
M ui/gfx/render_text_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +627 lines, -1 line 0 comments Download
M views/controls/textfield/native_textfield_views.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +6 lines, -5 lines 0 comments Download
M views/controls/textfield/textfield_views_model.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -3 lines 0 comments Download
M views/controls/textfield/textfield_views_model.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +4 lines, -9 lines 0 comments Download
M views/examples/textfield_example.cc View 1 1 chunk +19 lines, -14 lines 0 comments Download

Messages

Total messages: 32 (0 generated)
msw
Just an FYI; this work is still underway. I'm simply sharing my progress here, in ...
9 years, 5 months ago (2011-07-25 23:45:20 UTC) #1
msw
Uniscribe is mostly done. PTAL, thanks! Known notable issues: - Word breaking doesn't skip simple ...
9 years, 4 months ago (2011-08-17 21:42:47 UTC) #2
msw
I'm confused because I can't reproduce those unit test failures locally. I'm trying to investigate ...
9 years, 4 months ago (2011-08-18 18:03:55 UTC) #3
msw
On 2011/08/18 18:03:55, msw wrote: > I'm confused because I can't reproduce those unit test ...
9 years, 4 months ago (2011-08-18 19:25:55 UTC) #4
oshima
let me know if I should wait or review it anyway http://codereview.chromium.org/7458014/diff/19001/base/i18n/break_iterator.h File base/i18n/break_iterator.h (right): ...
9 years, 4 months ago (2011-08-18 22:31:13 UTC) #5
msw
You can hold off if you'd like. I'm updating word breaking, tests, perhaps tweaking more.
9 years, 4 months ago (2011-08-18 22:39:31 UTC) #6
xji
http://codereview.chromium.org/7458014/diff/19001/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): http://codereview.chromium.org/7458014/diff/19001/ui/gfx/render_text.cc#newcode246 ui/gfx/render_text.cc:246: SetSelectionModel(sel); hmm... the functionality seems different from previous version. ...
9 years, 4 months ago (2011-08-18 22:47:54 UTC) #7
xji
On 2011/08/17 21:42:47, msw wrote: > Uniscribe is mostly done. PTAL, thanks! Known notable issues: ...
9 years, 4 months ago (2011-08-18 22:49:10 UTC) #8
msw
On 2011/08/18 22:49:10, xji wrote: > On 2011/08/17 21:42:47, msw wrote: > > Uniscribe is ...
9 years, 4 months ago (2011-08-18 23:01:14 UTC) #9
xji
On 2011/08/18 23:01:14, msw wrote: > On 2011/08/18 22:49:10, xji wrote: > > On 2011/08/17 ...
9 years, 4 months ago (2011-08-18 23:42:07 UTC) #10
msw
Comments addressed, adjusted word breaks/tests. PTAL, thanks! http://codereview.chromium.org/7458014/diff/19001/base/i18n/break_iterator.h File base/i18n/break_iterator.h (right): http://codereview.chromium.org/7458014/diff/19001/base/i18n/break_iterator.h#newcode91 base/i18n/break_iterator.h:91: bool IsBreak(size_t ...
9 years, 4 months ago (2011-08-19 10:55:30 UTC) #11
xji
http://codereview.chromium.org/7458014/diff/19001/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): http://codereview.chromium.org/7458014/diff/19001/ui/gfx/render_text.cc#newcode246 ui/gfx/render_text.cc:246: SetSelectionModel(sel); On 2011/08/19 10:55:30, msw wrote: > On 2011/08/18 ...
9 years, 4 months ago (2011-08-19 17:38:13 UTC) #12
msw
http://codereview.chromium.org/7458014/diff/19001/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): http://codereview.chromium.org/7458014/diff/19001/ui/gfx/render_text.cc#newcode246 ui/gfx/render_text.cc:246: SetSelectionModel(sel); On 2011/08/19 17:38:13, xji wrote: > On 2011/08/19 ...
9 years, 4 months ago (2011-08-19 18:03:33 UTC) #13
oshima
just checked styles. I'd leave the logical verification to xji. http://codereview.chromium.org/7458014/diff/28001/ui/gfx/render_text_win.cc File ui/gfx/render_text_win.cc (right): http://codereview.chromium.org/7458014/diff/28001/ui/gfx/render_text_win.cc#newcode52 ...
9 years, 4 months ago (2011-08-19 18:29:10 UTC) #14
msw
Comments addressed. PTAL, thanks! http://codereview.chromium.org/7458014/diff/28001/ui/gfx/render_text_win.cc File ui/gfx/render_text_win.cc (right): http://codereview.chromium.org/7458014/diff/28001/ui/gfx/render_text_win.cc#newcode52 ui/gfx/render_text_win.cc:52: logical_to_visual_() { On 2011/08/19 18:29:10, ...
9 years, 4 months ago (2011-08-19 20:34:03 UTC) #15
oshima
LGTM on styles. http://codereview.chromium.org/7458014/diff/34002/base/i18n/break_iterator.cc File base/i18n/break_iterator.cc (right): http://codereview.chromium.org/7458014/diff/34002/base/i18n/break_iterator.cc#newcode103 base/i18n/break_iterator.cc:103: (next_status != UBRK_WORD_NONE)); nit: you don't ...
9 years, 4 months ago (2011-08-19 21:25:24 UTC) #16
msw
Done n-1 nits :) I'll wait for Xiaomei's review; thanks! http://codereview.chromium.org/7458014/diff/34002/base/i18n/break_iterator.cc File base/i18n/break_iterator.cc (right): http://codereview.chromium.org/7458014/diff/34002/base/i18n/break_iterator.cc#newcode103 ...
9 years, 4 months ago (2011-08-20 00:11:53 UTC) #17
xji
http://codereview.chromium.org/7458014/diff/31002/base/i18n/break_iterator.cc File base/i18n/break_iterator.cc (right): http://codereview.chromium.org/7458014/diff/31002/base/i18n/break_iterator.cc#newcode103 base/i18n/break_iterator.cc:103: next_status != UBRK_WORD_NONE); this probably wont work for Chinese, ...
9 years, 4 months ago (2011-08-23 07:39:51 UTC) #18
msw
http://codereview.chromium.org/7458014/diff/31002/base/i18n/break_iterator.cc File base/i18n/break_iterator.cc (right): http://codereview.chromium.org/7458014/diff/31002/base/i18n/break_iterator.cc#newcode103 base/i18n/break_iterator.cc:103: next_status != UBRK_WORD_NONE); On 2011/08/23 07:39:51, xji wrote: > ...
9 years, 4 months ago (2011-08-24 10:15:40 UTC) #19
xji
The diff of render_text_win.cc is bloated by the function definitions reshuffling. I compared the code ...
9 years, 4 months ago (2011-08-25 05:58:38 UTC) #20
msw
I removed the tentative and incomplete word break code and rewrote the cursor handling to ...
9 years, 4 months ago (2011-08-26 16:26:25 UTC) #21
xji
http://codereview.chromium.org/7458014/diff/53004/ui/gfx/render_text_win.cc File ui/gfx/render_text_win.cc (right): http://codereview.chromium.org/7458014/diff/53004/ui/gfx/render_text_win.cc#newcode132 ui/gfx/render_text_win.cc:132: DCHECK_GT(cursor, 0U); DCHECK_GE() http://codereview.chromium.org/7458014/diff/53004/views/controls/textfield/native_textfield_views.cc File views/controls/textfield/native_textfield_views.cc (right): http://codereview.chromium.org/7458014/diff/53004/views/controls/textfield/native_textfield_views.cc#newcode302 views/controls/textfield/native_textfield_views.cc:302: ...
9 years, 4 months ago (2011-08-26 17:59:26 UTC) #22
msw
Hey Steve and Chris, can you review Uniscribe use in ui/gfx/render_text_win.cc or alert a proper ...
9 years, 4 months ago (2011-08-26 20:10:43 UTC) #23
xji
lgtm. http://codereview.chromium.org/7458014/diff/53004/views/controls/textfield/native_textfield_views.cc File views/controls/textfield/native_textfield_views.cc (right): http://codereview.chromium.org/7458014/diff/53004/views/controls/textfield/native_textfield_views.cc#newcode302 views/controls/textfield/native_textfield_views.cc:302: if (context_menu_runner_->RunMenuAt( On 2011/08/26 20:10:43, msw wrote: > ...
9 years, 4 months ago (2011-08-26 20:36:44 UTC) #24
vandebo (ex-Chrome)
On 2011/08/26 20:10:43, msw wrote: > Hey Steve and Chris, can you review Uniscribe use ...
9 years, 4 months ago (2011-08-26 20:42:43 UTC) #25
reed1
If you can call SkCanvas::drawPosText instead of ScriptTextOut, then I think all of the rest ...
9 years, 4 months ago (2011-08-26 21:24:19 UTC) #26
msw
On 2011/08/26 21:24:19, reed1 wrote: > If you can call SkCanvas::drawPosText instead of ScriptTextOut, then ...
9 years, 3 months ago (2011-08-29 19:54:31 UTC) #27
reed1
LGTM
9 years, 3 months ago (2011-08-29 20:05:21 UTC) #28
msw
Ping ctguil; I'm waiting on your optional Uniscribe review.
9 years, 3 months ago (2011-08-29 23:34:22 UTC) #29
vandebo (ex-Chrome)
On 2011/08/29 23:34:22, msw wrote: > Ping ctguil; I'm waiting on your optional Uniscribe review. ...
9 years, 3 months ago (2011-08-29 23:37:51 UTC) #30
msw
On 2011/08/29 23:37:51, vandebo wrote: > On 2011/08/29 23:34:22, msw wrote: > > Ping ctguil; ...
9 years, 3 months ago (2011-08-29 23:48:34 UTC) #31
commit-bot: I haz the power
9 years, 3 months ago (2011-08-30 06:21:19 UTC) #32
Change committed as 98785

Powered by Google App Engine
This is Rietveld 408576698