OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 NGBoxFragment_h | 5 #ifndef NGBoxFragment_h |
6 #define NGBoxFragment_h | 6 #define NGBoxFragment_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/layout/ng/ng_fragment.h" | 9 #include "core/layout/ng/ng_fragment.h" |
10 #include "core/layout/ng/ng_physical_box_fragment.h" | 10 #include "core/layout/ng/ng_physical_box_fragment.h" |
| 11 #include "core/layout/ng/ng_units.h" |
11 #include "core/layout/ng/ng_writing_mode.h" | 12 #include "core/layout/ng/ng_writing_mode.h" |
12 | 13 |
13 namespace blink { | 14 namespace blink { |
14 | 15 |
15 class CORE_EXPORT NGBoxFragment final : public NGFragment { | 16 class CORE_EXPORT NGBoxFragment final : public NGFragment { |
16 public: | 17 public: |
17 NGBoxFragment(NGWritingMode writing_mode, | 18 NGBoxFragment(NGWritingMode writing_mode, |
18 NGPhysicalBoxFragment* physical_fragment) | 19 NGPhysicalBoxFragment* physical_fragment) |
19 : NGFragment(writing_mode, physical_fragment) {} | 20 : NGFragment(writing_mode, physical_fragment) {} |
20 | 21 |
21 const WTF::Optional<NGLogicalOffset>& BfcOffset() const; | 22 const WTF::Optional<NGLogicalOffset>& BfcOffset() const; |
22 | 23 |
23 const NGMarginStrut& EndMarginStrut() const; | 24 const NGMarginStrut& EndMarginStrut() const; |
24 }; | 25 }; |
25 | 26 |
26 DEFINE_TYPE_CASTS(NGBoxFragment, | 27 DEFINE_TYPE_CASTS(NGBoxFragment, |
27 NGFragment, | 28 NGFragment, |
28 fragment, | 29 fragment, |
29 fragment->Type() == NGPhysicalFragment::kFragmentBox, | 30 fragment->Type() == NGPhysicalFragment::kFragmentBox, |
30 fragment.Type() == NGPhysicalFragment::kFragmentBox); | 31 fragment.Type() == NGPhysicalFragment::kFragmentBox); |
31 | 32 |
32 } // namespace blink | 33 } // namespace blink |
33 | 34 |
34 #endif // NGBoxFragment_h | 35 #endif // NGBoxFragment_h |
OLD | NEW |