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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 struct GridSizingData; | 117 struct GridSizingData; |
118 enum SizingOperation { TrackSizing, IntrinsicSizeComputation }; | 118 enum SizingOperation { TrackSizing, IntrinsicSizeComputation }; |
119 void computeUsedBreadthOfGridTracks(GridTrackSizingDirection, GridSizingData
&, LayoutUnit& baseSizesWithoutMaximization, LayoutUnit& growthLimitsWithoutMaxi
mization) const; | 119 void computeUsedBreadthOfGridTracks(GridTrackSizingDirection, GridSizingData
&, LayoutUnit& baseSizesWithoutMaximization, LayoutUnit& growthLimitsWithoutMaxi
mization) const; |
120 LayoutUnit computeUsedBreadthOfMinLength(const GridLength&, LayoutUnit maxBr
eadth) const; | 120 LayoutUnit computeUsedBreadthOfMinLength(const GridLength&, LayoutUnit maxBr
eadth) const; |
121 LayoutUnit computeUsedBreadthOfMaxLength(const GridLength&, LayoutUnit usedB
readth, LayoutUnit maxBreadth) const; | 121 LayoutUnit computeUsedBreadthOfMaxLength(const GridLength&, LayoutUnit usedB
readth, LayoutUnit maxBreadth) const; |
122 void resolveContentBasedTrackSizingFunctions(GridTrackSizingDirection, GridS
izingData&) const; | 122 void resolveContentBasedTrackSizingFunctions(GridTrackSizingDirection, GridS
izingData&) const; |
123 | 123 |
124 void ensureGridSize(size_t maximumRowSize, size_t maximumColumnSize); | 124 void ensureGridSize(size_t maximumRowSize, size_t maximumColumnSize); |
125 void insertItemIntoGrid(LayoutBox&, const GridArea&); | 125 void insertItemIntoGrid(LayoutBox&, const GridArea&); |
126 | 126 |
127 size_t computeAutoRepeatTracksCount(GridTrackSizingDirection) const; | 127 size_t computeAutoRepeatTracksCount(GridTrackSizingDirection, SizingOperatio
n) const; |
128 | 128 |
129 typedef ListHashSet<size_t> OrderedTrackIndexSet; | 129 typedef ListHashSet<size_t> OrderedTrackIndexSet; |
130 std::unique_ptr<OrderedTrackIndexSet> computeEmptyTracksForAutoRepeat(GridTr
ackSizingDirection) const; | 130 std::unique_ptr<OrderedTrackIndexSet> computeEmptyTracksForAutoRepeat(GridTr
ackSizingDirection) const; |
131 | 131 |
132 bool hasAutoRepeatEmptyTracks(GridTrackSizingDirection) const; | 132 bool hasAutoRepeatEmptyTracks(GridTrackSizingDirection) const; |
133 bool isEmptyAutoRepeatTrack(GridTrackSizingDirection, size_t lineNumber) con
st; | 133 bool isEmptyAutoRepeatTrack(GridTrackSizingDirection, size_t lineNumber) con
st; |
134 | 134 |
135 void placeItemsOnGrid(size_t autoRepeatColumnsCount); | 135 void placeItemsOnGrid(SizingOperation); |
136 void populateExplicitGridAndOrderIterator(); | 136 void populateExplicitGridAndOrderIterator(); |
137 std::unique_ptr<GridArea> createEmptyGridAreaAtSpecifiedPositionsOutsideGrid
(const LayoutBox&, GridTrackSizingDirection, const GridSpan& specifiedPositions)
const; | 137 std::unique_ptr<GridArea> createEmptyGridAreaAtSpecifiedPositionsOutsideGrid
(const LayoutBox&, GridTrackSizingDirection, const GridSpan& specifiedPositions)
const; |
138 void placeSpecifiedMajorAxisItemsOnGrid(const Vector<LayoutBox*>&); | 138 void placeSpecifiedMajorAxisItemsOnGrid(const Vector<LayoutBox*>&); |
139 void placeAutoMajorAxisItemsOnGrid(const Vector<LayoutBox*>&); | 139 void placeAutoMajorAxisItemsOnGrid(const Vector<LayoutBox*>&); |
140 void placeAutoMajorAxisItemOnGrid(LayoutBox&, std::pair<size_t, size_t>& aut
oPlacementCursor); | 140 void placeAutoMajorAxisItemOnGrid(LayoutBox&, std::pair<size_t, size_t>& aut
oPlacementCursor); |
141 GridTrackSizingDirection autoPlacementMajorAxisDirection() const; | 141 GridTrackSizingDirection autoPlacementMajorAxisDirection() const; |
142 GridTrackSizingDirection autoPlacementMinorAxisDirection() const; | 142 GridTrackSizingDirection autoPlacementMinorAxisDirection() const; |
143 | 143 |
144 void computeIntrinsicLogicalHeight(GridSizingData&); | 144 void computeIntrinsicLogicalHeight(GridSizingData&); |
145 LayoutUnit computeTrackBasedLogicalHeight(const GridSizingData&) const; | 145 LayoutUnit computeTrackBasedLogicalHeight(const GridSizingData&) const; |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 | 240 |
241 std::unique_ptr<OrderedTrackIndexSet> m_autoRepeatEmptyColumns { nullptr }; | 241 std::unique_ptr<OrderedTrackIndexSet> m_autoRepeatEmptyColumns { nullptr }; |
242 std::unique_ptr<OrderedTrackIndexSet> m_autoRepeatEmptyRows { nullptr }; | 242 std::unique_ptr<OrderedTrackIndexSet> m_autoRepeatEmptyRows { nullptr }; |
243 }; | 243 }; |
244 | 244 |
245 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid()); | 245 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid()); |
246 | 246 |
247 } // namespace blink | 247 } // namespace blink |
248 | 248 |
249 #endif // LayoutGrid_h | 249 #endif // LayoutGrid_h |
OLD | NEW |