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

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

Issue 111373008: Update some uses of char16 to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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_unittest.cc ('k') | ui/gfx/text_elider_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_win.h" 5 #include "ui/gfx/render_text_win.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/i18n/break_iterator.h" 9 #include "base/i18n/break_iterator.h"
10 #include "base/i18n/char_iterator.h" 10 #include "base/i18n/char_iterator.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 return; 114 return;
115 } 115 }
116 116
117 const int current_style = (font->GetStyle() & kStyleMask); 117 const int current_style = (font->GetStyle() & kStyleMask);
118 const int current_size = font->GetFontSize(); 118 const int current_size = font->GetFontSize();
119 if (current_style != target_style || current_size != font_size) 119 if (current_style != target_style || current_size != font_size)
120 *font = font->DeriveFont(font_size - current_size, target_style); 120 *font = font->DeriveFont(font_size - current_size, target_style);
121 } 121 }
122 122
123 // Returns true if |c| is a Unicode BiDi control character. 123 // Returns true if |c| is a Unicode BiDi control character.
124 bool IsUnicodeBidiControlCharacter(char16 c) { 124 bool IsUnicodeBidiControlCharacter(base::char16 c) {
125 return c == base::i18n::kRightToLeftMark || 125 return c == base::i18n::kRightToLeftMark ||
126 c == base::i18n::kLeftToRightMark || 126 c == base::i18n::kLeftToRightMark ||
127 c == base::i18n::kLeftToRightEmbeddingMark || 127 c == base::i18n::kLeftToRightEmbeddingMark ||
128 c == base::i18n::kRightToLeftEmbeddingMark || 128 c == base::i18n::kRightToLeftEmbeddingMark ||
129 c == base::i18n::kPopDirectionalFormatting || 129 c == base::i18n::kPopDirectionalFormatting ||
130 c == base::i18n::kLeftToRightOverride || 130 c == base::i18n::kLeftToRightOverride ||
131 c == base::i18n::kRightToLeftOverride; 131 c == base::i18n::kRightToLeftOverride;
132 } 132 }
133 133
134 // Returns the corresponding glyph range of the given character range. 134 // Returns the corresponding glyph range of the given character range.
(...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after
1269 size_t position = LayoutIndexToTextIndex(run->range.end()); 1269 size_t position = LayoutIndexToTextIndex(run->range.end());
1270 position = IndexOfAdjacentGrapheme(position, CURSOR_BACKWARD); 1270 position = IndexOfAdjacentGrapheme(position, CURSOR_BACKWARD);
1271 return SelectionModel(position, CURSOR_FORWARD); 1271 return SelectionModel(position, CURSOR_FORWARD);
1272 } 1272 }
1273 1273
1274 RenderText* RenderText::CreateInstance() { 1274 RenderText* RenderText::CreateInstance() {
1275 return new RenderTextWin; 1275 return new RenderTextWin;
1276 } 1276 }
1277 1277
1278 } // namespace gfx 1278 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/render_text_unittest.cc ('k') | ui/gfx/text_elider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698