Chromium Code Reviews| Index: Source/core/style/StyleAlignmentData.h |
| diff --git a/Source/core/style/StyleAlignmentData.h b/Source/core/style/StyleAlignmentData.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..471d5b7bccf134fc7c3430eb73231e30dd1e9e4f |
| --- /dev/null |
| +++ b/Source/core/style/StyleAlignmentData.h |
| @@ -0,0 +1,42 @@ |
| +// 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.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef StyleAlignmentData_h |
| +#define StyleAlignmentData_h |
| + |
| +#include "core/style/ComputedStyleConstants.h" |
| + |
| +namespace blink { |
| + |
| +class StyleAlignmentData { |
| +public: |
| + // Style data for Self-Aligment and Default-Alignment properties: align-{self, items}, justify-{self, items}. |
| + // [ <self-position> && <overflow-position>? ] | [ legacy && [ left | right | center ] ] |
| + StyleAlignmentData(ItemPosition, OverflowAlignment, ItemPositionType = NonLegacyPosition); |
| + // Style data for Content-Distribution properties: align-content, justify-content. |
| + // <content-distribution> || [ <overflow-position>? && <content-position> ] |
| + StyleAlignmentData(ContentPosition, ContentDistributionType, OverflowAlignment); |
| + // Constructor for Alignment style data copy. |
| + StyleAlignmentData(const StyleAlignmentData&); |
| + |
| + bool operator==(const StyleAlignmentData& o) const |
| + { |
| + return m_itemPosition == o.m_itemPosition && m_contentPosition == o.m_contentPosition && m_distribution == o.m_distribution && m_positionType == o.m_positionType && m_overflow == o.m_overflow; |
| + } |
| + |
| + bool operator!=(const StyleAlignmentData& o) const |
| + { |
| + return !(*this == o); |
| + } |
| + |
| + 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.
|
| + ContentPosition m_contentPosition; |
| + ContentDistributionType m_distribution; |
| + ItemPositionType m_positionType; |
| + OverflowAlignment m_overflow; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // StyleAlignmentData_h |