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

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

Issue 1233983003: [CSS Grid Layout] Implement auto-margin alignment for grid (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@horizontal-stretch
Patch Set: Created 5 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 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 bool canShrinkToFitInRowAxisForChild(const LayoutBox&) const; 161 bool canShrinkToFitInRowAxisForChild(const LayoutBox&) const;
162 bool hasAutoMinSizeInRowAxis(const LayoutBox&) const; 162 bool hasAutoMinSizeInRowAxis(const LayoutBox&) const;
163 bool needToStretchChildLogicalHeight(const LayoutBox&) const; 163 bool needToStretchChildLogicalHeight(const LayoutBox&) const;
164 LayoutUnit childIntrinsicHeight(const LayoutBox&) const; 164 LayoutUnit childIntrinsicHeight(const LayoutBox&) const;
165 LayoutUnit childIntrinsicWidth(const LayoutBox&) const; 165 LayoutUnit childIntrinsicWidth(const LayoutBox&) const;
166 LayoutUnit intrinsicLogicalHeightForChild(const LayoutBox&) const; 166 LayoutUnit intrinsicLogicalHeightForChild(const LayoutBox&) const;
167 LayoutUnit marginLogicalHeightForChild(const LayoutBox&) const; 167 LayoutUnit marginLogicalHeightForChild(const LayoutBox&) const;
168 LayoutUnit computeMarginLogicalHeightForChild(const LayoutBox&) const; 168 LayoutUnit computeMarginLogicalHeightForChild(const LayoutBox&) const;
169 LayoutUnit availableAlignmentSpaceForChildBeforeStretching(LayoutUnit gridAr eaBreadthForChild, const LayoutBox&) const; 169 LayoutUnit availableAlignmentSpaceForChildBeforeStretching(LayoutUnit gridAr eaBreadthForChild, const LayoutBox&) const;
170 void applyStretchAlignmentToChildIfNeeded(LayoutBox&); 170 void applyStretchAlignmentToChildIfNeeded(LayoutBox&);
171 bool hasAutoMarginsInColumnAxis(const LayoutBox&) const;
172 bool hasAutoMarginsInRowAxis(const LayoutBox&) const;
173 void resetAutoMarginsAndLogicalTopInColumnAxis(LayoutBox&);
174 void updateAutoMarginsInColumnAxisIfNeeded(LayoutBox&);
175 void updateAutoMarginsInRowAxisIfNeeded(LayoutBox&);
171 176
172 #if ENABLE(ASSERT) 177 #if ENABLE(ASSERT)
173 bool tracksAreWiderThanMinTrackBreadth(GridTrackSizingDirection, const Vecto r<GridTrack>&); 178 bool tracksAreWiderThanMinTrackBreadth(GridTrackSizingDirection, const Vecto r<GridTrack>&);
174 #endif 179 #endif
175 180
176 size_t gridItemSpan(const LayoutBox&, GridTrackSizingDirection); 181 size_t gridItemSpan(const LayoutBox&, GridTrackSizingDirection);
177 bool spanningItemCrossesFlexibleSizedTracks(const GridCoordinate&, GridTrack SizingDirection) const; 182 bool spanningItemCrossesFlexibleSizedTracks(const GridCoordinate&, GridTrack SizingDirection) const;
178 183
179 size_t gridColumnCount() const 184 size_t gridColumnCount() const
180 { 185 {
(...skipping 17 matching lines...) Expand all
198 OrderIterator m_orderIterator; 203 OrderIterator m_orderIterator;
199 Vector<LayoutBox*> m_gridItemsOverflowingGridArea; 204 Vector<LayoutBox*> m_gridItemsOverflowingGridArea;
200 HashMap<const LayoutBox*, size_t> m_gridItemsIndexesMap; 205 HashMap<const LayoutBox*, size_t> m_gridItemsIndexesMap;
201 }; 206 };
202 207
203 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid()); 208 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid());
204 209
205 } // namespace blink 210 } // namespace blink
206 211
207 #endif // LayoutGrid_h 212 #endif // LayoutGrid_h
OLDNEW
« no previous file with comments | « LayoutTests/fast/css-grid-layout/grid-item-auto-margins-and-stretch.html ('k') | Source/core/layout/LayoutGrid.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698