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

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

Issue 1323053004: [CSS Grid Layout] Flex tracks sizing alg must handle 0fr values (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Applied suggested changes. Created 5 years, 3 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 void layoutPositionedObjects(bool relayoutChildren, PositionedLayoutBehavior = DefaultLayout); 128 void layoutPositionedObjects(bool relayoutChildren, PositionedLayoutBehavior = DefaultLayout);
129 void offsetAndBreadthForPositionedChild(const LayoutBox&, GridTrackSizingDir ection, bool startIsAuto, bool endIsAuto, LayoutUnit& offset, LayoutUnit& breadt h); 129 void offsetAndBreadthForPositionedChild(const LayoutBox&, GridTrackSizingDir ection, bool startIsAuto, bool endIsAuto, LayoutUnit& offset, LayoutUnit& breadt h);
130 void populateGridPositions(GridSizingData&, LayoutUnit availableSpaceForColu mns, LayoutUnit availableSpaceForRows); 130 void populateGridPositions(GridSizingData&, LayoutUnit availableSpaceForColu mns, LayoutUnit availableSpaceForRows);
131 131
132 typedef struct GridItemsSpanGroupRange GridItemsSpanGroupRange; 132 typedef struct GridItemsSpanGroupRange GridItemsSpanGroupRange;
133 LayoutUnit currentItemSizeForTrackSizeComputationPhase(TrackSizeComputationP hase, LayoutBox&, GridTrackSizingDirection, Vector<GridTrack>& columnTracks); 133 LayoutUnit currentItemSizeForTrackSizeComputationPhase(TrackSizeComputationP hase, LayoutBox&, GridTrackSizingDirection, Vector<GridTrack>& columnTracks);
134 void resolveContentBasedTrackSizingFunctionsForNonSpanningItems(GridTrackSiz ingDirection, const GridCoordinate&, LayoutBox& gridItem, GridTrack&, Vector<Gri dTrack>& columnTracks); 134 void resolveContentBasedTrackSizingFunctionsForNonSpanningItems(GridTrackSiz ingDirection, const GridCoordinate&, LayoutBox& gridItem, GridTrack&, Vector<Gri dTrack>& columnTracks);
135 template <TrackSizeComputationPhase> void resolveContentBasedTrackSizingFunc tionsForItems(GridTrackSizingDirection, GridSizingData&, const GridItemsSpanGrou pRange&); 135 template <TrackSizeComputationPhase> void resolveContentBasedTrackSizingFunc tionsForItems(GridTrackSizingDirection, GridSizingData&, const GridItemsSpanGrou pRange&);
136 template <TrackSizeComputationPhase> void distributeSpaceToTracks(Vector<Gri dTrack*>&, const Vector<GridTrack*>* growBeyondGrowthLimitsTracks, GridSizingDat a&, LayoutUnit& availableLogicalSpace); 136 template <TrackSizeComputationPhase> void distributeSpaceToTracks(Vector<Gri dTrack*>&, const Vector<GridTrack*>* growBeyondGrowthLimitsTracks, GridSizingDat a&, LayoutUnit& availableLogicalSpace);
137 137
138 double computeNormalizedFractionBreadth(Vector<GridTrack>&, const GridSpan& tracksSpan, GridTrackSizingDirection, LayoutUnit availableLogicalSpace) const; 138 typedef HashSet<size_t, DefaultHash<unsigned>::Hash, WTF::UnsignedWithZeroKe yHashTraits<size_t>> TrackIndexSet;
139 double findFrUnitSize(Vector<GridTrack>&, const GridSpan&, GridTrackSizingDi rection, LayoutUnit spaceToFill, TrackIndexSet tracksToTreatAsInflexible = Track IndexSet()) const;
esprehn 2015/09/10 01:03:14 This is creating copies of the TrackIndexSet, you
139 140
140 GridTrackSize gridTrackSize(GridTrackSizingDirection, size_t) const; 141 GridTrackSize gridTrackSize(GridTrackSizingDirection, size_t) const;
141 142
142 LayoutUnit logicalHeightForChild(LayoutBox&, Vector<GridTrack>&); 143 LayoutUnit logicalHeightForChild(LayoutBox&, Vector<GridTrack>&);
143 LayoutUnit minSizeForChild(LayoutBox&, GridTrackSizingDirection, Vector<Grid Track>& columnTracks); 144 LayoutUnit minSizeForChild(LayoutBox&, GridTrackSizingDirection, Vector<Grid Track>& columnTracks);
144 LayoutUnit minContentForChild(LayoutBox&, GridTrackSizingDirection, Vector<G ridTrack>& columnTracks); 145 LayoutUnit minContentForChild(LayoutBox&, GridTrackSizingDirection, Vector<G ridTrack>& columnTracks);
145 LayoutUnit maxContentForChild(LayoutBox&, GridTrackSizingDirection, Vector<G ridTrack>& columnTracks); 146 LayoutUnit maxContentForChild(LayoutBox&, GridTrackSizingDirection, Vector<G ridTrack>& columnTracks);
146 GridAxisPosition columnAxisPositionForChild(const LayoutBox&) const; 147 GridAxisPosition columnAxisPositionForChild(const LayoutBox&) const;
147 GridAxisPosition rowAxisPositionForChild(const LayoutBox&) const; 148 GridAxisPosition rowAxisPositionForChild(const LayoutBox&) const;
148 LayoutUnit rowAxisOffsetForChild(const LayoutBox&) const; 149 LayoutUnit rowAxisOffsetForChild(const LayoutBox&) const;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 OrderIterator m_orderIterator; 197 OrderIterator m_orderIterator;
197 Vector<LayoutBox*> m_gridItemsOverflowingGridArea; 198 Vector<LayoutBox*> m_gridItemsOverflowingGridArea;
198 HashMap<const LayoutBox*, size_t> m_gridItemsIndexesMap; 199 HashMap<const LayoutBox*, size_t> m_gridItemsIndexesMap;
199 }; 200 };
200 201
201 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid()); 202 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid());
202 203
203 } // namespace blink 204 } // namespace blink
204 205
205 #endif // LayoutGrid_h 206 #endif // LayoutGrid_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698