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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 void placeSpecifiedMajorAxisItemsOnGrid(const Vector<LayoutBox*>&); | 136 void placeSpecifiedMajorAxisItemsOnGrid(const Vector<LayoutBox*>&); |
137 void placeAutoMajorAxisItemsOnGrid(const Vector<LayoutBox*>&); | 137 void placeAutoMajorAxisItemsOnGrid(const Vector<LayoutBox*>&); |
138 void placeAutoMajorAxisItemOnGrid(LayoutBox&, std::pair<size_t, size_t>& aut
oPlacementCursor); | 138 void placeAutoMajorAxisItemOnGrid(LayoutBox&, std::pair<size_t, size_t>& aut
oPlacementCursor); |
139 GridTrackSizingDirection autoPlacementMajorAxisDirection() const; | 139 GridTrackSizingDirection autoPlacementMajorAxisDirection() const; |
140 GridTrackSizingDirection autoPlacementMinorAxisDirection() const; | 140 GridTrackSizingDirection autoPlacementMinorAxisDirection() const; |
141 | 141 |
142 void computeIntrinsicLogicalHeight(GridSizingData&); | 142 void computeIntrinsicLogicalHeight(GridSizingData&); |
143 LayoutUnit computeTrackBasedLogicalHeight(const GridSizingData&) const; | 143 LayoutUnit computeTrackBasedLogicalHeight(const GridSizingData&) const; |
144 void computeTrackSizesForDirection(GridTrackSizingDirection, GridSizingData&
, LayoutUnit freeSpace); | 144 void computeTrackSizesForDirection(GridTrackSizingDirection, GridSizingData&
, LayoutUnit freeSpace); |
145 | 145 |
| 146 void repeatTracksSizingIfNeeded(GridSizingData&, LayoutUnit availableSpaceFo
rColumns, LayoutUnit availableSpaceForRows); |
| 147 |
146 void layoutGridItems(GridSizingData&); | 148 void layoutGridItems(GridSizingData&); |
147 void prepareChildForPositionedLayout(LayoutBox&); | 149 void prepareChildForPositionedLayout(LayoutBox&); |
148 void layoutPositionedObjects(bool relayoutChildren, PositionedLayoutBehavior
= DefaultLayout); | 150 void layoutPositionedObjects(bool relayoutChildren, PositionedLayoutBehavior
= DefaultLayout); |
149 void offsetAndBreadthForPositionedChild(const LayoutBox&, GridTrackSizingDir
ection, LayoutUnit& offset, LayoutUnit& breadth); | 151 void offsetAndBreadthForPositionedChild(const LayoutBox&, GridTrackSizingDir
ection, LayoutUnit& offset, LayoutUnit& breadth); |
150 void populateGridPositions(GridSizingData&); | 152 void populateGridPositions(GridSizingData&); |
151 | 153 |
152 typedef struct GridItemsSpanGroupRange GridItemsSpanGroupRange; | 154 typedef struct GridItemsSpanGroupRange GridItemsSpanGroupRange; |
153 LayoutUnit currentItemSizeForTrackSizeComputationPhase(TrackSizeComputationP
hase, LayoutBox&, GridTrackSizingDirection, GridSizingData&); | 155 LayoutUnit currentItemSizeForTrackSizeComputationPhase(TrackSizeComputationP
hase, LayoutBox&, GridTrackSizingDirection, GridSizingData&); |
154 void resolveContentBasedTrackSizingFunctionsForNonSpanningItems(GridTrackSiz
ingDirection, const GridSpan&, LayoutBox& gridItem, GridTrack&, GridSizingData&)
; | 156 void resolveContentBasedTrackSizingFunctionsForNonSpanningItems(GridTrackSiz
ingDirection, const GridSpan&, LayoutBox& gridItem, GridTrack&, GridSizingData&)
; |
155 template <TrackSizeComputationPhase> void resolveContentBasedTrackSizingFunc
tionsForItems(GridTrackSizingDirection, GridSizingData&, const GridItemsSpanGrou
pRange&); | 157 template <TrackSizeComputationPhase> void resolveContentBasedTrackSizingFunc
tionsForItems(GridTrackSizingDirection, GridSizingData&, const GridItemsSpanGrou
pRange&); |
(...skipping 15 matching lines...) Expand all Loading... |
171 GridAxisPosition rowAxisPositionForChild(const LayoutBox&) const; | 173 GridAxisPosition rowAxisPositionForChild(const LayoutBox&) const; |
172 LayoutUnit rowAxisOffsetForChild(const LayoutBox&, GridSizingData&) const; | 174 LayoutUnit rowAxisOffsetForChild(const LayoutBox&, GridSizingData&) const; |
173 LayoutUnit columnAxisOffsetForChild(const LayoutBox&, GridSizingData&) const
; | 175 LayoutUnit columnAxisOffsetForChild(const LayoutBox&, GridSizingData&) const
; |
174 ContentAlignmentData computeContentPositionAndDistributionOffset(GridTrackSi
zingDirection, const LayoutUnit& availableFreeSpace, unsigned numberOfGridTracks
) const; | 176 ContentAlignmentData computeContentPositionAndDistributionOffset(GridTrackSi
zingDirection, const LayoutUnit& availableFreeSpace, unsigned numberOfGridTracks
) const; |
175 LayoutPoint findChildLogicalPosition(const LayoutBox&, GridSizingData&) cons
t; | 177 LayoutPoint findChildLogicalPosition(const LayoutBox&, GridSizingData&) cons
t; |
176 GridArea cachedGridArea(const LayoutBox&) const; | 178 GridArea cachedGridArea(const LayoutBox&) const; |
177 GridSpan cachedGridSpan(const LayoutBox&, GridTrackSizingDirection) const; | 179 GridSpan cachedGridSpan(const LayoutBox&, GridTrackSizingDirection) const; |
178 | 180 |
179 LayoutUnit gridAreaBreadthForChild(const LayoutBox& child, GridTrackSizingDi
rection, const GridSizingData&) const; | 181 LayoutUnit gridAreaBreadthForChild(const LayoutBox& child, GridTrackSizingDi
rection, const GridSizingData&) const; |
180 LayoutUnit gridAreaBreadthForChildIncludingAlignmentOffsets(const LayoutBox&
, GridTrackSizingDirection, const GridSizingData&) const; | 182 LayoutUnit gridAreaBreadthForChildIncludingAlignmentOffsets(const LayoutBox&
, GridTrackSizingDirection, const GridSizingData&) const; |
| 183 LayoutUnit assumedRowsSizeForOrthogonalChild(const LayoutBox&) const; |
181 | 184 |
182 void applyStretchAlignmentToTracksIfNeeded(GridTrackSizingDirection, GridSiz
ingData&); | 185 void applyStretchAlignmentToTracksIfNeeded(GridTrackSizingDirection, GridSiz
ingData&); |
183 | 186 |
184 void paintChildren(const PaintInfo&, const LayoutPoint&) const override; | 187 void paintChildren(const PaintInfo&, const LayoutPoint&) const override; |
185 | 188 |
186 LayoutUnit marginLogicalHeightForChild(const LayoutBox&) const; | 189 LayoutUnit marginLogicalHeightForChild(const LayoutBox&) const; |
187 LayoutUnit computeMarginLogicalSizeForChild(MarginDirection, const LayoutBox
&) const; | 190 LayoutUnit computeMarginLogicalSizeForChild(MarginDirection, const LayoutBox
&) const; |
188 LayoutUnit availableAlignmentSpaceForChildBeforeStretching(LayoutUnit gridAr
eaBreadthForChild, const LayoutBox&) const; | 191 LayoutUnit availableAlignmentSpaceForChildBeforeStretching(LayoutUnit gridAr
eaBreadthForChild, const LayoutBox&) const; |
189 void applyStretchAlignmentToChildIfNeeded(LayoutBox&); | 192 void applyStretchAlignmentToChildIfNeeded(LayoutBox&); |
190 bool hasAutoMarginsInColumnAxis(const LayoutBox&) const; | 193 bool hasAutoMarginsInColumnAxis(const LayoutBox&) const; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 HashMap<const LayoutBox*, size_t> m_gridItemsIndexesMap; | 231 HashMap<const LayoutBox*, size_t> m_gridItemsIndexesMap; |
229 | 232 |
230 LayoutUnit m_minContentHeight { -1 }; | 233 LayoutUnit m_minContentHeight { -1 }; |
231 LayoutUnit m_maxContentHeight { -1 }; | 234 LayoutUnit m_maxContentHeight { -1 }; |
232 | 235 |
233 int m_smallestRowStart; | 236 int m_smallestRowStart; |
234 int m_smallestColumnStart; | 237 int m_smallestColumnStart; |
235 | 238 |
236 size_t m_autoRepeatColumns { 0 }; | 239 size_t m_autoRepeatColumns { 0 }; |
237 size_t m_autoRepeatRows { 0 }; | 240 size_t m_autoRepeatRows { 0 }; |
| 241 |
| 242 bool m_hasAnyOrthogonalChild; |
238 }; | 243 }; |
239 | 244 |
240 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid()); | 245 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid()); |
241 | 246 |
242 } // namespace blink | 247 } // namespace blink |
243 | 248 |
244 #endif // LayoutGrid_h | 249 #endif // LayoutGrid_h |
OLD | NEW |