OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/logging.h" | 9 #include "base/logging.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 89 |
90 namespace internal { | 90 namespace internal { |
91 | 91 |
92 TextRun::TextRun() | 92 TextRun::TextRun() |
93 : strike(false), | 93 : strike(false), |
94 underline(false), | 94 underline(false), |
95 width(0), | 95 width(0), |
96 preceding_run_widths(0), | 96 preceding_run_widths(0), |
97 glyph_count(0), | 97 glyph_count(0), |
98 script_cache(NULL) { | 98 script_cache(NULL) { |
| 99 memset(&script_analysis, 0, sizeof(script_analysis)); |
| 100 memset(&abc_widths, 0, sizeof(abc_widths)); |
99 } | 101 } |
100 | 102 |
101 TextRun::~TextRun() { | 103 TextRun::~TextRun() { |
102 ScriptFreeCache(&script_cache); | 104 ScriptFreeCache(&script_cache); |
103 } | 105 } |
104 | 106 |
105 } // namespace internal | 107 } // namespace internal |
106 | 108 |
107 RenderTextWin::RenderTextWin() | 109 RenderTextWin::RenderTextWin() |
108 : RenderText(), | 110 : RenderText(), |
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
742 internal::TextRun* next = runs_[visual_to_logical_[visual_index + 1]]; | 744 internal::TextRun* next = runs_[visual_to_logical_[visual_index + 1]]; |
743 return next->script_analysis.fRTL ? LastSelectionModelInsideRun(next) : | 745 return next->script_analysis.fRTL ? LastSelectionModelInsideRun(next) : |
744 FirstSelectionModelInsideRun(next); | 746 FirstSelectionModelInsideRun(next); |
745 } | 747 } |
746 | 748 |
747 RenderText* RenderText::CreateRenderText() { | 749 RenderText* RenderText::CreateRenderText() { |
748 return new RenderTextWin; | 750 return new RenderTextWin; |
749 } | 751 } |
750 | 752 |
751 } // namespace gfx | 753 } // namespace gfx |
OLD | NEW |