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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 void layoutPositionedObjects(bool relayoutChildren, PositionedLayoutBehavior
= DefaultLayout); | 128 void layoutPositionedObjects(bool relayoutChildren, PositionedLayoutBehavior
= DefaultLayout); |
129 void offsetAndBreadthForPositionedChild(const LayoutBox&, GridTrackSizingDir
ection, bool startIsAuto, bool endIsAuto, LayoutUnit& offset, LayoutUnit& breadt
h); | 129 void offsetAndBreadthForPositionedChild(const LayoutBox&, GridTrackSizingDir
ection, bool startIsAuto, bool endIsAuto, LayoutUnit& offset, LayoutUnit& breadt
h); |
130 void populateGridPositions(GridSizingData&, LayoutUnit availableSpaceForColu
mns, LayoutUnit availableSpaceForRows); | 130 void populateGridPositions(GridSizingData&, LayoutUnit availableSpaceForColu
mns, LayoutUnit availableSpaceForRows); |
131 | 131 |
132 typedef struct GridItemsSpanGroupRange GridItemsSpanGroupRange; | 132 typedef struct GridItemsSpanGroupRange GridItemsSpanGroupRange; |
133 LayoutUnit currentItemSizeForTrackSizeComputationPhase(TrackSizeComputationP
hase, LayoutBox&, GridTrackSizingDirection, Vector<GridTrack>& columnTracks); | 133 LayoutUnit currentItemSizeForTrackSizeComputationPhase(TrackSizeComputationP
hase, LayoutBox&, GridTrackSizingDirection, Vector<GridTrack>& columnTracks); |
134 void resolveContentBasedTrackSizingFunctionsForNonSpanningItems(GridTrackSiz
ingDirection, const GridCoordinate&, LayoutBox& gridItem, GridTrack&, Vector<Gri
dTrack>& columnTracks); | 134 void resolveContentBasedTrackSizingFunctionsForNonSpanningItems(GridTrackSiz
ingDirection, const GridCoordinate&, LayoutBox& gridItem, GridTrack&, Vector<Gri
dTrack>& columnTracks); |
135 template <TrackSizeComputationPhase> void resolveContentBasedTrackSizingFunc
tionsForItems(GridTrackSizingDirection, GridSizingData&, const GridItemsSpanGrou
pRange&); | 135 template <TrackSizeComputationPhase> void resolveContentBasedTrackSizingFunc
tionsForItems(GridTrackSizingDirection, GridSizingData&, const GridItemsSpanGrou
pRange&); |
136 template <TrackSizeComputationPhase> void distributeSpaceToTracks(Vector<Gri
dTrack*>&, const Vector<GridTrack*>* growBeyondGrowthLimitsTracks, GridSizingDat
a&, LayoutUnit& availableLogicalSpace); | 136 template <TrackSizeComputationPhase> void distributeSpaceToTracks(Vector<Gri
dTrack*>&, const Vector<GridTrack*>* growBeyondGrowthLimitsTracks, GridSizingDat
a&, LayoutUnit& availableLogicalSpace); |
137 | 137 |
138 double computeNormalizedFractionBreadth(Vector<GridTrack>&, const GridSpan&
tracksSpan, GridTrackSizingDirection, LayoutUnit availableLogicalSpace) const; | 138 typedef HashSet<size_t, DefaultHash<size_t>::Hash, WTF::UnsignedWithZeroKeyH
ashTraits<size_t>> TrackIndexSet; |
| 139 double computeFlexFactorUnitSize(const Vector<GridTrack>&, GridTrackSizingDi
rection, double flexFactorSum, LayoutUnit& leftOverSpace, const Vector<size_t, 8
>& flexibleTracksIndexes, PassOwnPtr<TrackIndexSet> tracksToTreatAsInflexible =
nullptr) const; |
| 140 double findFlexFactorUnitSize(const Vector<GridTrack>&, const GridSpan&, Gri
dTrackSizingDirection, LayoutUnit leftOverSpace) const; |
139 | 141 |
140 GridTrackSize gridTrackSize(GridTrackSizingDirection, size_t) const; | 142 GridTrackSize gridTrackSize(GridTrackSizingDirection, size_t) const; |
141 | 143 |
142 LayoutUnit logicalHeightForChild(LayoutBox&, Vector<GridTrack>&); | 144 LayoutUnit logicalHeightForChild(LayoutBox&, Vector<GridTrack>&); |
143 LayoutUnit minSizeForChild(LayoutBox&, GridTrackSizingDirection, Vector<Grid
Track>& columnTracks); | 145 LayoutUnit minSizeForChild(LayoutBox&, GridTrackSizingDirection, Vector<Grid
Track>& columnTracks); |
144 LayoutUnit minContentForChild(LayoutBox&, GridTrackSizingDirection, Vector<G
ridTrack>& columnTracks); | 146 LayoutUnit minContentForChild(LayoutBox&, GridTrackSizingDirection, Vector<G
ridTrack>& columnTracks); |
145 LayoutUnit maxContentForChild(LayoutBox&, GridTrackSizingDirection, Vector<G
ridTrack>& columnTracks); | 147 LayoutUnit maxContentForChild(LayoutBox&, GridTrackSizingDirection, Vector<G
ridTrack>& columnTracks); |
146 GridAxisPosition columnAxisPositionForChild(const LayoutBox&) const; | 148 GridAxisPosition columnAxisPositionForChild(const LayoutBox&) const; |
147 GridAxisPosition rowAxisPositionForChild(const LayoutBox&) const; | 149 GridAxisPosition rowAxisPositionForChild(const LayoutBox&) const; |
148 LayoutUnit rowAxisOffsetForChild(const LayoutBox&) const; | 150 LayoutUnit rowAxisOffsetForChild(const LayoutBox&) const; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 OrderIterator m_orderIterator; | 198 OrderIterator m_orderIterator; |
197 Vector<LayoutBox*> m_gridItemsOverflowingGridArea; | 199 Vector<LayoutBox*> m_gridItemsOverflowingGridArea; |
198 HashMap<const LayoutBox*, size_t> m_gridItemsIndexesMap; | 200 HashMap<const LayoutBox*, size_t> m_gridItemsIndexesMap; |
199 }; | 201 }; |
200 | 202 |
201 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid()); | 203 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid()); |
202 | 204 |
203 } // namespace blink | 205 } // namespace blink |
204 | 206 |
205 #endif // LayoutGrid_h | 207 #endif // LayoutGrid_h |
OLD | NEW |