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

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

Issue 14264004: Re-land: NativeTextfieldViews: Show the drop cursor when dragging text (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 4 Created 7 years, 8 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
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 return index; 84 return index;
85 } 85 }
86 86
87 size_t RenderTextMac::LayoutIndexToTextIndex(size_t index) const { 87 size_t RenderTextMac::LayoutIndexToTextIndex(size_t index) const {
88 // TODO(asvitkine): Implement this. http://crbug.com/131618 88 // TODO(asvitkine): Implement this. http://crbug.com/131618
89 return index; 89 return index;
90 } 90 }
91 91
92 bool RenderTextMac::IsCursorablePosition(size_t position) { 92 bool RenderTextMac::IsCursorablePosition(size_t position) {
93 // TODO(asvitkine): Implement this. http://crbug.com/131618 93 // TODO(asvitkine): Implement this. http://crbug.com/131618
94 return false; 94 return true;
95 } 95 }
96 96
97 void RenderTextMac::ResetLayout() { 97 void RenderTextMac::ResetLayout() {
98 line_.reset(); 98 line_.reset();
99 attributes_.reset(); 99 attributes_.reset();
100 runs_.clear(); 100 runs_.clear();
101 runs_valid_ = false; 101 runs_valid_ = false;
102 } 102 }
103 103
104 void RenderTextMac::EnsureLayout() { 104 void RenderTextMac::EnsureLayout() {
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 run_origin.offset(run_width, 0); 319 run_origin.offset(run_width, 0);
320 } 320 }
321 runs_valid_ = true; 321 runs_valid_ = true;
322 } 322 }
323 323
324 RenderText* RenderText::CreateInstance() { 324 RenderText* RenderText::CreateInstance() {
325 return new RenderTextMac; 325 return new RenderTextMac;
326 } 326 }
327 327
328 } // namespace gfx 328 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698