Chromium Code Reviews| 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 d65adf7c2a8d0fb29454d3f645e6952a4a783772..bec0be56fa5bf76fa1712c4429e0ff315608a529 100644 |
| --- a/third_party/WebKit/Source/core/layout/ng/ng_units.cc |
| +++ b/third_party/WebKit/Source/core/layout/ng/ng_units.cc |
| @@ -61,6 +61,16 @@ NGPhysicalOffset NGLogicalOffset::ConvertToPhysical( |
| } |
| } |
| +bool NGBoxStrut::IsEmpty() const { |
| + return *this == NGBoxStrut(); |
| +} |
| + |
| +bool NGBoxStrut::operator==(const NGBoxStrut& other) const { |
| + return std::tie(other.inline_start, other.inline_end, other.block_start, |
|
mstensho (USE GERRIT)
2016/09/20 09:59:50
Wouldn't comparing each of the four members indivi
Gleb Lanbin
2016/09/20 19:18:19
I didn't test std:tie performance but std::tie is
|
| + other.block_end) == |
| + std::tie(inline_start, inline_end, block_start, block_end); |
| +} |
| + |
| void NGMarginStrut::AppendMarginBlockStart(const LayoutUnit& value) { |
| if (value < 0) { |
| negative_margin_block_start = |