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

Issue 7466048: Fix RenderText cached bounds and offset logic; update clients. (Closed)

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

Description

Fix RenderText cached bounds and offset logic; update clients. Ensure the display offset and cursor bounds are valid on use. Build in offset logic to RenderText display and hit-testing. Implement simpler temporary GetStringWidth and GetCursorBounds. Fix SetDisplayRect signature, code file ordering, invalidation. Rename and refactor a bit, update comments. Fixes adornment display & hit testing on text field overflows. Increases abstraction/encapsulation for easier client use. BUG=90426 TEST=--use-pure-views / touch_ui textfield use with overflow. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=96334

Patch Set 1 #

Patch Set 2 : Fix cursor bounds and offset logic. #

Patch Set 3 : Update touch selection handles and test. #

Patch Set 4 : Rename and refactor cached bounds and offset updating. #

Patch Set 5 : Fix update loop, SetDisplayRect, and GetStringWidth. #

Patch Set 6 : Expand touch_selection_controller_impl_unittest textfield bounds to avoid unexpected text overrun. #

Total comments: 5

Patch Set 7 : Invalidate on SetText, update comments. #

Total comments: 2

Patch Set 8 : Update comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+92 lines, -93 lines) Patch
M ui/gfx/render_text.h View 1 2 3 4 5 6 7 5 chunks +31 lines, -21 lines 0 comments Download
M ui/gfx/render_text.cc View 1 2 3 4 5 6 7 13 chunks +55 lines, -55 lines 0 comments Download
M views/controls/textfield/native_textfield_views.cc View 1 2 3 4 3 chunks +4 lines, -10 lines 0 comments Download
M views/touchui/touch_selection_controller_impl_unittest.cc View 1 2 3 4 5 2 chunks +2 lines, -7 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
xji
lgtm
9 years, 4 months ago (2011-08-05 23:15:53 UTC) #1
msw
Unfortunately, this doesn't pass tests because other areas of code are relying on undesirable/broken behavior. ...
9 years, 4 months ago (2011-08-05 23:22:57 UTC) #2
msw
I've fixed the remaining issues I found with the cursor bounds and display offset. Tests ...
9 years, 4 months ago (2011-08-09 01:39:00 UTC) #3
varunjain
On 2011/08/09 01:39:00, msw wrote: > I've fixed the remaining issues I found with the ...
9 years, 4 months ago (2011-08-09 20:45:15 UTC) #4
msw
XJI: Please review the improvements we discussed offline. VarunJain FYI (no need to re-review): I ...
9 years, 4 months ago (2011-08-09 22:37:55 UTC) #5
xji
http://codereview.chromium.org/7466048/diff/13001/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): http://codereview.chromium.org/7466048/diff/13001/ui/gfx/render_text.cc#newcode175 ui/gfx/render_text.cc:175: cached_bounds_and_offset_valid_ = false; does it make sense to invalidate ...
9 years, 4 months ago (2011-08-10 00:36:15 UTC) #6
msw
http://codereview.chromium.org/7466048/diff/13001/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): http://codereview.chromium.org/7466048/diff/13001/ui/gfx/render_text.cc#newcode175 ui/gfx/render_text.cc:175: cached_bounds_and_offset_valid_ = false; On 2011/08/10 00:36:15, xji wrote: > ...
9 years, 4 months ago (2011-08-10 01:27:38 UTC) #7
xji
http://codereview.chromium.org/7466048/diff/13001/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): http://codereview.chromium.org/7466048/diff/13001/ui/gfx/render_text.cc#newcode598 ui/gfx/render_text.cc:598: cursor_bounds_.Offset(delta_offset, 0); On 2011/08/10 01:27:39, msw wrote: > On ...
9 years, 4 months ago (2011-08-10 18:15:53 UTC) #8
msw
> > If users call these functions for bounds that fall > > outside the ...
9 years, 4 months ago (2011-08-10 18:20:30 UTC) #9
varunjain
http://codereview.chromium.org/7466048/diff/15001/views/touchui/touch_selection_controller_impl_unittest.cc File views/touchui/touch_selection_controller_impl_unittest.cc (right): http://codereview.chromium.org/7466048/diff/15001/views/touchui/touch_selection_controller_impl_unittest.cc#newcode41 views/touchui/touch_selection_controller_impl_unittest.cc:41: params.bounds = gfx::Rect(0, 0, 200, 200); why is this ...
9 years, 4 months ago (2011-08-10 18:21:47 UTC) #10
msw
http://codereview.chromium.org/7466048/diff/15001/views/touchui/touch_selection_controller_impl_unittest.cc File views/touchui/touch_selection_controller_impl_unittest.cc (right): http://codereview.chromium.org/7466048/diff/15001/views/touchui/touch_selection_controller_impl_unittest.cc#newcode41 views/touchui/touch_selection_controller_impl_unittest.cc:41: params.bounds = gfx::Rect(0, 0, 200, 200); On 2011/08/10 18:21:47, ...
9 years, 4 months ago (2011-08-10 18:27:44 UTC) #11
msw
Comments updated. PTAL, thanks!
9 years, 4 months ago (2011-08-10 19:03:46 UTC) #12
xji
lgtm. Thanks!
9 years, 4 months ago (2011-08-10 19:06:05 UTC) #13
commit-bot: I haz the power
9 years, 4 months ago (2011-08-11 07:05:49 UTC) #14
Change committed as 96334

Powered by Google App Engine
This is Rietveld 408576698