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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 | 127 |
128 LayoutUnit gridAreaBreadthForChild(const RenderBox& child, GridTrackSizingDi
rection, const Vector<GridTrack>&) const; | 128 LayoutUnit gridAreaBreadthForChild(const RenderBox& child, GridTrackSizingDi
rection, const Vector<GridTrack>&) const; |
129 | 129 |
130 virtual void paintChildren(PaintInfo&, const LayoutPoint&) override; | 130 virtual void paintChildren(PaintInfo&, const LayoutPoint&) override; |
131 | 131 |
132 #if ENABLE(ASSERT) | 132 #if ENABLE(ASSERT) |
133 bool tracksAreWiderThanMinTrackBreadth(GridTrackSizingDirection, const Vecto
r<GridTrack>&); | 133 bool tracksAreWiderThanMinTrackBreadth(GridTrackSizingDirection, const Vecto
r<GridTrack>&); |
134 #endif | 134 #endif |
135 | 135 |
136 size_t gridItemSpan(const RenderBox&, GridTrackSizingDirection); | 136 size_t gridItemSpan(const RenderBox&, GridTrackSizingDirection); |
| 137 bool itemSpansFlexibleSizedTracks(const GridItemWithSpan&, GridTrackSizingDi
rection) const; |
137 | 138 |
138 size_t gridColumnCount() const | 139 size_t gridColumnCount() const |
139 { | 140 { |
140 ASSERT(!gridIsDirty()); | 141 ASSERT(!gridIsDirty()); |
141 return m_grid[0].size(); | 142 return m_grid[0].size(); |
142 } | 143 } |
143 size_t gridRowCount() const | 144 size_t gridRowCount() const |
144 { | 145 { |
145 ASSERT(!gridIsDirty()); | 146 ASSERT(!gridIsDirty()); |
146 return m_grid.size(); | 147 return m_grid.size(); |
147 } | 148 } |
148 | 149 |
149 typedef Vector<Vector<GridCell> > GridRepresentation; | 150 typedef Vector<Vector<GridCell> > GridRepresentation; |
150 GridRepresentation m_grid; | 151 GridRepresentation m_grid; |
151 bool m_gridIsDirty; | 152 bool m_gridIsDirty; |
152 Vector<LayoutUnit> m_rowPositions; | 153 Vector<LayoutUnit> m_rowPositions; |
153 Vector<LayoutUnit> m_columnPositions; | 154 Vector<LayoutUnit> m_columnPositions; |
154 HashMap<const RenderBox*, GridCoordinate> m_gridItemCoordinate; | 155 HashMap<const RenderBox*, GridCoordinate> m_gridItemCoordinate; |
155 OrderIterator m_orderIterator; | 156 OrderIterator m_orderIterator; |
156 Vector<RenderBox*> m_gridItemsOverflowingGridArea; | 157 Vector<RenderBox*> m_gridItemsOverflowingGridArea; |
157 HashMap<const RenderBox*, size_t> m_gridItemsIndexesMap; | 158 HashMap<const RenderBox*, size_t> m_gridItemsIndexesMap; |
158 }; | 159 }; |
159 | 160 |
160 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderGrid, isRenderGrid()); | 161 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderGrid, isRenderGrid()); |
161 | 162 |
162 } // namespace blink | 163 } // namespace blink |
163 | 164 |
164 #endif // RenderGrid_h | 165 #endif // RenderGrid_h |
OLD | NEW |