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

Unified Diff: ui/gfx/render_text_win.cc

Issue 15746013: Fix cursor positioning regression from r201136. GetCursorPos() shouldn't assume (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 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_win.h ('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
===================================================================
--- ui/gfx/render_text_win.cc (revision 201137)
+++ ui/gfx/render_text_win.cc (working copy)
@@ -342,17 +342,14 @@
ResetLayout();
}
-void RenderTextWin::GetGlyphBounds(size_t index,
- ui::Range* xspan,
- int* height) {
+ui::Range RenderTextWin::GetGlyphBounds(size_t index) {
const size_t run_index =
GetRunContainingCaret(SelectionModel(index, CURSOR_FORWARD));
DCHECK_LT(run_index, runs_.size());
internal::TextRun* run = runs_[run_index];
const size_t layout_index = TextIndexToLayoutIndex(index);
- xspan->set_start(GetGlyphXBoundary(run, layout_index, false));
- xspan->set_end(GetGlyphXBoundary(run, layout_index, true));
- *height = run->font.GetHeight();
+ return ui::Range(GetGlyphXBoundary(run, layout_index, false),
+ GetGlyphXBoundary(run, layout_index, true));
}
std::vector<Rect> RenderTextWin::GetSubstringBounds(const ui::Range& range) {
« no previous file with comments | « ui/gfx/render_text_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698