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

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

Issue 1298623002: [CSS Grid Layout] Implement auto-margins alignment of grid items (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Using start/end and before/after logical terms. Created 5 years, 2 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 void paintChildren(const PaintInfo&, const LayoutPoint&) override; 159 void paintChildren(const PaintInfo&, const LayoutPoint&) override;
160 160
161 bool needToStretchChildLogicalHeight(const LayoutBox&) const; 161 bool needToStretchChildLogicalHeight(const LayoutBox&) const;
162 LayoutUnit childIntrinsicHeight(const LayoutBox&) const; 162 LayoutUnit childIntrinsicHeight(const LayoutBox&) const;
163 LayoutUnit childIntrinsicWidth(const LayoutBox&) const; 163 LayoutUnit childIntrinsicWidth(const LayoutBox&) const;
164 LayoutUnit intrinsicLogicalHeightForChild(const LayoutBox&) const; 164 LayoutUnit intrinsicLogicalHeightForChild(const LayoutBox&) const;
165 LayoutUnit marginLogicalHeightForChild(const LayoutBox&) const; 165 LayoutUnit marginLogicalHeightForChild(const LayoutBox&) const;
166 LayoutUnit computeMarginLogicalHeightForChild(const LayoutBox&) const; 166 LayoutUnit computeMarginLogicalHeightForChild(const LayoutBox&) const;
167 LayoutUnit availableAlignmentSpaceForChildBeforeStretching(LayoutUnit gridAr eaBreadthForChild, const LayoutBox&) const; 167 LayoutUnit availableAlignmentSpaceForChildBeforeStretching(LayoutUnit gridAr eaBreadthForChild, const LayoutBox&) const;
168 void applyStretchAlignmentToChildIfNeeded(LayoutBox&); 168 void applyStretchAlignmentToChildIfNeeded(LayoutBox&);
169 bool hasAutoMarginsInColumnAxis(const LayoutBox&) const;
170 bool hasAutoMarginsInRowAxis(const LayoutBox&) const;
171 void updateAutoMarginsInColumnAxisIfNeeded(LayoutBox&);
172 void updateAutoMarginsInRowAxisIfNeeded(LayoutBox&);
169 173
170 #if ENABLE(ASSERT) 174 #if ENABLE(ASSERT)
171 bool tracksAreWiderThanMinTrackBreadth(GridTrackSizingDirection, const Vecto r<GridTrack>&); 175 bool tracksAreWiderThanMinTrackBreadth(GridTrackSizingDirection, const Vecto r<GridTrack>&);
172 #endif 176 #endif
173 177
174 size_t gridItemSpan(const LayoutBox&, GridTrackSizingDirection); 178 size_t gridItemSpan(const LayoutBox&, GridTrackSizingDirection);
175 bool spanningItemCrossesFlexibleSizedTracks(const GridCoordinate&, GridTrack SizingDirection) const; 179 bool spanningItemCrossesFlexibleSizedTracks(const GridCoordinate&, GridTrack SizingDirection) const;
176 180
177 size_t gridColumnCount() const 181 size_t gridColumnCount() const
178 { 182 {
(...skipping 17 matching lines...) Expand all
196 OrderIterator m_orderIterator; 200 OrderIterator m_orderIterator;
197 Vector<LayoutBox*> m_gridItemsOverflowingGridArea; 201 Vector<LayoutBox*> m_gridItemsOverflowingGridArea;
198 HashMap<const LayoutBox*, size_t> m_gridItemsIndexesMap; 202 HashMap<const LayoutBox*, size_t> m_gridItemsIndexesMap;
199 }; 203 };
200 204
201 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid()); 205 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid());
202 206
203 } // namespace blink 207 } // namespace blink
204 208
205 #endif // LayoutGrid_h 209 #endif // LayoutGrid_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698