| Index: third_party/WebKit/Source/core/layout/ng/ng_units.cc
|
| diff --git a/third_party/WebKit/Source/core/layout/ng/ng_units.cc b/third_party/WebKit/Source/core/layout/ng/ng_units.cc
|
| index 2e515a8c53e60806a6cae10ef86e47ff8be4b791..b11d1ecc8057723a6c5e5b50260db6971ddb1735 100644
|
| --- a/third_party/WebKit/Source/core/layout/ng/ng_units.cc
|
| +++ b/third_party/WebKit/Source/core/layout/ng/ng_units.cc
|
| @@ -226,4 +226,30 @@ bool NGMarginStrut::operator==(const NGMarginStrut& other) const {
|
| negative_margin_block_start, negative_margin_block_end);
|
| }
|
|
|
| +NGExclusions::NGExclusions()
|
| + : last_left_float(nullptr), last_right_float(nullptr) {}
|
| +
|
| +NGExclusions::NGExclusions(const NGExclusions& other) {
|
| + for (const auto& exclusion : other.storage)
|
| + Add(*exclusion);
|
| +}
|
| +
|
| +void NGExclusions::Add(const NGExclusion& exclusion) {
|
| + storage.append(makeUnique<NGExclusion>(exclusion));
|
| + if (exclusion.type == NGExclusion::kFloatLeft) {
|
| + last_left_float = storage.rbegin()->get();
|
| + } else if (exclusion.type == NGExclusion::kFloatRight) {
|
| + last_right_float = storage.rbegin()->get();
|
| + }
|
| +}
|
| +
|
| +inline NGExclusions& NGExclusions::operator=(const NGExclusions& other) {
|
| + storage.clear();
|
| + last_left_float = nullptr;
|
| + last_right_float = nullptr;
|
| + for (const auto& exclusion : other.storage)
|
| + Add(*exclusion);
|
| + return *this;
|
| +}
|
| +
|
| } // namespace blink
|
|
|