| 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 #ifndef NGUnits_h | 5 #ifndef NGUnits_h |
| 6 #define NGUnits_h | 6 #define NGUnits_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/layout/ng/ng_direction.h" | 9 #include "core/layout/ng/ng_direction.h" |
| 10 #include "core/layout/ng/ng_writing_mode.h" | 10 #include "core/layout/ng/ng_writing_mode.h" |
| 11 #include "platform/LayoutUnit.h" | 11 #include "platform/LayoutUnit.h" |
| 12 #include "wtf/text/WTFString.h" | 12 #include "wtf/text/WTFString.h" |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 | 15 |
| 16 class LayoutUnit; | 16 class LayoutUnit; |
| 17 struct NGPhysicalOffset; | 17 struct NGPhysicalOffset; |
| 18 struct NGPhysicalSize; | 18 struct NGPhysicalSize; |
| 19 | 19 |
| 20 struct MinAndMaxContentSizes { |
| 21 LayoutUnit min_content; |
| 22 LayoutUnit max_content; |
| 23 }; |
| 24 |
| 20 struct NGLogicalSize { | 25 struct NGLogicalSize { |
| 21 NGLogicalSize() {} | 26 NGLogicalSize() {} |
| 22 NGLogicalSize(LayoutUnit inline_size, LayoutUnit block_size) | 27 NGLogicalSize(LayoutUnit inline_size, LayoutUnit block_size) |
| 23 : inline_size(inline_size), block_size(block_size) {} | 28 : inline_size(inline_size), block_size(block_size) {} |
| 24 | 29 |
| 25 LayoutUnit inline_size; | 30 LayoutUnit inline_size; |
| 26 LayoutUnit block_size; | 31 LayoutUnit block_size; |
| 27 | 32 |
| 28 NGPhysicalSize ConvertToPhysical(NGWritingMode mode) const; | 33 NGPhysicalSize ConvertToPhysical(NGWritingMode mode) const; |
| 29 bool operator==(const NGLogicalSize& other) const; | 34 bool operator==(const NGLogicalSize& other) const; |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 | 196 |
| 192 // Struct to represent a simple edge that has start and end. | 197 // Struct to represent a simple edge that has start and end. |
| 193 struct NGEdge { | 198 struct NGEdge { |
| 194 LayoutUnit start; | 199 LayoutUnit start; |
| 195 LayoutUnit end; | 200 LayoutUnit end; |
| 196 }; | 201 }; |
| 197 | 202 |
| 198 } // namespace blink | 203 } // namespace blink |
| 199 | 204 |
| 200 #endif // NGUnits_h | 205 #endif // NGUnits_h |
| OLD | NEW |