Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutGrid.h

Issue 2080643002: [css-grid] Implement repeat(auto-fit) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build (debug) fix Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 void computeUsedBreadthOfGridTracks(GridTrackSizingDirection, GridSizingData &, LayoutUnit& baseSizesWithoutMaximization, LayoutUnit& growthLimitsWithoutMaxi mization); 123 void computeUsedBreadthOfGridTracks(GridTrackSizingDirection, GridSizingData &, LayoutUnit& baseSizesWithoutMaximization, LayoutUnit& growthLimitsWithoutMaxi mization);
124 LayoutUnit computeUsedBreadthOfMinLength(const GridLength&, LayoutUnit maxBr eadth) const; 124 LayoutUnit computeUsedBreadthOfMinLength(const GridLength&, LayoutUnit maxBr eadth) const;
125 LayoutUnit computeUsedBreadthOfMaxLength(const GridLength&, LayoutUnit usedB readth, LayoutUnit maxBreadth) const; 125 LayoutUnit computeUsedBreadthOfMaxLength(const GridLength&, LayoutUnit usedB readth, LayoutUnit maxBreadth) const;
126 void resolveContentBasedTrackSizingFunctions(GridTrackSizingDirection, GridS izingData&); 126 void resolveContentBasedTrackSizingFunctions(GridTrackSizingDirection, GridS izingData&);
127 127
128 void ensureGridSize(size_t maximumRowSize, size_t maximumColumnSize); 128 void ensureGridSize(size_t maximumRowSize, size_t maximumColumnSize);
129 void insertItemIntoGrid(LayoutBox&, const GridArea&); 129 void insertItemIntoGrid(LayoutBox&, const GridArea&);
130 130
131 size_t computeAutoRepeatTracksCount(GridTrackSizingDirection) const; 131 size_t computeAutoRepeatTracksCount(GridTrackSizingDirection) const;
132 132
133 std::unique_ptr<Vector<size_t>> computeEmptyTracksCountForAutoRepeat(GridTra ckSizingDirection, size_t insertionPoint) const;
134 size_t droppedTracksBeforeLine(GridTrackSizingDirection, size_t startLine) c onst;
135
133 void placeItemsOnGrid(); 136 void placeItemsOnGrid();
134 void populateExplicitGridAndOrderIterator(); 137 void populateExplicitGridAndOrderIterator();
135 PassOwnPtr<GridArea> createEmptyGridAreaAtSpecifiedPositionsOutsideGrid(cons t LayoutBox&, GridTrackSizingDirection, const GridSpan& specifiedPositions) cons t; 138 PassOwnPtr<GridArea> createEmptyGridAreaAtSpecifiedPositionsOutsideGrid(cons t LayoutBox&, GridTrackSizingDirection, const GridSpan& specifiedPositions) cons t;
136 void placeSpecifiedMajorAxisItemsOnGrid(const Vector<LayoutBox*>&); 139 void placeSpecifiedMajorAxisItemsOnGrid(const Vector<LayoutBox*>&);
137 void placeAutoMajorAxisItemsOnGrid(const Vector<LayoutBox*>&); 140 void placeAutoMajorAxisItemsOnGrid(const Vector<LayoutBox*>&);
138 void placeAutoMajorAxisItemOnGrid(LayoutBox&, std::pair<size_t, size_t>& aut oPlacementCursor); 141 void placeAutoMajorAxisItemOnGrid(LayoutBox&, std::pair<size_t, size_t>& aut oPlacementCursor);
139 GridTrackSizingDirection autoPlacementMajorAxisDirection() const; 142 GridTrackSizingDirection autoPlacementMajorAxisDirection() const;
140 GridTrackSizingDirection autoPlacementMinorAxisDirection() const; 143 GridTrackSizingDirection autoPlacementMinorAxisDirection() const;
141 144
142 void computeIntrinsicLogicalHeight(GridSizingData&); 145 void computeIntrinsicLogicalHeight(GridSizingData&);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 std::unique_ptr<Vector<size_t>> m_emptyColumnsCounter { nullptr };
233 std::unique_ptr<Vector<size_t>> m_emptyRowsCounter { nullptr };
228 }; 234 };
229 235
230 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid()); 236 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid());
231 237
232 } // namespace blink 238 } // namespace blink
233 239
234 #endif // LayoutGrid_h 240 #endif // LayoutGrid_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698