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

Issue 7461102: modification to RenderText for inheritance/SelectionModel (Closed)

Created:
9 years, 5 months ago by xji
Modified:
9 years, 4 months ago
Reviewers:
msw, oshima, varunjain
CC:
chromium-reviews
Visibility:
Public.

Description

extend RenderText for inheritance. It 1. Moves temporary color definition to gfx, declares some function as virtual for override, removes const from some functions so that the override function is able to modify local data. 2. Cache cursor bounds and compute it (along with display_offset_) when necessary. 3. Introduce SelectionModel (not derivable) for visual cursor positioning. BUG=90426 TEST=--use-pure-views text editing Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=95508

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 20

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Total comments: 61

Patch Set 7 : '' #

Patch Set 8 : sync and change non-const reference to pointer #

Total comments: 43

Patch Set 9 : replace isalnum with u_isalnum which takes care of non-ascii #

Patch Set 10 : update per comments, sync and add SetMergedSelectionModel/SelectSelectionModel for touch #

Patch Set 11 : add native_textfield_views.h into CL #

Patch Set 12 : fix a lint error #

Total comments: 16

Patch Set 13 : '' #

Total comments: 22

Patch Set 14 : update per comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+522 lines, -231 lines) Patch
M ui/gfx/render_text.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 10 chunks +144 lines, -38 lines 0 comments Download
M ui/gfx/render_text.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 21 chunks +236 lines, -127 lines 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 5 chunks +33 lines, -16 lines 0 comments Download
M views/controls/textfield/native_textfield_views_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M views/controls/textfield/textfield_views_model.h View 1 2 3 4 5 6 7 8 9 2 chunks +9 lines, -4 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 9 chunks +48 lines, -23 lines 0 comments Download
M views/controls/textfield/textfield_views_model_unittest.cc View 1 2 3 4 5 6 7 8 9 7 chunks +50 lines, -22 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
xji
9 years, 4 months ago (2011-07-27 17:24:03 UTC) #1
msw
http://codereview.chromium.org/7461102/diff/4001/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): http://codereview.chromium.org/7461102/diff/4001/ui/gfx/render_text.cc#newcode317 ui/gfx/render_text.cc:317: StyleRanges style_ranges; Use the copy constructor with |style_ranges_|, as ...
9 years, 4 months ago (2011-07-27 19:34:47 UTC) #2
oshima
http://codereview.chromium.org/7461102/diff/4001/ui/gfx/render_text.h File ui/gfx/render_text.h (right): http://codereview.chromium.org/7461102/diff/4001/ui/gfx/render_text.h#newcode29 ui/gfx/render_text.h:29: // Color settings for text, backgrounds and cursor. On ...
9 years, 4 months ago (2011-07-28 08:53:04 UTC) #3
oshima
http://codereview.chromium.org/7461102/diff/4001/ui/gfx/render_text.h File ui/gfx/render_text.h (right): http://codereview.chromium.org/7461102/diff/4001/ui/gfx/render_text.h#newcode29 ui/gfx/render_text.h:29: // Color settings for text, backgrounds and cursor. On ...
9 years, 4 months ago (2011-07-28 16:54:24 UTC) #4
xji
http://codereview.chromium.org/7461102/diff/4001/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): http://codereview.chromium.org/7461102/diff/4001/ui/gfx/render_text.cc#newcode317 ui/gfx/render_text.cc:317: StyleRanges style_ranges; On 2011/07/27 19:34:47, msw wrote: > Use ...
9 years, 4 months ago (2011-07-29 22:49:18 UTC) #5
msw
I'm sorry for the deluge of feedback, but it is what it is. We can ...
9 years, 4 months ago (2011-08-01 05:02:23 UTC) #6
xji
http://codereview.chromium.org/7461102/diff/22001/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): http://codereview.chromium.org/7461102/diff/22001/ui/gfx/render_text.cc#newcode88 ui/gfx/render_text.cc:88: SelectionModel::SelectionModel() { Thanks for the detailed review! For the ...
9 years, 4 months ago (2011-08-01 23:38:42 UTC) #7
msw
Feedback in comments. http://codereview.chromium.org/7461102/diff/22001/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): http://codereview.chromium.org/7461102/diff/22001/ui/gfx/render_text.cc#newcode88 ui/gfx/render_text.cc:88: SelectionModel::SelectionModel() { On 2011/08/01 23:38:42, xji ...
9 years, 4 months ago (2011-08-02 01:29:05 UTC) #8
xji
(always forgot to set the comment when upload patch. Patch 7 mainly has 3 changes: ...
9 years, 4 months ago (2011-08-02 22:06:43 UTC) #9
msw
http://codereview.chromium.org/7461102/diff/29003/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): http://codereview.chromium.org/7461102/diff/29003/ui/gfx/render_text.cc#newcode41 ui/gfx/render_text.cc:41: void ApplyStyleRangeImpl(gfx::StyleRanges* style_ranges, Thank you! http://codereview.chromium.org/7461102/diff/29003/ui/gfx/render_text.cc#newcode114 ui/gfx/render_text.cc:114: SelectionModel::~SelectionModel() { ...
9 years, 4 months ago (2011-08-03 02:13:05 UTC) #10
xji
http://codereview.chromium.org/7461102/diff/29003/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): http://codereview.chromium.org/7461102/diff/29003/ui/gfx/render_text.cc#newcode114 ui/gfx/render_text.cc:114: SelectionModel::~SelectionModel() { On 2011/08/03 02:13:06, msw wrote: > Move ...
9 years, 4 months ago (2011-08-03 18:47:40 UTC) #11
msw
This is looking great now! I have just a few suggestions, and I'm excited to ...
9 years, 4 months ago (2011-08-03 19:46:38 UTC) #12
xji
http://codereview.chromium.org/7461102/diff/1004/ui/gfx/render_text.h File ui/gfx/render_text.h (right): http://codereview.chromium.org/7461102/diff/1004/ui/gfx/render_text.h#newcode175 ui/gfx/render_text.h:175: size_t GetCursorPosition() const; On 2011/08/03 19:46:39, msw wrote: > ...
9 years, 4 months ago (2011-08-03 22:40:32 UTC) #13
msw
Just a few more nits, thanks for bearing with me. http://codereview.chromium.org/7461102/diff/47003/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): http://codereview.chromium.org/7461102/diff/47003/ui/gfx/render_text.cc#newcode98 ...
9 years, 4 months ago (2011-08-03 23:44:38 UTC) #14
xji
http://codereview.chromium.org/7461102/diff/47003/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): http://codereview.chromium.org/7461102/diff/47003/ui/gfx/render_text.cc#newcode98 ui/gfx/render_text.cc:98: CaretPlacement placement) { On 2011/08/03 23:44:38, msw wrote: > ...
9 years, 4 months ago (2011-08-04 06:26:50 UTC) #15
msw
9 years, 4 months ago (2011-08-04 17:21:12 UTC) #16
I suspect that there might be lingering details to resolve, but it would help to
actually work with these changes. LGTM.

Powered by Google App Engine
This is Rietveld 408576698