| OLD | NEW |
| 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 #ifndef UI_GFX_RENDER_TEXT_WIN_H_ | 5 #ifndef UI_GFX_RENDER_TEXT_WIN_H_ |
| 6 #define UI_GFX_RENDER_TEXT_WIN_H_ | 6 #define UI_GFX_RENDER_TEXT_WIN_H_ |
| 7 | 7 |
| 8 #include <usp10.h> | 8 #include <usp10.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 | 93 |
| 94 void ItemizeLogicalText(); | 94 void ItemizeLogicalText(); |
| 95 void LayoutVisualText(); | 95 void LayoutVisualText(); |
| 96 void LayoutTextRun(internal::TextRun* run); | 96 void LayoutTextRun(internal::TextRun* run); |
| 97 | 97 |
| 98 // Helper function that calls |ScriptShape()| on the run, which has logic to | 98 // Helper function that calls |ScriptShape()| on the run, which has logic to |
| 99 // handle E_OUTOFMEMORY return codes. | 99 // handle E_OUTOFMEMORY return codes. |
| 100 HRESULT ShapeTextRunWithFont(internal::TextRun* run, const Font& font); | 100 HRESULT ShapeTextRunWithFont(internal::TextRun* run, const Font& font); |
| 101 | 101 |
| 102 // Returns the number of characters in |run| that have missing glyphs. | 102 // Returns the number of characters in |run| that have missing glyphs. |
| 103 int CountCharsWithMissingGlyphs(internal::TextRun* run) const; | 103 int CountCharsWithMissingGlyphs(internal::TextRun* run, |
| 104 HRESULT shaping_result) const; |
| 104 | 105 |
| 105 // Return the run index that contains the argument; or the length of the | 106 // Return the run index that contains the argument; or the length of the |
| 106 // |runs_| vector if argument exceeds the text length or width. | 107 // |runs_| vector if argument exceeds the text length or width. |
| 107 size_t GetRunContainingCaret(const SelectionModel& caret) const; | 108 size_t GetRunContainingCaret(const SelectionModel& caret) const; |
| 108 size_t GetRunContainingXCoord(int x) const; | 109 size_t GetRunContainingXCoord(int x) const; |
| 109 | 110 |
| 110 // Given a |run|, returns the SelectionModel that contains the logical first | 111 // Given a |run|, returns the SelectionModel that contains the logical first |
| 111 // or last caret position inside (not at a boundary of) the run. | 112 // or last caret position inside (not at a boundary of) the run. |
| 112 // The returned value represents a cursor/caret position without a selection. | 113 // The returned value represents a cursor/caret position without a selection. |
| 113 SelectionModel FirstSelectionModelInsideRun(const internal::TextRun* run); | 114 SelectionModel FirstSelectionModelInsideRun(const internal::TextRun* run); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 135 scoped_ptr<int[]> logical_to_visual_; | 136 scoped_ptr<int[]> logical_to_visual_; |
| 136 | 137 |
| 137 bool needs_layout_; | 138 bool needs_layout_; |
| 138 | 139 |
| 139 DISALLOW_COPY_AND_ASSIGN(RenderTextWin); | 140 DISALLOW_COPY_AND_ASSIGN(RenderTextWin); |
| 140 }; | 141 }; |
| 141 | 142 |
| 142 } // namespace gfx | 143 } // namespace gfx |
| 143 | 144 |
| 144 #endif // UI_GFX_RENDER_TEXT_WIN_H_ | 145 #endif // UI_GFX_RENDER_TEXT_WIN_H_ |
| OLD | NEW |