| 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 NGFragment_h | 5 #ifndef NGFragment_h |
| 6 #define NGFragment_h | 6 #define NGFragment_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/layout/ng/ng_fragment_base.h" | 9 #include "core/layout/ng/ng_fragment_base.h" |
| 10 #include "core/layout/ng/ng_constraint_space.h" | |
| 11 #include "core/layout/ng/ng_physical_fragment.h" | 10 #include "core/layout/ng/ng_physical_fragment.h" |
| 12 #include "core/layout/ng/ng_units.h" | 11 #include "core/layout/ng/ng_units.h" |
| 13 #include "core/layout/ng/ng_writing_mode.h" | 12 #include "core/layout/ng/ng_writing_mode.h" |
| 14 #include "platform/LayoutUnit.h" | |
| 15 #include "platform/heap/Handle.h" | |
| 16 #include "wtf/Vector.h" | |
| 17 | 13 |
| 18 namespace blink { | 14 namespace blink { |
| 19 | 15 |
| 20 class CORE_EXPORT NGFragment final : public NGFragmentBase { | 16 class CORE_EXPORT NGFragment final : public NGFragmentBase { |
| 21 public: | 17 public: |
| 22 NGFragment(NGWritingMode writing_mode, | 18 NGFragment(NGWritingMode writing_mode, |
| 23 TextDirection direction, | 19 TextDirection direction, |
| 24 NGPhysicalFragment* physical_fragment) | 20 NGPhysicalFragment* physical_fragment) |
| 25 : NGFragmentBase(writing_mode, direction, physical_fragment) {} | 21 : NGFragmentBase(writing_mode, direction, physical_fragment) {} |
| 26 | 22 |
| 27 NGMarginStrut MarginStrut() const; | 23 NGMarginStrut MarginStrut() const; |
| 28 }; | 24 }; |
| 29 | 25 |
| 30 DEFINE_TYPE_CASTS(NGFragment, | 26 DEFINE_TYPE_CASTS(NGFragment, |
| 31 NGFragmentBase, | 27 NGFragmentBase, |
| 32 fragment, | 28 fragment, |
| 33 fragment->Type() == NGPhysicalFragmentBase::kFragmentBox, | 29 fragment->Type() == NGPhysicalFragmentBase::kFragmentBox, |
| 34 fragment.Type() == NGPhysicalFragmentBase::kFragmentBox); | 30 fragment.Type() == NGPhysicalFragmentBase::kFragmentBox); |
| 35 | 31 |
| 36 } // namespace blink | 32 } // namespace blink |
| 37 | 33 |
| 38 #endif // NGFragment_h | 34 #endif // NGFragment_h |
| OLD | NEW |