| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/layout/ng/geometry/ng_physical_offset.h" | 5 #include "core/layout/ng/geometry/ng_physical_offset.h" |
| 6 | 6 |
| 7 #include "wtf/text/WTFString.h" | 7 #include "platform/wtf/text/WTFString.h" |
| 8 | 8 |
| 9 namespace blink { | 9 namespace blink { |
| 10 | 10 |
| 11 NGPhysicalOffset NGPhysicalOffset::operator+( | 11 NGPhysicalOffset NGPhysicalOffset::operator+( |
| 12 const NGPhysicalOffset& other) const { | 12 const NGPhysicalOffset& other) const { |
| 13 return NGPhysicalOffset{this->left + other.left, this->top + other.top}; | 13 return NGPhysicalOffset{this->left + other.left, this->top + other.top}; |
| 14 } | 14 } |
| 15 | 15 |
| 16 NGPhysicalOffset& NGPhysicalOffset::operator+=(const NGPhysicalOffset& other) { | 16 NGPhysicalOffset& NGPhysicalOffset::operator+=(const NGPhysicalOffset& other) { |
| 17 *this = *this + other; | 17 *this = *this + other; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 String NGPhysicalOffset::ToString() const { | 35 String NGPhysicalOffset::ToString() const { |
| 36 return String::Format("%dx%d", left.ToInt(), top.ToInt()); | 36 return String::Format("%dx%d", left.ToInt(), top.ToInt()); |
| 37 } | 37 } |
| 38 | 38 |
| 39 std::ostream& operator<<(std::ostream& os, const NGPhysicalOffset& value) { | 39 std::ostream& operator<<(std::ostream& os, const NGPhysicalOffset& value) { |
| 40 return os << value.ToString(); | 40 return os << value.ToString(); |
| 41 } | 41 } |
| 42 | 42 |
| 43 } // namespace blink | 43 } // namespace blink |
| OLD | NEW |