| 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 populateGridPositionsForDirection(GridSizingData&, GridTrackSizingDirec
tion); | 152 void populateGridPositionsForDirection(GridSizingData&, GridTrackSizingDirec
tion); |
| 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&, SizingOperati
on) 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 27 matching lines...) Expand all Loading... |
| 218 HashMap<const LayoutBox*, size_t> m_gridItemsIndexesMap; | 221 HashMap<const LayoutBox*, size_t> m_gridItemsIndexesMap; |
| 219 | 222 |
| 220 LayoutUnit m_minContentHeight { -1 }; | 223 LayoutUnit m_minContentHeight { -1 }; |
| 221 LayoutUnit m_maxContentHeight { -1 }; | 224 LayoutUnit m_maxContentHeight { -1 }; |
| 222 | 225 |
| 223 int m_smallestRowStart; | 226 int m_smallestRowStart; |
| 224 int m_smallestColumnStart; | 227 int m_smallestColumnStart; |
| 225 | 228 |
| 226 size_t m_autoRepeatColumns { 0 }; | 229 size_t m_autoRepeatColumns { 0 }; |
| 227 size_t m_autoRepeatRows { 0 }; | 230 size_t m_autoRepeatRows { 0 }; |
| 231 |
| 232 bool m_hasAnyOrthogonalChild; |
| 228 }; | 233 }; |
| 229 | 234 |
| 230 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid()); | 235 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid()); |
| 231 | 236 |
| 232 } // namespace blink | 237 } // namespace blink |
| 233 | 238 |
| 234 #endif // LayoutGrid_h | 239 #endif // LayoutGrid_h |
| OLD | NEW |