| 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_logical_offset.h" | 5 #include "core/layout/ng/geometry/ng_logical_offset.h" |
| 6 | 6 |
| 7 #include "core/layout/ng/geometry/ng_physical_offset.h" | 7 #include "core/layout/ng/geometry/ng_physical_offset.h" |
| 8 #include "core/layout/ng/geometry/ng_physical_size.h" | 8 #include "core/layout/ng/geometry/ng_physical_size.h" |
| 9 #include "wtf/text/WTFString.h" | 9 #include "platform/wtf/text/WTFString.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 NGPhysicalOffset NGLogicalOffset::ConvertToPhysical( | 13 NGPhysicalOffset NGLogicalOffset::ConvertToPhysical( |
| 14 NGWritingMode mode, | 14 NGWritingMode mode, |
| 15 TextDirection direction, | 15 TextDirection direction, |
| 16 NGPhysicalSize outer_size, | 16 NGPhysicalSize outer_size, |
| 17 NGPhysicalSize inner_size) const { | 17 NGPhysicalSize inner_size) const { |
| 18 switch (mode) { | 18 switch (mode) { |
| 19 case kHorizontalTopBottom: | 19 case kHorizontalTopBottom: |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 104 |
| 105 String NGLogicalOffset::ToString() const { | 105 String NGLogicalOffset::ToString() const { |
| 106 return String::Format("%dx%d", inline_offset.ToInt(), block_offset.ToInt()); | 106 return String::Format("%dx%d", inline_offset.ToInt(), block_offset.ToInt()); |
| 107 } | 107 } |
| 108 | 108 |
| 109 std::ostream& operator<<(std::ostream& os, const NGLogicalOffset& value) { | 109 std::ostream& operator<<(std::ostream& os, const NGLogicalOffset& value) { |
| 110 return os << value.ToString(); | 110 return os << value.ToString(); |
| 111 } | 111 } |
| 112 | 112 |
| 113 } // namespace blink | 113 } // namespace blink |
| OLD | NEW |