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

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
« no previous file with comments | « ui/gfx/render_text_mac.h ('k') | ui/gfx/render_text_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
73 return ui::Range();
75 } 74 }
76 75
77 std::vector<Rect> RenderTextMac::GetSubstringBounds(const ui::Range& range) { 76 std::vector<Rect> RenderTextMac::GetSubstringBounds(const ui::Range& range) {
78 // TODO(asvitkine): Implement this. http://crbug.com/131618 77 // TODO(asvitkine): Implement this. http://crbug.com/131618
79 return std::vector<Rect>(); 78 return std::vector<Rect>();
80 } 79 }
81 80
82 size_t RenderTextMac::TextIndexToLayoutIndex(size_t index) const { 81 size_t RenderTextMac::TextIndexToLayoutIndex(size_t index) const {
83 // TODO(asvitkine): Implement this. http://crbug.com/131618 82 // TODO(asvitkine): Implement this. http://crbug.com/131618
84 return index; 83 return index;
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 run_origin.offset(run_width, 0); 320 run_origin.offset(run_width, 0);
322 } 321 }
323 runs_valid_ = true; 322 runs_valid_ = true;
324 } 323 }
325 324
326 RenderText* RenderText::CreateInstance() { 325 RenderText* RenderText::CreateInstance() {
327 return new RenderTextMac; 326 return new RenderTextMac;
328 } 327 }
329 328
330 } // namespace gfx 329 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/render_text_mac.h ('k') | ui/gfx/render_text_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698