OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All Rights Reserved. | 2 * Copyright (C) 2011 Google Inc. All Rights Reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
11 * documentation and/or other materials provided with the distribution. | 11 * documentation and/or other materials provided with the distribution. |
12 * | 12 * |
13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND A
NY | 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND |
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 14 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
15 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 15 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
16 * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR A
NY | 16 * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR |
17 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 17 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
18 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
19 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON | 19 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
20 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 20 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THI
S | 21 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 22 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
23 * | |
24 */ | 23 */ |
25 | 24 |
26 #ifndef StyleGridData_h | 25 #ifndef StyleGridData_h |
27 #define StyleGridData_h | 26 #define StyleGridData_h |
28 | 27 |
29 #include "core/style/GridArea.h" | 28 #include "core/style/GridArea.h" |
30 #include "core/style/GridTrackSize.h" | 29 #include "core/style/GridTrackSize.h" |
31 #include "core/style/ComputedStyleConstants.h" | 30 #include "core/style/ComputedStyleConstants.h" |
32 #include "wtf/PassRefPtr.h" | 31 #include "wtf/PassRefPtr.h" |
33 #include "wtf/RefCounted.h" | 32 #include "wtf/RefCounted.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 } | 84 } |
86 | 85 |
87 bool operator!=(const StyleGridData& o) const { return !(*this == o); } | 86 bool operator!=(const StyleGridData& o) const { return !(*this == o); } |
88 | 87 |
89 Vector<GridTrackSize> m_gridTemplateColumns; | 88 Vector<GridTrackSize> m_gridTemplateColumns; |
90 Vector<GridTrackSize> m_gridTemplateRows; | 89 Vector<GridTrackSize> m_gridTemplateRows; |
91 | 90 |
92 NamedGridLinesMap m_namedGridColumnLines; | 91 NamedGridLinesMap m_namedGridColumnLines; |
93 NamedGridLinesMap m_namedGridRowLines; | 92 NamedGridLinesMap m_namedGridRowLines; |
94 | 93 |
95 // In order to reconstruct the original named grid line order, we can't rely o
n NamedGridLinesMap | 94 // In order to reconstruct the original named grid line order, we can't rely |
96 // as it loses the position if multiple grid lines are set on a single track. | 95 // on NamedGridLinesMap as it loses the position if multiple grid lines are |
| 96 // set on a single track. |
97 OrderedNamedGridLines m_orderedNamedGridColumnLines; | 97 OrderedNamedGridLines m_orderedNamedGridColumnLines; |
98 OrderedNamedGridLines m_orderedNamedGridRowLines; | 98 OrderedNamedGridLines m_orderedNamedGridRowLines; |
99 | 99 |
100 NamedGridLinesMap m_autoRepeatNamedGridColumnLines; | 100 NamedGridLinesMap m_autoRepeatNamedGridColumnLines; |
101 NamedGridLinesMap m_autoRepeatNamedGridRowLines; | 101 NamedGridLinesMap m_autoRepeatNamedGridRowLines; |
102 OrderedNamedGridLines m_autoRepeatOrderedNamedGridColumnLines; | 102 OrderedNamedGridLines m_autoRepeatOrderedNamedGridColumnLines; |
103 OrderedNamedGridLines m_autoRepeatOrderedNamedGridRowLines; | 103 OrderedNamedGridLines m_autoRepeatOrderedNamedGridRowLines; |
104 | 104 |
105 unsigned m_gridAutoFlow : GridAutoFlowBits; | 105 unsigned m_gridAutoFlow : GridAutoFlowBits; |
106 | 106 |
107 Vector<GridTrackSize> m_gridAutoRows; | 107 Vector<GridTrackSize> m_gridAutoRows; |
108 Vector<GridTrackSize> m_gridAutoColumns; | 108 Vector<GridTrackSize> m_gridAutoColumns; |
109 | 109 |
110 NamedGridAreaMap m_namedGridArea; | 110 NamedGridAreaMap m_namedGridArea; |
111 // Because m_namedGridArea doesn't store the unnamed grid areas, we need to ke
ep track | 111 // Because m_namedGridArea doesn't store the unnamed grid areas, we need to |
112 // of the explicit grid size defined by both named and unnamed grid areas. | 112 // keep track of the explicit grid size defined by both named and unnamed grid |
| 113 // areas. |
113 size_t m_namedGridAreaRowCount; | 114 size_t m_namedGridAreaRowCount; |
114 size_t m_namedGridAreaColumnCount; | 115 size_t m_namedGridAreaColumnCount; |
115 | 116 |
116 Length m_gridColumnGap; | 117 Length m_gridColumnGap; |
117 Length m_gridRowGap; | 118 Length m_gridRowGap; |
118 | 119 |
119 Vector<GridTrackSize> m_gridAutoRepeatColumns; | 120 Vector<GridTrackSize> m_gridAutoRepeatColumns; |
120 Vector<GridTrackSize> m_gridAutoRepeatRows; | 121 Vector<GridTrackSize> m_gridAutoRepeatRows; |
121 | 122 |
122 size_t m_autoRepeatColumnsInsertionPoint; | 123 size_t m_autoRepeatColumnsInsertionPoint; |
123 size_t m_autoRepeatRowsInsertionPoint; | 124 size_t m_autoRepeatRowsInsertionPoint; |
124 | 125 |
125 AutoRepeatType m_autoRepeatColumnsType; | 126 AutoRepeatType m_autoRepeatColumnsType; |
126 AutoRepeatType m_autoRepeatRowsType; | 127 AutoRepeatType m_autoRepeatRowsType; |
127 | 128 |
128 private: | 129 private: |
129 StyleGridData(); | 130 StyleGridData(); |
130 StyleGridData(const StyleGridData&); | 131 StyleGridData(const StyleGridData&); |
131 }; | 132 }; |
132 | 133 |
133 } // namespace blink | 134 } // namespace blink |
134 | 135 |
135 #endif // StyleGridData_h | 136 #endif // StyleGridData_h |
OLD | NEW |