| Index: third_party/WebKit/Source/core/layout/ng/ng_physical_constraint_space.h
|
| diff --git a/third_party/WebKit/Source/core/layout/ng/ng_physical_constraint_space.h b/third_party/WebKit/Source/core/layout/ng/ng_physical_constraint_space.h
|
| index 5b22d50a8a88b7f496778c43b843193f78e52935..37914464d2b7674a41a23008dcee11d736ed4f50 100644
|
| --- a/third_party/WebKit/Source/core/layout/ng/ng_physical_constraint_space.h
|
| +++ b/third_party/WebKit/Source/core/layout/ng/ng_physical_constraint_space.h
|
| @@ -27,6 +27,33 @@
|
| FragmentRegion
|
| };
|
|
|
| +struct NGExclusion : public GarbageCollected<NGExclusion> {
|
| + NGExclusion(LayoutUnit top,
|
| + LayoutUnit right,
|
| + LayoutUnit bottom,
|
| + LayoutUnit left) {
|
| + rect.offset.left = left;
|
| + rect.offset.top = top;
|
| + rect.size.width = right - left;
|
| + rect.size.height = bottom - top;
|
| + }
|
| + LayoutUnit Top() const { return rect.offset.top; }
|
| + LayoutUnit Right() const { return rect.size.width + rect.offset.left; }
|
| + LayoutUnit Bottom() const { return rect.size.height + rect.offset.top; }
|
| + LayoutUnit Left() const { return rect.offset.left; }
|
| +
|
| + String ToString() const {
|
| + return String::format("%s,%s %sx%s",
|
| + rect.offset.left.toString().ascii().data(),
|
| + rect.offset.top.toString().ascii().data(),
|
| + rect.size.width.toString().ascii().data(),
|
| + rect.size.height.toString().ascii().data());
|
| + }
|
| + NGPhysicalRect rect;
|
| +
|
| + DEFINE_INLINE_TRACE() {}
|
| +};
|
| +
|
| // The NGPhysicalConstraintSpace contains the underlying data for the
|
| // NGConstraintSpace. It is not meant to be used directly as all members are in
|
| // the physical coordinate space. Instead NGConstraintSpace should be used.
|
| @@ -45,11 +72,11 @@
|
|
|
| NGPhysicalSize ContainerSize() const { return container_size_; }
|
|
|
| - void AddExclusion(const NGLogicalRect&, unsigned options = 0);
|
| - const Vector<std::unique_ptr<const NGLogicalRect>>& Exclusions(
|
| + void AddExclusion(const NGExclusion*, unsigned options = 0);
|
| + const HeapVector<Member<const NGExclusion>>& Exclusions(
|
| unsigned options = 0) const;
|
|
|
| - DEFINE_INLINE_TRACE() {}
|
| + DEFINE_INLINE_TRACE() { visitor->trace(exclusions_); }
|
|
|
| private:
|
| friend class NGConstraintSpace;
|
| @@ -67,7 +94,7 @@
|
| // formatting Context
|
| unsigned is_new_fc_ : 1;
|
|
|
| - Vector<std::unique_ptr<const NGLogicalRect>> exclusions_;
|
| + HeapVector<Member<const NGExclusion>> exclusions_;
|
| };
|
|
|
| } // namespace blink
|
|
|