| 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 LayoutUnit childIntrinsicWidth(const LayoutBox&) const; | 165 LayoutUnit childIntrinsicWidth(const LayoutBox&) const; |
| 166 LayoutUnit intrinsicLogicalHeightForChild(const LayoutBox&) const; | 166 LayoutUnit intrinsicLogicalHeightForChild(const LayoutBox&) const; |
| 167 LayoutUnit marginLogicalHeightForChild(const LayoutBox&) const; | 167 LayoutUnit marginLogicalHeightForChild(const LayoutBox&) const; |
| 168 LayoutUnit computeMarginLogicalHeightForChild(const LayoutBox&) const; | 168 LayoutUnit computeMarginLogicalHeightForChild(const LayoutBox&) const; |
| 169 LayoutUnit availableAlignmentSpaceForChildBeforeStretching(LayoutUnit gridAr
eaBreadthForChild, const LayoutBox&) const; | 169 LayoutUnit availableAlignmentSpaceForChildBeforeStretching(LayoutUnit gridAr
eaBreadthForChild, const LayoutBox&) const; |
| 170 void applyStretchAlignmentToChildIfNeeded(LayoutBox&); | 170 void applyStretchAlignmentToChildIfNeeded(LayoutBox&); |
| 171 bool hasAutoMarginsInColumnAxis(const LayoutBox&) const; | 171 bool hasAutoMarginsInColumnAxis(const LayoutBox&) const; |
| 172 bool hasAutoMarginsInRowAxis(const LayoutBox&) const; | 172 bool hasAutoMarginsInRowAxis(const LayoutBox&) const; |
| 173 void updateAutoMarginsInColumnAxisIfNeeded(LayoutBox&); | 173 void updateAutoMarginsInColumnAxisIfNeeded(LayoutBox&); |
| 174 void updateAutoMarginsInRowAxisIfNeeded(LayoutBox&); | 174 void updateAutoMarginsInRowAxisIfNeeded(LayoutBox&); |
| 175 LayoutUnit marginBoxAscentFromBaselineForChild(const LayoutBox&) const; |
| 176 void updateBaselineAlignmentContextInRowAxisIfNeeded(LayoutBox*, GridSizingD
ata&) const; |
| 177 void applyBaselineAlignmentIfNeeded(const GridSizingData&); |
| 178 |
| 179 int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePo
sitionMode = PositionOnContainingLine) const override; |
| 180 int firstLineBoxBaseline() const override; |
| 181 int inlineBlockBaseline(LineDirectionMode) const override; |
| 175 | 182 |
| 176 #if ENABLE(ASSERT) | 183 #if ENABLE(ASSERT) |
| 177 bool tracksAreWiderThanMinTrackBreadth(GridTrackSizingDirection, const Vecto
r<GridTrack>&); | 184 bool tracksAreWiderThanMinTrackBreadth(GridTrackSizingDirection, const Vecto
r<GridTrack>&); |
| 178 #endif | 185 #endif |
| 179 | 186 |
| 180 size_t gridItemSpan(const LayoutBox&, GridTrackSizingDirection); | 187 size_t gridItemSpan(const LayoutBox&, GridTrackSizingDirection); |
| 181 bool spanningItemCrossesFlexibleSizedTracks(const GridCoordinate&, GridTrack
SizingDirection) const; | 188 bool spanningItemCrossesFlexibleSizedTracks(const GridCoordinate&, GridTrack
SizingDirection) const; |
| 182 | 189 |
| 183 size_t gridColumnCount() const | 190 size_t gridColumnCount() const |
| 184 { | 191 { |
| 185 ASSERT(!m_gridIsDirty); | 192 ASSERT(!m_gridIsDirty); |
| 186 return m_grid[0].size(); | 193 return m_grid[0].size(); |
| 187 } | 194 } |
| 188 size_t gridRowCount() const | 195 size_t gridRowCount() const |
| 189 { | 196 { |
| 190 ASSERT(!m_gridIsDirty); | 197 ASSERT(!m_gridIsDirty); |
| 191 return m_grid.size(); | 198 return m_grid.size(); |
| 192 } | 199 } |
| 193 | 200 |
| 194 bool hasDefiniteLogicalSize(GridTrackSizingDirection) const; | 201 bool hasDefiniteLogicalSize(GridTrackSizingDirection) const; |
| 195 | 202 |
| 196 typedef Vector<Vector<GridCell>> GridRepresentation; | 203 typedef Vector<Vector<GridCell>> GridRepresentation; |
| 197 GridRepresentation m_grid; | 204 GridRepresentation m_grid; |
| 198 bool m_gridIsDirty; | 205 bool m_gridIsDirty; |
| 199 Vector<LayoutUnit> m_rowPositions; | 206 Vector<LayoutUnit> m_rowPositions; |
| 200 Vector<LayoutUnit> m_columnPositions; | 207 Vector<LayoutUnit> m_columnPositions; |
| 201 HashMap<const LayoutBox*, GridCoordinate> m_gridItemCoordinate; | 208 HashMap<const LayoutBox*, GridCoordinate> m_gridItemCoordinate; |
| 202 OrderIterator m_orderIterator; | 209 mutable OrderIterator m_orderIterator; |
| 203 Vector<LayoutBox*> m_gridItemsOverflowingGridArea; | 210 Vector<LayoutBox*> m_gridItemsOverflowingGridArea; |
| 204 HashMap<const LayoutBox*, size_t> m_gridItemsIndexesMap; | 211 HashMap<const LayoutBox*, size_t> m_gridItemsIndexesMap; |
| 205 }; | 212 }; |
| 206 | 213 |
| 207 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid()); | 214 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid()); |
| 208 | 215 |
| 209 } // namespace blink | 216 } // namespace blink |
| 210 | 217 |
| 211 #endif // LayoutGrid_h | 218 #endif // LayoutGrid_h |
| OLD | NEW |