OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple 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 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
117 LayoutUnit startOfColumnForChild(const LayoutBox& child) const; | 117 LayoutUnit startOfColumnForChild(const LayoutBox& child) const; |
118 LayoutUnit endOfColumnForChild(const LayoutBox& child) const; | 118 LayoutUnit endOfColumnForChild(const LayoutBox& child) const; |
119 LayoutUnit columnPositionLeft(const LayoutBox&) const; | 119 LayoutUnit columnPositionLeft(const LayoutBox&) const; |
120 LayoutUnit columnPositionRight(const LayoutBox&) const; | 120 LayoutUnit columnPositionRight(const LayoutBox&) const; |
121 LayoutUnit centeredColumnPositionForChild(const LayoutBox&) const; | 121 LayoutUnit centeredColumnPositionForChild(const LayoutBox&) const; |
122 LayoutUnit columnPositionForChild(const LayoutBox&) const; | 122 LayoutUnit columnPositionForChild(const LayoutBox&) const; |
123 LayoutUnit startOfRowForChild(const LayoutBox& child) const; | 123 LayoutUnit startOfRowForChild(const LayoutBox& child) const; |
124 LayoutUnit endOfRowForChild(const LayoutBox& child) const; | 124 LayoutUnit endOfRowForChild(const LayoutBox& child) const; |
125 LayoutUnit centeredRowPositionForChild(const LayoutBox&) const; | 125 LayoutUnit centeredRowPositionForChild(const LayoutBox&) const; |
126 LayoutUnit rowPositionForChild(const LayoutBox&) const; | 126 LayoutUnit rowPositionForChild(const LayoutBox&) const; |
127 LayoutUnit contentPositionAndDistributionColumnOffset(LayoutUnit availableFr eeSpace, ContentPosition, ContentDistributionType, OverflowAlignment, unsigned n umberOfItems) const; | 127 void computeContentPositionAndDistributionRowOffset(LayoutUnit availableFree Space, unsigned numberOfGridTracks); |
128 LayoutUnit contentPositionAndDistributionRowOffset(LayoutUnit availableFreeS pace, ContentPosition, ContentDistributionType, OverflowAlignment, unsigned numb erOfItems) const; | 128 void computeContentPositionAndDistributionColumnOffset(LayoutUnit availableF reeSpace, unsigned numberOfGridTracks); |
129 LayoutPoint findChildLogicalPosition(const LayoutBox&, LayoutSize contentAli gnmentOffset) const; | 129 LayoutPoint findChildLogicalPosition(const LayoutBox&) const; |
130 GridCoordinate cachedGridCoordinate(const LayoutBox&) const; | 130 GridCoordinate cachedGridCoordinate(const LayoutBox&) const; |
131 | 131 |
132 LayoutUnit gridAreaBreadthForChild(const LayoutBox& child, GridTrackSizingDi rection, const Vector<GridTrack>&) const; | 132 LayoutUnit gridAreaBreadthForChild(const LayoutBox& child, GridTrackSizingDi rection, const Vector<GridTrack>&) const; |
133 | 133 |
134 virtual void paintChildren(const PaintInfo&, const LayoutPoint&) override; | 134 virtual void paintChildren(const PaintInfo&, const LayoutPoint&) override; |
135 bool allowedToStretchLogicalHeightForChild(const LayoutBox& child) const; | 135 bool allowedToStretchLogicalHeightForChild(const LayoutBox& child) const; |
136 bool needToStretchChildLogicalHeight(const LayoutBox&) const; | 136 bool needToStretchChildLogicalHeight(const LayoutBox&) const; |
137 LayoutUnit childIntrinsicHeight(const LayoutBox&) const; | 137 LayoutUnit childIntrinsicHeight(const LayoutBox&) const; |
138 LayoutUnit childIntrinsicWidth(const LayoutBox&) const; | 138 LayoutUnit childIntrinsicWidth(const LayoutBox&) const; |
139 LayoutUnit intrinsicLogicalHeightForChild(const LayoutBox&) const; | 139 LayoutUnit intrinsicLogicalHeightForChild(const LayoutBox&) const; |
(...skipping 20 matching lines...) Expand all Loading... | |
160 return m_grid.size(); | 160 return m_grid.size(); |
161 } | 161 } |
162 | 162 |
163 bool hasDefiniteLogicalSize(GridTrackSizingDirection) const; | 163 bool hasDefiniteLogicalSize(GridTrackSizingDirection) const; |
164 | 164 |
165 typedef Vector<Vector<GridCell>> GridRepresentation; | 165 typedef Vector<Vector<GridCell>> GridRepresentation; |
166 GridRepresentation m_grid; | 166 GridRepresentation m_grid; |
167 bool m_gridIsDirty; | 167 bool m_gridIsDirty; |
168 Vector<LayoutUnit> m_rowPositions; | 168 Vector<LayoutUnit> m_rowPositions; |
169 Vector<LayoutUnit> m_columnPositions; | 169 Vector<LayoutUnit> m_columnPositions; |
170 LayoutUnit m_rowsPositionOffset; | |
171 LayoutUnit m_rowsDistributionOffset; | |
172 LayoutUnit m_columnsPositionOffset; | |
173 LayoutUnit m_columnsDistributionOffset; | |
Julien - ping for review
2015/04/15 14:14:00
Why do we need those members? They seem like trans
jfernandez
2015/04/16 17:03:38
I've finally moved the fields into the GridSizingD
| |
170 HashMap<const LayoutBox*, GridCoordinate> m_gridItemCoordinate; | 174 HashMap<const LayoutBox*, GridCoordinate> m_gridItemCoordinate; |
171 OrderIterator m_orderIterator; | 175 OrderIterator m_orderIterator; |
172 Vector<LayoutBox*> m_gridItemsOverflowingGridArea; | 176 Vector<LayoutBox*> m_gridItemsOverflowingGridArea; |
173 HashMap<const LayoutBox*, size_t> m_gridItemsIndexesMap; | 177 HashMap<const LayoutBox*, size_t> m_gridItemsIndexesMap; |
174 }; | 178 }; |
175 | 179 |
176 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid()); | 180 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid()); |
177 | 181 |
178 } // namespace blink | 182 } // namespace blink |
179 | 183 |
180 #endif // LayoutGrid_h | 184 #endif // LayoutGrid_h |
OLD | NEW |