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

Issue 276123003: Add a unit tests for RenderText::FindCursorPosition. (Closed)

Created:
6 years, 7 months ago by msw
Modified:
6 years, 7 months ago
CC:
chromium-reviews, yusukes+watch_chromium.org, yukishiino+watch_chromium.org, tfarina, penghuang+watch_chromium.org, nona+watch_chromium.org, James Su, ckocagil
Visibility:
Public.

Description

Add a unit tests for RenderText::FindCursorPosition. Verifies that FindCursorPosition works with GetGlyphBounds values. Prompted by a question reviewing Cem's WIP RenderTextHarfBuzz: https://codereview.chromium.org/152473008/diff/100001/ui/gfx/render_text_harfbuzz.cc#newcode787 I thought RenderTextWin::GetRunContainingXCoord needed visual run order. Logical run order is fine as-is, because it checks the range of x bounds. (RenderTextHarfBuzz should probably do the same thing to be safe/correct) BUG=NONE TEST=NONE R=asvitkine@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=269941

Patch Set 1 #

Patch Set 2 : Refine the test; cleanup debugging code. #

Total comments: 2

Patch Set 3 : EnsureLayout in RenderTextWin::GetGlyphBounds; cleanup. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -7 lines) Patch
M ui/gfx/render_text_unittest.cc View 1 2 3 chunks +18 lines, -7 lines 0 comments Download
M ui/gfx/render_text_win.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
msw
Hey Alexei, please take a look; thanks! Cem, please take note for RenderTextHarfBuzz.
6 years, 7 months ago (2014-05-10 05:21:30 UTC) #1
Alexei Svitkine (slow)
https://codereview.chromium.org/276123003/diff/10001/ui/gfx/render_text_unittest.cc File ui/gfx/render_text_unittest.cc (right): https://codereview.chromium.org/276123003/diff/10001/ui/gfx/render_text_unittest.cc#newcode956 ui/gfx/render_text_unittest.cc:956: render_text->EnsureLayout(); GetGlyphBounds() and FindCursorPosition() are both public methods. So ...
6 years, 7 months ago (2014-05-12 15:23:26 UTC) #2
msw
Done, please take another look; thanks! https://codereview.chromium.org/276123003/diff/10001/ui/gfx/render_text_unittest.cc File ui/gfx/render_text_unittest.cc (right): https://codereview.chromium.org/276123003/diff/10001/ui/gfx/render_text_unittest.cc#newcode956 ui/gfx/render_text_unittest.cc:956: render_text->EnsureLayout(); On 2014/05/12 ...
6 years, 7 months ago (2014-05-12 17:15:56 UTC) #3
Alexei Svitkine (slow)
LGTM, thanks!
6 years, 7 months ago (2014-05-12 17:17:41 UTC) #4
msw
The CQ bit was checked by msw@chromium.org
6 years, 7 months ago (2014-05-12 17:18:32 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/msw@chromium.org/276123003/30001
6 years, 7 months ago (2014-05-12 17:19:36 UTC) #6
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-12 20:46:44 UTC) #7
commit-bot: I haz the power
6 years, 7 months ago (2014-05-13 00:50:53 UTC) #8
Message was sent while issue was closed.
Change committed as 269941

Powered by Google App Engine
This is Rietveld 408576698