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

Unified 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: Patch for landing v3 Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutGrid.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutGrid.h b/third_party/WebKit/Source/core/layout/LayoutGrid.h
index bed3459ce4b8874b18fee9800895e8c31ffe75a3..fb9ae43eaf3c8a0ca704987e3add8ebc39c9531c 100644
--- a/third_party/WebKit/Source/core/layout/LayoutGrid.h
+++ b/third_party/WebKit/Source/core/layout/LayoutGrid.h
@@ -59,6 +59,8 @@ public:
void dirtyGrid();
+ Vector<LayoutUnit> trackSizesForComputedStyle(GridTrackSizingDirection) const;
+
const Vector<LayoutUnit>& columnPositions() const
{
ASSERT(!m_gridIsDirty);
@@ -71,13 +73,6 @@ public:
return m_rowPositions;
}
- LayoutUnit guttersSize(GridTrackSizingDirection, size_t span) const;
-
- LayoutUnit offsetBetweenTracks(GridTrackSizingDirection direction) const
- {
- return direction == ForColumns ? m_offsetBetweenColumns : m_offsetBetweenRows;
- }
-
typedef Vector<LayoutBox*, 1> GridCell;
const GridCell& gridCell(int row, int column) const
{
@@ -131,6 +126,12 @@ private:
size_t computeAutoRepeatTracksCount(GridTrackSizingDirection) const;
+ typedef ListHashSet<size_t> OrderedTrackIndexSet;
+ std::unique_ptr<OrderedTrackIndexSet> computeEmptyTracksForAutoRepeat(GridTrackSizingDirection) const;
+
+ bool hasAutoRepeatEmptyTracks(GridTrackSizingDirection) const;
+ bool isEmptyAutoRepeatTrack(GridTrackSizingDirection, size_t lineNumber) const;
+
void placeItemsOnGrid(SizingOperation);
void populateExplicitGridAndOrderIterator();
std::unique_ptr<GridArea> createEmptyGridAreaAtSpecifiedPositionsOutsideGrid(const LayoutBox&, GridTrackSizingDirection, const GridSpan& specifiedPositions) const;
@@ -200,6 +201,9 @@ private:
bool tracksAreWiderThanMinTrackBreadth(GridTrackSizingDirection, GridSizingData&);
#endif
+ LayoutUnit gridGapForDirection(GridTrackSizingDirection) const;
+ LayoutUnit guttersSize(GridTrackSizingDirection, size_t startLine, size_t span) const;
+
size_t gridItemSpan(const LayoutBox&, GridTrackSizingDirection);
bool spanningItemCrossesFlexibleSizedTracks(const GridSpan&, GridTrackSizingDirection, SizingOperation) const;
@@ -231,6 +235,9 @@ private:
size_t m_autoRepeatRows { 0 };
bool m_hasAnyOrthogonalChild;
+
+ std::unique_ptr<OrderedTrackIndexSet> m_autoRepeatEmptyColumns { nullptr };
+ std::unique_ptr<OrderedTrackIndexSet> m_autoRepeatEmptyRows { nullptr };
};
DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid());

Powered by Google App Engine
This is Rietveld 408576698