Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | |
|
Timothy Loh
2015/04/10 05:42:44
2015
jfernandez
2015/04/10 23:34:33
Done.
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef StyleAlignmentData_h | |
| 6 #define StyleAlignmentData_h | |
| 7 | |
| 8 #include "core/style/ComputedStyleConstants.h" | |
| 9 | |
| 10 namespace blink { | |
| 11 | |
| 12 class StyleAlignmentData { | |
| 13 public: | |
| 14 // Style data for Self-Aligment and Default-Alignment properties: align-{sel f, items}, justify-{self, items}. | |
| 15 // [ <self-position> && <overflow-position>? ] | [ legacy && [ left | right | center ] ] | |
| 16 StyleAlignmentData(ItemPosition, OverflowAlignment, ItemPositionType = NonLe gacyPosition); | |
| 17 // Style data for Content-Distribution properties: align-content, justify-co ntent. | |
| 18 // <content-distribution> || [ <overflow-position>? && <content-position> ] | |
| 19 StyleAlignmentData(ContentPosition, ContentDistributionType, OverflowAlignme nt); | |
| 20 // Constructor for Alignment style data copy. | |
| 21 StyleAlignmentData(const StyleAlignmentData&); | |
| 22 | |
| 23 bool operator==(const StyleAlignmentData& o) const | |
| 24 { | |
| 25 return m_itemPosition == o.m_itemPosition && m_contentPosition == o.m_co ntentPosition && m_distribution == o.m_distribution && m_positionType == o.m_pos itionType && m_overflow == o.m_overflow; | |
| 26 } | |
| 27 | |
| 28 bool operator!=(const StyleAlignmentData& o) const | |
| 29 { | |
| 30 return !(*this == o); | |
| 31 } | |
| 32 | |
| 33 ItemPosition m_itemPosition; | |
|
Timothy Loh
2015/04/10 05:42:44
Pretty sure you still need to specify these as bit
jfernandez
2015/04/10 23:34:33
Done.
| |
| 34 ContentPosition m_contentPosition; | |
| 35 ContentDistributionType m_distribution; | |
| 36 ItemPositionType m_positionType; | |
| 37 OverflowAlignment m_overflow; | |
| 38 }; | |
| 39 | |
| 40 } // namespace blink | |
| 41 | |
| 42 #endif // StyleAlignmentData_h | |
| OLD | NEW |