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 "platform/LayoutUnit.h" | 8 #include "platform/LayoutUnit.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
(...skipping 29 matching lines...) Expand all Loading... |
40 NGPhysicalLocation location; | 40 NGPhysicalLocation location; |
41 }; | 41 }; |
42 | 42 |
43 struct NGPixelSnappedPhysicalRect { | 43 struct NGPixelSnappedPhysicalRect { |
44 int top; | 44 int top; |
45 int left; | 45 int left; |
46 int width; | 46 int width; |
47 int height; | 47 int height; |
48 }; | 48 }; |
49 | 49 |
| 50 // This struct is used for storing margins, borders or padding of a box on all |
| 51 // four edges. |
| 52 struct NGBoxStrut { |
| 53 LayoutUnit inline_start; |
| 54 LayoutUnit inline_end; |
| 55 LayoutUnit block_start; |
| 56 LayoutUnit block_end; |
| 57 |
| 58 LayoutUnit InlineSum() const { return inline_start + inline_end; } |
| 59 LayoutUnit BlockSum() const { return block_start + block_end; } |
| 60 }; |
| 61 |
50 } // namespace blink | 62 } // namespace blink |
51 | 63 |
52 #endif // NGUnits_h | 64 #endif // NGUnits_h |
OLD | NEW |