| Index: third_party/WebKit/Source/core/layout/ng/ng_fragment.h
|
| diff --git a/third_party/WebKit/Source/core/layout/ng/ng_fragment.h b/third_party/WebKit/Source/core/layout/ng/ng_fragment.h
|
| index b08d214c3482d9638a111f3307df0f506422eb71..bafe5254a9c1c04ec0bcd35b926dfe05b2db6f75 100644
|
| --- a/third_party/WebKit/Source/core/layout/ng/ng_fragment.h
|
| +++ b/third_party/WebKit/Source/core/layout/ng/ng_fragment.h
|
| @@ -6,29 +6,54 @@
|
| #define NGFragment_h
|
|
|
| #include "core/CoreExport.h"
|
| -#include "core/layout/ng/ng_fragment_base.h"
|
| -#include "core/layout/ng/ng_physical_fragment.h"
|
| -#include "core/layout/ng/ng_units.h"
|
| #include "core/layout/ng/ng_writing_mode.h"
|
| +#include "core/layout/ng/ng_physical_fragment.h"
|
| +#include "platform/LayoutUnit.h"
|
| +#include "platform/heap/Handle.h"
|
|
|
| namespace blink {
|
|
|
| -class CORE_EXPORT NGFragment final : public NGFragmentBase {
|
| +class CORE_EXPORT NGFragment : public GarbageCollected<NGFragment> {
|
| public:
|
| + NGWritingMode WritingMode() const {
|
| + return static_cast<NGWritingMode>(writing_mode_);
|
| + }
|
| + TextDirection Direction() const {
|
| + return static_cast<TextDirection>(direction_);
|
| + }
|
| +
|
| + // Returns the border-box size.
|
| + LayoutUnit InlineSize() const;
|
| + LayoutUnit BlockSize() const;
|
| +
|
| + // Returns the total size, including the contents outside of the border-box.
|
| + LayoutUnit InlineOverflow() const;
|
| + LayoutUnit BlockOverflow() const;
|
| +
|
| + // Returns the offset relative to the parent fragement's content-box.
|
| + LayoutUnit InlineOffset() const;
|
| + LayoutUnit BlockOffset() const;
|
| +
|
| + NGPhysicalFragment::NGFragmentType Type() const;
|
| +
|
| + NGPhysicalFragment* PhysicalFragment() const { return physical_fragment_; };
|
| +
|
| + DECLARE_TRACE();
|
| +
|
| + protected:
|
| NGFragment(NGWritingMode writing_mode,
|
| TextDirection direction,
|
| NGPhysicalFragment* physical_fragment)
|
| - : NGFragmentBase(writing_mode, direction, physical_fragment) {}
|
| + : physical_fragment_(physical_fragment),
|
| + writing_mode_(writing_mode),
|
| + direction_(static_cast<unsigned>(direction)) {}
|
|
|
| - NGMarginStrut MarginStrut() const;
|
| + Member<NGPhysicalFragment> physical_fragment_;
|
| +
|
| + unsigned writing_mode_ : 3;
|
| + unsigned direction_ : 1;
|
| };
|
|
|
| -DEFINE_TYPE_CASTS(NGFragment,
|
| - NGFragmentBase,
|
| - fragment,
|
| - fragment->Type() == NGPhysicalFragmentBase::kFragmentBox,
|
| - fragment.Type() == NGPhysicalFragmentBase::kFragmentBox);
|
| -
|
| } // namespace blink
|
|
|
| #endif // NGFragment_h
|
|
|