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

Side by Side 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. 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 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 void resolveContentBasedTrackSizingFunctionsForNonSpanningItems(GridTrackSiz ingDirection, const GridCoordinate&, LayoutBox& gridItem, GridTrack&, Vector<Gri dTrack>& columnTracks); 135 void resolveContentBasedTrackSizingFunctionsForNonSpanningItems(GridTrackSiz ingDirection, const GridCoordinate&, LayoutBox& gridItem, GridTrack&, Vector<Gri dTrack>& columnTracks);
136 template <TrackSizeComputationPhase> void resolveContentBasedTrackSizingFunc tionsForItems(GridTrackSizingDirection, GridSizingData&, const GridItemsSpanGrou pRange&); 136 template <TrackSizeComputationPhase> void resolveContentBasedTrackSizingFunc tionsForItems(GridTrackSizingDirection, GridSizingData&, const GridItemsSpanGrou pRange&);
137 template <TrackSizeComputationPhase> void distributeSpaceToTracks(Vector<Gri dTrack*>&, const Vector<GridTrack*>* growBeyondGrowthLimitsTracks, GridSizingDat a&, LayoutUnit& availableLogicalSpace); 137 template <TrackSizeComputationPhase> void distributeSpaceToTracks(Vector<Gri dTrack*>&, const Vector<GridTrack*>* growBeyondGrowthLimitsTracks, GridSizingDat a&, LayoutUnit& availableLogicalSpace);
138 138
139 typedef HashSet<size_t, DefaultHash<size_t>::Hash, WTF::UnsignedWithZeroKeyH ashTraits<size_t>> TrackIndexSet; 139 typedef HashSet<size_t, DefaultHash<size_t>::Hash, WTF::UnsignedWithZeroKeyH ashTraits<size_t>> TrackIndexSet;
140 double computeFlexFactorUnitSize(const Vector<GridTrack>&, GridTrackSizingDi rection, double flexFactorSum, LayoutUnit& leftOverSpace, const Vector<size_t, 8 >& flexibleTracksIndexes, PassOwnPtr<TrackIndexSet> tracksToTreatAsInflexible = nullptr) const; 140 double computeFlexFactorUnitSize(const Vector<GridTrack>&, GridTrackSizingDi rection, double flexFactorSum, LayoutUnit& leftOverSpace, const Vector<size_t, 8 >& flexibleTracksIndexes, PassOwnPtr<TrackIndexSet> tracksToTreatAsInflexible = nullptr) const;
141 double findFlexFactorUnitSize(const Vector<GridTrack>&, const GridSpan&, Gri dTrackSizingDirection, LayoutUnit leftOverSpace) const; 141 double findFlexFactorUnitSize(const Vector<GridTrack>&, const GridSpan&, Gri dTrackSizingDirection, LayoutUnit leftOverSpace) const;
142 142
143 GridTrackSize gridTrackSize(GridTrackSizingDirection, size_t) const; 143 GridTrackSize gridTrackSize(GridTrackSizingDirection, size_t) const;
144 144
145 bool childOverflowingContainingBlockHeight(const LayoutBox&) const;
esprehn 2015/10/30 23:21:31 isFoo() ? I think you want this to be more clear t
146 bool childOverflowingContainingBlockWidth(const LayoutBox&) const;
esprehn 2015/10/30 23:21:31 ditto
147 LayoutUnit overrideContainingBlockLogicalBreadthInlineDirection(const Layout Box&) const;
148 void setOverrideContainingBlockLogicalBreadthInlineDirection(LayoutBox&, Lay outUnit breadthInLine);
149 LayoutUnit gridAreaBreadthForChildInlineDirection(const LayoutBox&, Vector<G ridTrack>&) const;
145 LayoutUnit logicalHeightForChild(LayoutBox&, Vector<GridTrack>&); 150 LayoutUnit logicalHeightForChild(LayoutBox&, Vector<GridTrack>&);
146 LayoutUnit minSizeForChild(LayoutBox&, GridTrackSizingDirection, Vector<Grid Track>& columnTracks); 151 LayoutUnit minSizeForChild(LayoutBox&, GridTrackSizingDirection, Vector<Grid Track>& columnTracks);
147 LayoutUnit minContentForChild(LayoutBox&, GridTrackSizingDirection, Vector<G ridTrack>& columnTracks); 152 LayoutUnit minContentForChild(LayoutBox&, GridTrackSizingDirection, Vector<G ridTrack>&);
148 LayoutUnit maxContentForChild(LayoutBox&, GridTrackSizingDirection, Vector<G ridTrack>& columnTracks); 153 LayoutUnit maxContentForChild(LayoutBox&, GridTrackSizingDirection, Vector<G ridTrack>&);
149 GridAxisPosition columnAxisPositionForChild(const LayoutBox&) const; 154 GridAxisPosition columnAxisPositionForChild(const LayoutBox&) const;
150 GridAxisPosition rowAxisPositionForChild(const LayoutBox&) const; 155 GridAxisPosition rowAxisPositionForChild(const LayoutBox&) const;
151 LayoutUnit rowAxisOffsetForChild(const LayoutBox&) const; 156 LayoutUnit rowAxisOffsetForChild(const LayoutBox&) const;
152 LayoutUnit columnAxisOffsetForChild(const LayoutBox&) const; 157 LayoutUnit columnAxisOffsetForChild(const LayoutBox&) const;
153 ContentAlignmentData computeContentPositionAndDistributionOffset(GridTrackSi zingDirection, const LayoutUnit& availableFreeSpace, unsigned numberOfGridTracks ) const; 158 ContentAlignmentData computeContentPositionAndDistributionOffset(GridTrackSi zingDirection, const LayoutUnit& availableFreeSpace, unsigned numberOfGridTracks ) const;
154 LayoutPoint findChildLogicalPosition(const LayoutBox&, GridSizingData&) cons t; 159 LayoutPoint findChildLogicalPosition(const LayoutBox&, GridSizingData&) cons t;
155 GridCoordinate cachedGridCoordinate(const LayoutBox&) const; 160 GridCoordinate cachedGridCoordinate(const LayoutBox&) const;
156 161
157 LayoutUnit gridAreaBreadthForChild(const LayoutBox& child, GridTrackSizingDi rection, const Vector<GridTrack>&) const; 162 LayoutUnit gridAreaBreadthForChild(const LayoutBox& child, GridTrackSizingDi rection, const Vector<GridTrack>&) const;
158 LayoutUnit gridAreaBreadthForChildIncludingAlignmentOffsets(const LayoutBox& , GridTrackSizingDirection, const GridSizingData&) const; 163 LayoutUnit gridAreaBreadthForChildIncludingAlignmentOffsets(const LayoutBox& , GridTrackSizingDirection, const GridSizingData&) const;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 OrderIterator m_orderIterator; 208 OrderIterator m_orderIterator;
204 Vector<LayoutBox*> m_gridItemsOverflowingGridArea; 209 Vector<LayoutBox*> m_gridItemsOverflowingGridArea;
205 HashMap<const LayoutBox*, size_t> m_gridItemsIndexesMap; 210 HashMap<const LayoutBox*, size_t> m_gridItemsIndexesMap;
206 }; 211 };
207 212
208 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid()); 213 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid());
209 214
210 } // namespace blink 215 } // namespace blink
211 216
212 #endif // LayoutGrid_h 217 #endif // LayoutGrid_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698