Index: third_party/WebKit/Source/core/layout/ng/ng_fragment_base.h |
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_fragment_base.h b/third_party/WebKit/Source/core/layout/ng/ng_fragment_base.h |
index 621926cf5459c42e858012f6af4abea77404b8ec..9be8cd6cba693df2a8559e85fa418f3728caee71 100644 |
--- a/third_party/WebKit/Source/core/layout/ng/ng_fragment_base.h |
+++ b/third_party/WebKit/Source/core/layout/ng/ng_fragment_base.h |
@@ -14,49 +14,45 @@ |
namespace blink { |
+class NGPhysicalFragmentBase; |
+ |
class CORE_EXPORT NGFragmentBase : public GarbageCollected<NGFragmentBase> { |
public: |
- enum NGFragmentType { FragmentBox = 0, FragmentText = 1 }; |
- |
- NGFragmentType Type() const { return static_cast<NGFragmentType>(type_); } |
NGWritingMode WritingMode() const { |
return static_cast<NGWritingMode>(writing_mode_); |
} |
NGDirection Direction() const { return static_cast<NGDirection>(direction_); } |
// Returns the border-box size. |
- LayoutUnit InlineSize() const { return size_.inline_size; } |
- LayoutUnit BlockSize() const { return size_.block_size; } |
+ LayoutUnit InlineSize() const; |
+ LayoutUnit BlockSize() const; |
// Returns the total size, including the contents outside of the border-box. |
- LayoutUnit InlineOverflow() const { return overflow_.inline_size; } |
- LayoutUnit BlockOverflow() const { return overflow_.block_size; } |
+ LayoutUnit InlineOverflow() const; |
+ LayoutUnit BlockOverflow() const; |
// Returns the offset relative to the parent fragement's content-box. |
- LayoutUnit InlineOffset() const { return offset_.inline_offset; } |
- LayoutUnit BlockOffset() const { return offset_.block_offset; } |
+ LayoutUnit InlineOffset() const; |
+ LayoutUnit BlockOffset() const; |
- // Should only be used by the parent fragement's layout. |
- void SetOffset(LayoutUnit inline_offset, LayoutUnit block_offset); |
+ NGPhysicalFragmentBase* PhysicalFragment() const { |
+ return physical_fragment_; |
+ }; |
- DEFINE_INLINE_TRACE_AFTER_DISPATCH() {} |
DECLARE_TRACE(); |
protected: |
- NGFragmentBase(NGLogicalSize size, |
- NGLogicalSize overflow, |
- NGWritingMode, |
- NGDirection, |
- NGFragmentType); |
+ NGFragmentBase(NGWritingMode writing_mode, |
+ NGDirection direction, |
+ NGPhysicalFragmentBase* physical_fragment) |
+ : physical_fragment_(physical_fragment), |
+ writing_mode_(writing_mode), |
+ direction_(direction) {} |
- NGLogicalSize size_; |
- NGLogicalSize overflow_; |
- NGLogicalOffset offset_; |
+ Member<NGPhysicalFragmentBase> physical_fragment_; |
- unsigned type_ : 1; |
unsigned writing_mode_ : 3; |
unsigned direction_ : 1; |
- unsigned has_been_placed_ : 1; |
}; |
} // namespace blink |