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

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

Issue 2764753007: [LayoutNG] Add NGLineBoxFragment (Closed)
Patch Set: Rebase again as other CLs landed faster Created 3 years, 9 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef NGPhysicalLineBoxFragment_h
6 #define NGPhysicalLineBoxFragment_h
7
8 #include "core/CoreExport.h"
9 #include "core/layout/ng/geometry/ng_logical_offset.h"
10 #include "core/layout/ng/ng_line_height_metrics.h"
11 #include "core/layout/ng/ng_physical_fragment.h"
12
13 namespace blink {
14
15 class CORE_EXPORT NGPhysicalLineBoxFragment final : public NGPhysicalFragment {
16 public:
17 // This modifies the passed-in children vector.
18 NGPhysicalLineBoxFragment(NGPhysicalSize size,
19 Vector<RefPtr<NGPhysicalFragment>>& children,
20 const NGLineHeightMetrics&,
21 RefPtr<NGBreakToken> break_token = nullptr);
22
23 const Vector<RefPtr<NGPhysicalFragment>>& Children() const {
24 return children_;
25 }
26
27 const NGLineHeightMetrics& Metrics() const { return metrics_; }
28
29 private:
30 Vector<RefPtr<NGPhysicalFragment>> children_;
31
32 NGLineHeightMetrics metrics_;
33 };
34
35 DEFINE_TYPE_CASTS(NGPhysicalLineBoxFragment,
36 NGPhysicalFragment,
37 fragment,
38 fragment->Type() == NGPhysicalFragment::kFragmentLineBox,
39 fragment.Type() == NGPhysicalFragment::kFragmentLineBox);
40
41 } // namespace blink
42
43 #endif // NGPhysicalBoxFragment_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698