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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutGrid.h

Issue 815833005: [css-grid] Handle min-content/max-content with orthogonal flows (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch rebased and applied the suggested changes. Created 4 years, 9 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 a62fd6cf83df205e2e464820cd4f7296f8d5d0bb..87b34cef602fcfe0e608a5a7244ef8d811e4016d 100644
--- a/third_party/WebKit/Source/core/layout/LayoutGrid.h
+++ b/third_party/WebKit/Source/core/layout/LayoutGrid.h
@@ -137,8 +137,8 @@ private:
void populateGridPositions(GridSizingData&);
typedef struct GridItemsSpanGroupRange GridItemsSpanGroupRange;
- LayoutUnit currentItemSizeForTrackSizeComputationPhase(TrackSizeComputationPhase, LayoutBox&, GridTrackSizingDirection, Vector<GridTrack>& columnTracks);
- void resolveContentBasedTrackSizingFunctionsForNonSpanningItems(GridTrackSizingDirection, const GridSpan&, LayoutBox& gridItem, GridTrack&, Vector<GridTrack>& columnTracks);
+ LayoutUnit currentItemSizeForTrackSizeComputationPhase(TrackSizeComputationPhase, LayoutBox&, GridTrackSizingDirection, const GridSizingData&);
+ void resolveContentBasedTrackSizingFunctionsForNonSpanningItems(GridTrackSizingDirection, const GridSpan&, LayoutBox& gridItem, GridTrack&, const GridSizingData&);
template <TrackSizeComputationPhase> void resolveContentBasedTrackSizingFunctionsForItems(GridTrackSizingDirection, GridSizingData&, const GridItemsSpanGroupRange&);
template <TrackSizeComputationPhase> void distributeSpaceToTracks(Vector<GridTrack*>&, const Vector<GridTrack*>* growBeyondGrowthLimitsTracks, GridSizingData&, LayoutUnit& availableLogicalSpace);
@@ -148,10 +148,10 @@ private:
GridTrackSize gridTrackSize(GridTrackSizingDirection, size_t) const;
- LayoutUnit logicalHeightForChild(LayoutBox&, Vector<GridTrack>&);
- LayoutUnit minSizeForChild(LayoutBox&, GridTrackSizingDirection, Vector<GridTrack>& columnTracks);
- LayoutUnit minContentForChild(LayoutBox&, GridTrackSizingDirection, Vector<GridTrack>& columnTracks);
- LayoutUnit maxContentForChild(LayoutBox&, GridTrackSizingDirection, Vector<GridTrack>& columnTracks);
+ LayoutUnit logicalHeightForChild(LayoutBox&, const GridSizingData&);
+ LayoutUnit minSizeForChild(LayoutBox&, GridTrackSizingDirection, const GridSizingData&);
+ LayoutUnit minContentForChild(LayoutBox&, GridTrackSizingDirection, const GridSizingData&);
+ LayoutUnit maxContentForChild(LayoutBox&, GridTrackSizingDirection, const GridSizingData&);
GridAxisPosition columnAxisPositionForChild(const LayoutBox&) const;
GridAxisPosition rowAxisPositionForChild(const LayoutBox&) const;
LayoutUnit rowAxisOffsetForChild(const LayoutBox&, GridSizingData&) const;
@@ -161,8 +161,9 @@ private:
GridArea cachedGridArea(const LayoutBox&) const;
GridSpan cachedGridSpan(const LayoutBox&, GridTrackSizingDirection) const;
- LayoutUnit gridAreaBreadthForChild(const LayoutBox& child, GridTrackSizingDirection, const Vector<GridTrack>&) const;
+ LayoutUnit gridAreaBreadthForChild(const LayoutBox& child, GridTrackSizingDirection, const GridSizingData&) const;
LayoutUnit gridAreaBreadthForChildIncludingAlignmentOffsets(const LayoutBox&, GridTrackSizingDirection, const GridSizingData&) const;
+ LayoutUnit assumedRowsBreadthForOrthogonalChild(const LayoutBox&) const;
void applyStretchAlignmentToTracksIfNeeded(GridTrackSizingDirection, GridSizingData&);
@@ -200,6 +201,13 @@ private:
}
bool hasDefiniteLogicalSize(GridTrackSizingDirection) const;
+ bool hasAnyOrthogonalChild() const;
+ bool gridLengthIsIndefinite(const GridLength&, GridTrackSizingDirection) const;
+ LayoutUnit overrideContainingBlockBreadthForChild(const LayoutBox&, GridTrackSizingDirection);
+ void setOverrideContainingBlockBreadthForChild(LayoutBox&, GridTrackSizingDirection, LayoutUnit breadth);
+
+ bool isOrthogonalChild(const LayoutBox&) const;
+ GridTrackSizingDirection flowAwareDirectionForChild(const LayoutBox&, GridTrackSizingDirection) const;
typedef Vector<Vector<GridCell>> GridRepresentation;
GridRepresentation m_grid;

Powered by Google App Engine
This is Rietveld 408576698