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

Side by Side Diff: ui/gfx/render_text_mac.cc

Issue 21140002: Consolidate RenderText adjacent word selection model code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup comments and add a unit test.~ Created 7 years, 4 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 return spans; 54 return spans;
55 } 55 }
56 56
57 SelectionModel RenderTextMac::AdjacentCharSelectionModel( 57 SelectionModel RenderTextMac::AdjacentCharSelectionModel(
58 const SelectionModel& selection, 58 const SelectionModel& selection,
59 VisualCursorDirection direction) { 59 VisualCursorDirection direction) {
60 // TODO(asvitkine): Implement this. http://crbug.com/131618 60 // TODO(asvitkine): Implement this. http://crbug.com/131618
61 return SelectionModel(); 61 return SelectionModel();
62 } 62 }
63 63
64 SelectionModel RenderTextMac::AdjacentWordSelectionModel(
65 const SelectionModel& selection,
66 VisualCursorDirection direction) {
67 // TODO(asvitkine): Implement this. http://crbug.com/131618
68 return SelectionModel();
69 }
70
71 ui::Range RenderTextMac::GetGlyphBounds(size_t index) { 64 ui::Range RenderTextMac::GetGlyphBounds(size_t index) {
72 // TODO(asvitkine): Implement this. http://crbug.com/131618 65 // TODO(asvitkine): Implement this. http://crbug.com/131618
73 return ui::Range(); 66 return ui::Range();
74 } 67 }
75 68
76 std::vector<Rect> RenderTextMac::GetSubstringBounds(const ui::Range& range) { 69 std::vector<Rect> RenderTextMac::GetSubstringBounds(const ui::Range& range) {
77 // TODO(asvitkine): Implement this. http://crbug.com/131618 70 // TODO(asvitkine): Implement this. http://crbug.com/131618
78 return std::vector<Rect>(); 71 return std::vector<Rect>();
79 } 72 }
80 73
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 run_origin.offset(run_width, 0); 317 run_origin.offset(run_width, 0);
325 } 318 }
326 runs_valid_ = true; 319 runs_valid_ = true;
327 } 320 }
328 321
329 RenderText* RenderText::CreateInstance() { 322 RenderText* RenderText::CreateInstance() {
330 return new RenderTextMac; 323 return new RenderTextMac;
331 } 324 }
332 325
333 } // namespace gfx 326 } // 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