| 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 PassRefPtr<ShapeResult> ShapeToEnd(unsigned start, |
| 49 LayoutUnit start_position, |
| 50 unsigned range_end); |
| 48 | 51 |
| 49 const HarfBuzzShaper* shaper_; | 52 const HarfBuzzShaper* shaper_; |
| 50 const Font* font_; | 53 const Font* font_; |
| 51 const ShapeResult* result_; | 54 const ShapeResult* result_; |
| 52 const LazyLineBreakIterator* break_iterator_; | 55 const LazyLineBreakIterator* break_iterator_; |
| 53 String text_; | 56 String text_; |
| 54 }; | 57 }; |
| 55 | 58 |
| 56 } // namespace blink | 59 } // namespace blink |
| 57 | 60 |
| 58 #endif // ShapingLineBreaker_h | 61 #endif // ShapingLineBreaker_h |
| OLD | NEW |