Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: Source/core/style/StyleAlignmentData.h

Issue 1070143002: [Alignment] Single class for holding the alignment data. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Applied suggested changes. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698