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

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: New approach (Step3) - Assumed row track's breadth for intrinsic size computation. Created 5 years, 1 month 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 c7885c8969f08726eb6406fcb63f68bb5c1bdfad..b08d87f28c2db0daed5e1c6a8a0d3af5efb2b453 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&) const;
@@ -161,8 +161,9 @@ private:
GridCoordinate cachedGridCoordinate(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,10 @@ 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);
typedef Vector<Vector<GridCell>> GridRepresentation;
GridRepresentation m_grid;

Powered by Google App Engine
This is Rietveld 408576698