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

Side by Side Diff: ui/gfx/render_text_mac.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/gfx/render_text_mac.h" 5 #include "ui/gfx/render_text_mac.h"
6 6
7 #include <ApplicationServices/ApplicationServices.h> 7 #include <ApplicationServices/ApplicationServices.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <utility> 10 #include <utility>
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 return SelectionModel(); 61 return SelectionModel();
62 } 62 }
63 63
64 SelectionModel RenderTextMac::AdjacentWordSelectionModel( 64 SelectionModel RenderTextMac::AdjacentWordSelectionModel(
65 const SelectionModel& selection, 65 const SelectionModel& selection,
66 VisualCursorDirection direction) { 66 VisualCursorDirection direction) {
67 // TODO(asvitkine): Implement this. http://crbug.com/131618 67 // TODO(asvitkine): Implement this. http://crbug.com/131618
68 return SelectionModel(); 68 return SelectionModel();
69 } 69 }
70 70
71 void RenderTextMac::GetGlyphBounds(size_t index, 71 ui::Range RenderTextMac::GetGlyphBounds(size_t index) {
72 ui::Range* xspan,
73 int* height) {
74 // TODO(asvitkine): Implement this. http://crbug.com/131618 72 // TODO(asvitkine): Implement this. http://crbug.com/131618
msw 2013/05/23 21:07:27 nit: This probably needs a return statement.
Peter Kasting 2013/05/23 21:09:11 Yes.
75 } 73 }
76 74
77 std::vector<Rect> RenderTextMac::GetSubstringBounds(const ui::Range& range) { 75 std::vector<Rect> RenderTextMac::GetSubstringBounds(const ui::Range& range) {
78 // TODO(asvitkine): Implement this. http://crbug.com/131618 76 // TODO(asvitkine): Implement this. http://crbug.com/131618
79 return std::vector<Rect>(); 77 return std::vector<Rect>();
80 } 78 }
81 79
82 size_t RenderTextMac::TextIndexToLayoutIndex(size_t index) const { 80 size_t RenderTextMac::TextIndexToLayoutIndex(size_t index) const {
83 // TODO(asvitkine): Implement this. http://crbug.com/131618 81 // TODO(asvitkine): Implement this. http://crbug.com/131618
84 return index; 82 return index;
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 run_origin.offset(run_width, 0); 319 run_origin.offset(run_width, 0);
322 } 320 }
323 runs_valid_ = true; 321 runs_valid_ = true;
324 } 322 }
325 323
326 RenderText* RenderText::CreateInstance() { 324 RenderText* RenderText::CreateInstance() {
327 return new RenderTextMac; 325 return new RenderTextMac;
328 } 326 }
329 327
330 } // namespace gfx 328 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698