| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 NGLineBuilder_h | 5 #ifndef NGLineBuilder_h |
| 6 #define NGLineBuilder_h | 6 #define NGLineBuilder_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/layout/ng/ng_physical_fragment.h" | 9 #include "core/layout/ng/ng_physical_fragment.h" |
| 10 #include "core/layout/ng/ng_units.h" | 10 #include "core/layout/ng/ng_units.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 // |SetBreakOpportunity| can mark the last confirmed offset that can fit. | 28 // |SetBreakOpportunity| can mark the last confirmed offset that can fit. |
| 29 class CORE_EXPORT NGLineBuilder final | 29 class CORE_EXPORT NGLineBuilder final |
| 30 : public GarbageCollectedFinalized<NGLineBuilder> { | 30 : public GarbageCollectedFinalized<NGLineBuilder> { |
| 31 public: | 31 public: |
| 32 NGLineBuilder(NGInlineNode*, const NGConstraintSpace*); | 32 NGLineBuilder(NGInlineNode*, const NGConstraintSpace*); |
| 33 | 33 |
| 34 const NGConstraintSpace& ConstraintSpace() const { | 34 const NGConstraintSpace& ConstraintSpace() const { |
| 35 return *constraint_space_; | 35 return *constraint_space_; |
| 36 } | 36 } |
| 37 | 37 |
| 38 LayoutUnit MaxInlineSize() const { return max_inline_size_; } |
| 39 |
| 38 // Returns if the current items fit on a line. | 40 // Returns if the current items fit on a line. |
| 39 bool CanFitOnLine() const; | 41 bool CanFitOnLine() const; |
| 40 | 42 |
| 41 // Returns if there were any items. | 43 // Returns if there were any items. |
| 42 bool HasItems() const; | 44 bool HasItems() const; |
| 43 | 45 |
| 44 // Set the start offset. | 46 // Set the start offset. |
| 45 // Set the end as well, and therefore empties the current line. | 47 // Set the end as well, and therefore empties the current line. |
| 46 void SetStart(unsigned index, unsigned offset); | 48 void SetStart(unsigned index, unsigned offset); |
| 47 | 49 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 FontBaseline baseline_type_; | 158 FontBaseline baseline_type_; |
| 157 | 159 |
| 158 #if DCHECK_IS_ON() | 160 #if DCHECK_IS_ON() |
| 159 unsigned is_bidi_reordered_ : 1; | 161 unsigned is_bidi_reordered_ : 1; |
| 160 #endif | 162 #endif |
| 161 }; | 163 }; |
| 162 | 164 |
| 163 } // namespace blink | 165 } // namespace blink |
| 164 | 166 |
| 165 #endif // NGLineBuilder_h | 167 #endif // NGLineBuilder_h |
| OLD | NEW |