| 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 NGLineBoxFragmentBuilder_h | 5 #ifndef NGLineBoxFragmentBuilder_h |
| 6 #define NGLineBoxFragmentBuilder_h | 6 #define NGLineBoxFragmentBuilder_h |
| 7 | 7 |
| 8 #include "core/layout/ng/geometry/ng_logical_offset.h" | 8 #include "core/layout/ng/geometry/ng_logical_offset.h" |
| 9 #include "core/layout/ng/inline/ng_inline_break_token.h" | 9 #include "core/layout/ng/inline/ng_inline_break_token.h" |
| 10 #include "core/layout/ng/inline/ng_line_height_metrics.h" | 10 #include "core/layout/ng/inline/ng_line_height_metrics.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 NGLineBoxFragmentBuilder& SetDirection(TextDirection); | 25 NGLineBoxFragmentBuilder& SetDirection(TextDirection); |
| 26 | 26 |
| 27 NGLineBoxFragmentBuilder& SetInlineSize(LayoutUnit); | 27 NGLineBoxFragmentBuilder& SetInlineSize(LayoutUnit); |
| 28 | 28 |
| 29 NGLineBoxFragmentBuilder& AddChild(RefPtr<NGPhysicalFragment>, | 29 NGLineBoxFragmentBuilder& AddChild(RefPtr<NGPhysicalFragment>, |
| 30 const NGLogicalOffset&); | 30 const NGLogicalOffset&); |
| 31 void MoveChildrenInBlockDirection(LayoutUnit); | 31 void MoveChildrenInBlockDirection(LayoutUnit); |
| 32 void MoveChildrenInBlockDirection(LayoutUnit, unsigned start, unsigned end); | 32 void MoveChildrenInBlockDirection(LayoutUnit, unsigned start, unsigned end); |
| 33 | 33 |
| 34 // Moves children in inline direction to adjust to text-align property. |
| 35 void MoveChildrenInInlineDirection(LayoutUnit available_inline_size); |
| 36 |
| 34 const Vector<RefPtr<NGPhysicalFragment>>& Children() const { | 37 const Vector<RefPtr<NGPhysicalFragment>>& Children() const { |
| 35 return children_; | 38 return children_; |
| 36 } | 39 } |
| 37 | 40 |
| 38 void SetMetrics(const NGLineHeightMetrics&); | 41 void SetMetrics(const NGLineHeightMetrics&); |
| 39 const NGLineHeightMetrics& Metrics() const { return metrics_; } | 42 const NGLineHeightMetrics& Metrics() const { return metrics_; } |
| 40 | 43 |
| 41 // Set the break token for the fragment to build. | 44 // Set the break token for the fragment to build. |
| 42 // A finished break token will be attached if not set. | 45 // A finished break token will be attached if not set. |
| 43 void SetBreakToken(RefPtr<NGInlineBreakToken>); | 46 void SetBreakToken(RefPtr<NGInlineBreakToken>); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 56 Vector<NGLogicalOffset> offsets_; | 59 Vector<NGLogicalOffset> offsets_; |
| 57 | 60 |
| 58 NGLineHeightMetrics metrics_; | 61 NGLineHeightMetrics metrics_; |
| 59 | 62 |
| 60 RefPtr<NGInlineBreakToken> break_token_; | 63 RefPtr<NGInlineBreakToken> break_token_; |
| 61 }; | 64 }; |
| 62 | 65 |
| 63 } // namespace blink | 66 } // namespace blink |
| 64 | 67 |
| 65 #endif // NGLineBoxFragmentBuilder | 68 #endif // NGLineBoxFragmentBuilder |
| OLD | NEW |