Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: third_party/WebKit/Source/core/layout/ng/inline/ng_line_box_fragment_builder.h

Issue 2803433002: [LayoutNG] Initial support for the 'vertical-align' property (Closed)
Patch Set: Move all On*() to NGInlineLayoutStateStack Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_line_height_metrics.h" 10 #include "core/layout/ng/inline/ng_line_height_metrics.h"
10 #include "platform/wtf/Allocator.h" 11 #include "platform/wtf/Allocator.h"
11 12
12 namespace blink { 13 namespace blink {
13 14
14 class NGInlineBreakToken;
15 class NGInlineNode; 15 class NGInlineNode;
16 class NGPhysicalFragment; 16 class NGPhysicalFragment;
17 class NGPhysicalLineBoxFragment; 17 class NGPhysicalLineBoxFragment;
18 18
19 class CORE_EXPORT NGLineBoxFragmentBuilder final { 19 class CORE_EXPORT NGLineBoxFragmentBuilder final {
20 STACK_ALLOCATED(); 20 STACK_ALLOCATED();
21 21
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698