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_line_height_metrics.h" | 9 #include "core/layout/ng/inline/ng_line_height_metrics.h" |
10 #include "platform/wtf/Allocator.h" | 10 #include "platform/wtf/Allocator.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 public: | 22 public: |
23 NGLineBoxFragmentBuilder(NGInlineNode*, const NGLineHeightMetrics&); | 23 NGLineBoxFragmentBuilder(NGInlineNode*, const NGLineHeightMetrics&); |
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 | 33 |
33 const Vector<RefPtr<NGPhysicalFragment>>& Children() const { | 34 const Vector<RefPtr<NGPhysicalFragment>>& Children() const { |
34 return children_; | 35 return children_; |
35 } | 36 } |
36 | 37 |
37 void UniteMetrics(const NGLineHeightMetrics&); | 38 void UniteMetrics(const NGLineHeightMetrics&); |
38 const NGLineHeightMetrics& Metrics() const { return metrics_; } | 39 const NGLineHeightMetrics& Metrics() const { return metrics_; } |
39 | 40 |
40 // Set the break token for the fragment to build. | 41 // Set the break token for the fragment to build. |
41 // A finished break token will be attached if not set. | 42 // A finished break token will be attached if not set. |
(...skipping 13 matching lines...) Expand all Loading... |
55 Vector<NGLogicalOffset> offsets_; | 56 Vector<NGLogicalOffset> offsets_; |
56 | 57 |
57 NGLineHeightMetrics metrics_; | 58 NGLineHeightMetrics metrics_; |
58 | 59 |
59 RefPtr<NGInlineBreakToken> break_token_; | 60 RefPtr<NGInlineBreakToken> break_token_; |
60 }; | 61 }; |
61 | 62 |
62 } // namespace blink | 63 } // namespace blink |
63 | 64 |
64 #endif // NGLineBoxFragmentBuilder | 65 #endif // NGLineBoxFragmentBuilder |
OLD | NEW |