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

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

Issue 2507363003: MacViews: Fix flaky label selection tests. (Closed)
Patch Set: -- Created 4 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | 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.h" 5 #include "ui/gfx/render_text.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <climits> 10 #include <climits>
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 423
424 // static 424 // static
425 constexpr base::char16 RenderText::kPasswordReplacementChar; 425 constexpr base::char16 RenderText::kPasswordReplacementChar;
426 426
427 RenderText::~RenderText() { 427 RenderText::~RenderText() {
428 } 428 }
429 429
430 // static 430 // static
431 RenderText* RenderText::CreateInstance() { 431 RenderText* RenderText::CreateInstance() {
432 #if defined(OS_MACOSX) 432 #if defined(OS_MACOSX)
433 static const bool use_native = 433 const bool use_native = !base::CommandLine::ForCurrentProcess()->HasSwitch(
434 !base::CommandLine::ForCurrentProcess()->HasSwitch( 434 switches::kEnableHarfBuzzRenderText);
435 switches::kEnableHarfBuzzRenderText);
436 if (use_native) 435 if (use_native)
437 return new RenderTextMac; 436 return new RenderTextMac;
438 #endif // defined(OS_MACOSX) 437 #endif // defined(OS_MACOSX)
439 return new RenderTextHarfBuzz; 438 return new RenderTextHarfBuzz;
440 } 439 }
441 440
442 // static 441 // static
443 RenderText* RenderText::CreateInstanceForEditing() { 442 RenderText* RenderText::CreateInstanceForEditing() {
444 return new RenderTextHarfBuzz; 443 return new RenderTextHarfBuzz;
445 } 444 }
(...skipping 1244 matching lines...) Expand 10 before | Expand all | Expand 10 after
1690 1689
1691 for (; range_max < length; ++range_max) 1690 for (; range_max < length; ++range_max)
1692 if (iter.IsEndOfWord(range_max) || iter.IsStartOfWord(range_max)) 1691 if (iter.IsEndOfWord(range_max) || iter.IsStartOfWord(range_max))
1693 break; 1692 break;
1694 1693
1695 return range.is_reversed() ? Range(range_max, range_min) 1694 return range.is_reversed() ? Range(range_max, range_min)
1696 : Range(range_min, range_max); 1695 : Range(range_min, range_max);
1697 } 1696 }
1698 1697
1699 } // namespace gfx 1698 } // namespace gfx
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698