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

Issue 8536047: Separate selection highlight from pango layout (Closed)

Created:
9 years, 1 month ago by xji
Modified:
9 years ago
CC:
chromium-reviews, Alexei Svitkine (slow)
Visibility:
Public.

Description

Separate selection highlight from pango layout, highlight selection using skia. Cache substring bounds to avoid unnecessary g_free. Consolidate drawing functions with RenderTextWin. Remove UpdateLayout() from RenderText::SetSelectionModel(). BUG=103647 TEST=TextfieldViewModelTest; Manual test selection highlight on bidi text. (Do not really know how to test "fi" ligature part. But since the selection highlight is not done by using pango attribute, I would assume that solves the problem). Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=112188

Patch Set 1 #

Patch Set 2 : remove UpdateLayout() in RenderText::SetSelectionModel() #

Patch Set 3 : fix a lint error #

Patch Set 4 : save selection visual bounds to minimize g_free calls #

Patch Set 5 : fix an lint error #

Total comments: 34

Patch Set 6 : address comments #

Total comments: 7

Patch Set 7 : sync #

Patch Set 8 : synchistory #

Total comments: 4

Patch Set 9 : address comments #

Total comments: 6

Patch Set 10 : address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+294 lines, -312 lines) Patch
M ui/gfx/render_text.h View 1 2 3 4 5 6 7 8 9 5 chunks +24 lines, -15 lines 0 comments Download
M ui/gfx/render_text.cc View 1 2 3 4 5 6 7 8 6 chunks +37 lines, -84 lines 0 comments Download
M ui/gfx/render_text_linux.h View 1 2 3 4 5 6 7 8 6 chunks +19 lines, -5 lines 0 comments Download
M ui/gfx/render_text_linux.cc View 1 2 3 4 5 6 7 8 9 chunks +132 lines, -100 lines 0 comments Download
M ui/gfx/render_text_win.h View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -8 lines 0 comments Download
M ui/gfx/render_text_win.cc View 1 2 3 4 5 6 7 8 9 6 chunks +77 lines, -100 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
xji
9 years, 1 month ago (2011-11-16 00:56:22 UTC) #1
behdad_google
Hi Xiaomei, I'll review this tomorrow. Cheers, behdad On 2011-11-15, at 7:56 PM, xji@chromium.org wrote: ...
9 years, 1 month ago (2011-11-16 01:00:03 UTC) #2
xji
ping reviewers. On 2011/11/16 01:00:03, behdad_google wrote: > Hi Xiaomei, > > I'll review this ...
9 years ago (2011-11-28 18:57:18 UTC) #3
xji
9 years ago (2011-11-28 19:27:15 UTC) #4
Alexei Svitkine (slow)
http://codereview.chromium.org/8536047/diff/12002/ui/gfx/render_text.h File ui/gfx/render_text.h (right): http://codereview.chromium.org/8536047/diff/12002/ui/gfx/render_text.h#newcode217 ui/gfx/render_text.h:217: virtual std::vector<Rect> GetSubstringBounds(size_t from, size_t to); Maybe change the ...
9 years ago (2011-11-28 19:56:13 UTC) #5
msw
http://codereview.chromium.org/8536047/diff/12002/ui/gfx/render_text_linux.cc File ui/gfx/render_text_linux.cc (left): http://codereview.chromium.org/8536047/diff/12002/ui/gfx/render_text_linux.cc#oldcode535 ui/gfx/render_text_linux.cc:535: // TODO(xji): There's a bug in pango that it ...
9 years ago (2011-11-28 20:01:17 UTC) #6
behdad_google
http://codereview.chromium.org/8536047/diff/12002/ui/gfx/render_text_linux.cc File ui/gfx/render_text_linux.cc (right): http://codereview.chromium.org/8536047/diff/12002/ui/gfx/render_text_linux.cc#newcode682 ui/gfx/render_text_linux.cc:682: for (int i = 0; i < 2 * ...
9 years ago (2011-11-28 23:17:40 UTC) #7
xji
http://codereview.chromium.org/8536047/diff/12002/ui/gfx/render_text.h File ui/gfx/render_text.h (right): http://codereview.chromium.org/8536047/diff/12002/ui/gfx/render_text.h#newcode217 ui/gfx/render_text.h:217: virtual std::vector<Rect> GetSubstringBounds(size_t from, size_t to); On 2011/11/28 19:56:14, ...
9 years ago (2011-11-29 01:37:02 UTC) #8
Alexei Svitkine (slow)
http://codereview.chromium.org/8536047/diff/20001/ui/gfx/render_text.h File ui/gfx/render_text.h (left): http://codereview.chromium.org/8536047/diff/20001/ui/gfx/render_text.h#oldcode25 ui/gfx/render_text.h:25: const int kStrikeWidth = 2; Delete this constant since ...
9 years ago (2011-11-29 15:41:37 UTC) #9
xji
http://codereview.chromium.org/8536047/diff/20001/ui/gfx/render_text.h File ui/gfx/render_text.h (left): http://codereview.chromium.org/8536047/diff/20001/ui/gfx/render_text.h#oldcode25 ui/gfx/render_text.h:25: const int kStrikeWidth = 2; On 2011/11/29 15:41:37, Alexei ...
9 years ago (2011-11-29 23:07:15 UTC) #10
Alexei Svitkine (slow)
LGTM http://codereview.chromium.org/8536047/diff/20001/ui/gfx/render_text_linux.cc File ui/gfx/render_text_linux.cc (right): http://codereview.chromium.org/8536047/diff/20001/ui/gfx/render_text_linux.cc#newcode196 ui/gfx/render_text_linux.cc:196: selection_visual_bounds_.clear(); On 2011/11/29 23:07:15, xji wrote: > On ...
9 years ago (2011-11-29 23:22:01 UTC) #11
sky
Rubber stamp LGTM
9 years ago (2011-11-30 00:10:48 UTC) #12
msw
http://codereview.chromium.org/8536047/diff/25001/ui/gfx/render_text_linux.cc File ui/gfx/render_text_linux.cc (right): http://codereview.chromium.org/8536047/diff/25001/ui/gfx/render_text_linux.cc#newcode204 ui/gfx/render_text_linux.cc:204: if (from == to) This used to return a ...
9 years ago (2011-11-30 00:20:37 UTC) #13
xji
http://codereview.chromium.org/8536047/diff/25001/ui/gfx/render_text_linux.cc File ui/gfx/render_text_linux.cc (right): http://codereview.chromium.org/8536047/diff/25001/ui/gfx/render_text_linux.cc#newcode204 ui/gfx/render_text_linux.cc:204: if (from == to) On 2011/11/30 00:20:37, msw wrote: ...
9 years ago (2011-11-30 00:45:09 UTC) #14
msw
LGTM with pretty much any way you'd go on GetSelectionBounds. http://codereview.chromium.org/8536047/diff/25001/ui/gfx/render_text_linux.cc File ui/gfx/render_text_linux.cc (right): http://codereview.chromium.org/8536047/diff/25001/ui/gfx/render_text_linux.cc#newcode204 ...
9 years ago (2011-11-30 00:54:51 UTC) #15
xji
http://codereview.chromium.org/8536047/diff/25001/ui/gfx/render_text_linux.cc File ui/gfx/render_text_linux.cc (right): http://codereview.chromium.org/8536047/diff/25001/ui/gfx/render_text_linux.cc#newcode204 ui/gfx/render_text_linux.cc:204: if (from == to) On 2011/11/30 00:54:51, msw wrote: ...
9 years ago (2011-11-30 01:17:17 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xji@chromium.org/8536047/25004
9 years ago (2011-11-30 08:35:01 UTC) #17
commit-bot: I haz the power
9 years ago (2011-11-30 10:18:44 UTC) #18
Change committed as 112188

Powered by Google App Engine
This is Rietveld 408576698