OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 StyleContentAlignmentData_h | 5 #ifndef StyleContentAlignmentData_h |
6 #define StyleContentAlignmentData_h | 6 #define StyleContentAlignmentData_h |
7 | 7 |
8 #include "core/style/ComputedStyleConstants.h" | 8 #include "core/style/ComputedStyleConstants.h" |
9 #include "wtf/Allocator.h" | 9 #include "wtf/Allocator.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 class StyleContentAlignmentData { | 13 class StyleContentAlignmentData { |
14 DISALLOW_NEW(); | 14 DISALLOW_NEW(); |
15 | 15 |
16 public: | 16 public: |
17 // Style data for Content-Distribution properties: align-content, justify-cont
ent. | 17 // Style data for Content-Distribution properties: align-content, |
| 18 // justify-content. |
18 // <content-distribution> || [ <overflow-position>? && <content-position> ] | 19 // <content-distribution> || [ <overflow-position>? && <content-position> ] |
19 StyleContentAlignmentData( | 20 StyleContentAlignmentData( |
20 ContentPosition position, | 21 ContentPosition position, |
21 ContentDistributionType distribution, | 22 ContentDistributionType distribution, |
22 OverflowAlignment overflow = OverflowAlignmentDefault) | 23 OverflowAlignment overflow = OverflowAlignmentDefault) |
23 : m_position(position), | 24 : m_position(position), |
24 m_distribution(distribution), | 25 m_distribution(distribution), |
25 m_overflow(overflow) {} | 26 m_overflow(overflow) {} |
26 | 27 |
27 void setPosition(ContentPosition position) { m_position = position; } | 28 void setPosition(ContentPosition position) { m_position = position; } |
(...skipping 23 matching lines...) Expand all Loading... |
51 | 52 |
52 private: | 53 private: |
53 unsigned m_position : 4; // ContentPosition | 54 unsigned m_position : 4; // ContentPosition |
54 unsigned m_distribution : 3; // ContentDistributionType | 55 unsigned m_distribution : 3; // ContentDistributionType |
55 unsigned m_overflow : 2; // OverflowAlignment | 56 unsigned m_overflow : 2; // OverflowAlignment |
56 }; | 57 }; |
57 | 58 |
58 } // namespace blink | 59 } // namespace blink |
59 | 60 |
60 #endif // StyleContentAlignmentData_h | 61 #endif // StyleContentAlignmentData_h |
OLD | NEW |