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 f63dd7bec69a42e67eeb916d1ad32135b0ca954c..5537f4b37d567414e58bb74a1b4396480b7bf67a 100644 |
--- a/third_party/WebKit/Source/core/layout/ng/ng_units.cc |
+++ b/third_party/WebKit/Source/core/layout/ng/ng_units.cc |
@@ -88,6 +88,18 @@ bool NGLogicalOffset::operator==(const NGLogicalOffset& other) const { |
std::tie(inline_offset, block_offset); |
} |
+NGLogicalOffset NGLogicalOffset::operator+(const NGLogicalOffset& other) const { |
+ NGLogicalOffset result; |
+ result.inline_offset = this->inline_offset + other.inline_offset; |
+ result.block_offset = this->block_offset + other.block_offset; |
+ return result; |
+} |
+ |
+NGLogicalOffset& NGLogicalOffset::operator+=(const NGLogicalOffset& other) { |
+ *this = *this + other; |
+ return *this; |
+} |
+ |
bool NGBoxStrut::IsEmpty() const { |
return *this == NGBoxStrut(); |
} |