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

Unified Diff: ui/gfx/render_text_win.cc

Issue 276123003: Add a unit tests for RenderText::FindCursorPosition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: EnsureLayout in RenderTextWin::GetGlyphBounds; cleanup. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/render_text_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text_win.cc
diff --git a/ui/gfx/render_text_win.cc b/ui/gfx/render_text_win.cc
index 19b2caaee5dcb7d7a5d6de3f93432609a59d7708..646be6a0f1c0011225905ad05a5913fb87802354 100644
--- a/ui/gfx/render_text_win.cc
+++ b/ui/gfx/render_text_win.cc
@@ -658,6 +658,7 @@ SelectionModel RenderTextWin::AdjacentWordSelectionModel(
}
Range RenderTextWin::GetGlyphBounds(size_t index) {
+ EnsureLayout();
const size_t run_index =
GetRunContainingCaret(SelectionModel(index, CURSOR_FORWARD));
// Return edge bounds if the index is invalid or beyond the layout text size.
« no previous file with comments | « ui/gfx/render_text_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698