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

Unified 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: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/style/ComputedStyle.cpp ('k') | Source/core/style/StyleAlignmentData.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..f8029cf866fefbd6918463203abf5d559b26043a
--- /dev/null
+++ b/Source/core/style/StyleAlignmentData.h
@@ -0,0 +1,37 @@
+// Copyright (c) 2014 The Chromium Authors. All rights reserved.
+// 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:
+ StyleAlignmentData(ItemPosition, OverflowAlignment, ItemPositionType = NonLegacyPosition);
+ StyleAlignmentData(ContentPosition, ContentDistributionType, OverflowAlignment);
Julien - ping for review 2015/04/09 15:23:20 I would love a class comment to explain these cons
jfernandez 2015/04/09 15:55:55 Done.
+ 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 && m_positionType == o.m_positionType;
Julien - ping for review 2015/04/09 15:23:20 Nit: This doesn't follow the order below (m_positi
jfernandez 2015/04/09 15:55:55 Done.
+ }
+
+ bool operator!=(const StyleAlignmentData& o) const
+ {
+ return !(*this == o);
+ }
+
+ ItemPosition m_itemPosition;
+ ContentPosition m_contentPosition;
+ ContentDistributionType m_distribution;
+ ItemPositionType m_positionType;
+ OverflowAlignment m_overflow;
+};
+
+} // namespace blink
+
+#endif // StyleAlignmentData_h
« no previous file with comments | « Source/core/style/ComputedStyle.cpp ('k') | Source/core/style/StyleAlignmentData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698