OLD | NEW |
(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 |
OLD | NEW |