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 NGLineBreaker_h | 5 #ifndef NGLineBreaker_h |
6 #define NGLineBreaker_h | 6 #define NGLineBreaker_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/layout/ng/inline/ng_inline_item_result.h" | 9 #include "core/layout/ng/inline/ng_inline_item_result.h" |
10 #include "core/layout/ng/inline/ng_inline_node.h" | 10 #include "core/layout/ng/inline/ng_inline_node.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 void Rewind(NGLineInfo*, unsigned new_end); | 82 void Rewind(NGLineInfo*, unsigned new_end); |
83 | 83 |
84 void SetShouldCreateLineBox(); | 84 void SetShouldCreateLineBox(); |
85 | 85 |
86 void SetCurrentStyle(const ComputedStyle&); | 86 void SetCurrentStyle(const ComputedStyle&); |
87 | 87 |
88 void MoveToNextOf(const NGInlineItem&); | 88 void MoveToNextOf(const NGInlineItem&); |
89 void MoveToNextOf(const NGInlineItemResult&); | 89 void MoveToNextOf(const NGInlineItemResult&); |
90 void SkipCollapsibleWhitespaces(); | 90 void SkipCollapsibleWhitespaces(); |
91 | 91 |
| 92 bool IsFirstFormattedLine() const; |
| 93 |
92 NGInlineNode node_; | 94 NGInlineNode node_; |
93 NGConstraintSpace* constraint_space_; | 95 NGConstraintSpace* constraint_space_; |
94 NGFragmentBuilder* container_builder_; | 96 NGFragmentBuilder* container_builder_; |
95 const AtomicString locale_; | 97 const AtomicString locale_; |
96 unsigned item_index_; | 98 unsigned item_index_; |
97 unsigned offset_; | 99 unsigned offset_; |
98 LayoutUnit position_; | 100 LayoutUnit position_; |
99 WTF::Optional<NGLayoutOpportunity> opportunity_; | 101 WTF::Optional<NGLayoutOpportunity> opportunity_; |
100 NGLogicalOffset content_offset_; | 102 NGLogicalOffset content_offset_; |
101 LazyLineBreakIterator break_iterator_; | 103 LazyLineBreakIterator break_iterator_; |
102 HarfBuzzShaper shaper_; | 104 HarfBuzzShaper shaper_; |
103 ShapeResultSpacing<String> spacing_; | 105 ShapeResultSpacing<String> spacing_; |
104 | 106 |
105 unsigned auto_wrap_ : 1; | 107 bool auto_wrap_; |
106 unsigned should_create_line_box_ : 1; | 108 bool should_create_line_box_; |
| 109 bool is_after_forced_break_; |
107 }; | 110 }; |
108 | 111 |
109 } // namespace blink | 112 } // namespace blink |
110 | 113 |
111 #endif // NGLineBreaker_h | 114 #endif // NGLineBreaker_h |
OLD | NEW |