OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 ShapingLineBreaker_h | 5 #ifndef ShapingLineBreaker_h |
6 #define ShapingLineBreaker_h | 6 #define ShapingLineBreaker_h |
7 | 7 |
8 #include "platform/LayoutUnit.h" | 8 #include "platform/LayoutUnit.h" |
9 #include "platform/PlatformExport.h" | 9 #include "platform/PlatformExport.h" |
10 #include "platform/wtf/text/AtomicString.h" | 10 #include "platform/wtf/text/AtomicString.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 ~ShapingLineBreaker() {} | 38 ~ShapingLineBreaker() {} |
39 | 39 |
40 // Shapes a line of text by finding a valid and appropriate break opportunity | 40 // Shapes a line of text by finding a valid and appropriate break opportunity |
41 // based on the shaping results for the entire paragraph. | 41 // based on the shaping results for the entire paragraph. |
42 // The output parameter breakOffset indicates the resulting break offset. | 42 // The output parameter breakOffset indicates the resulting break offset. |
43 PassRefPtr<ShapeResult> ShapeLine(unsigned start_offset, | 43 PassRefPtr<ShapeResult> ShapeLine(unsigned start_offset, |
44 LayoutUnit available_space, | 44 LayoutUnit available_space, |
45 unsigned* break_offset); | 45 unsigned* break_offset); |
46 | 46 |
47 private: | 47 private: |
48 | |
49 const HarfBuzzShaper* shaper_; | 48 const HarfBuzzShaper* shaper_; |
50 const Font* font_; | 49 const Font* font_; |
51 const ShapeResult* result_; | 50 const ShapeResult* result_; |
52 const LazyLineBreakIterator* break_iterator_; | 51 const LazyLineBreakIterator* break_iterator_; |
53 String text_; | 52 String text_; |
54 }; | 53 }; |
55 | 54 |
56 } // namespace blink | 55 } // namespace blink |
57 | 56 |
58 #endif // ShapingLineBreaker_h | 57 #endif // ShapingLineBreaker_h |
OLD | NEW |