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

Unified Diff: Source/core/layout/LayoutGrid.h

Issue 1220043002: [CSS Grid Layout] Removing Content Alignment logic from track sizing alg (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Applied new suggested changes. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/layout/LayoutGrid.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutGrid.h
diff --git a/Source/core/layout/LayoutGrid.h b/Source/core/layout/LayoutGrid.h
index 0a50e9c3763348c7ed68f6a273f16c398803aee3..58357f7cae86a32b71c7694f2bc8aecf89eda874 100644
--- a/Source/core/layout/LayoutGrid.h
+++ b/Source/core/layout/LayoutGrid.h
@@ -32,6 +32,7 @@
namespace blink {
+struct ContentAlignmentData;
struct GridCoordinate;
struct GridSpan;
class GridTrack;
@@ -127,7 +128,7 @@ private:
void layoutGridItems();
void layoutPositionedObjects(bool relayoutChildren, PositionedLayoutBehavior = DefaultLayout);
void offsetAndBreadthForPositionedChild(const LayoutBox&, GridTrackSizingDirection, bool startIsAuto, bool endIsAuto, LayoutUnit& offset, LayoutUnit& breadth);
- void populateGridPositions(const GridSizingData&);
+ void populateGridPositions(GridSizingData&, LayoutUnit availableSpaceForColumns, LayoutUnit availableSpaceForRows);
typedef struct GridItemsSpanGroupRange GridItemsSpanGroupRange;
LayoutUnit currentItemSizeForTrackSizeComputationPhase(TrackSizeComputationPhase, LayoutBox&, GridTrackSizingDirection, Vector<GridTrack>& columnTracks);
@@ -144,14 +145,16 @@ private:
LayoutUnit maxContentForChild(LayoutBox&, GridTrackSizingDirection, Vector<GridTrack>& columnTracks);
GridAxisPosition columnAxisPositionForChild(const LayoutBox&) const;
GridAxisPosition rowAxisPositionForChild(const LayoutBox&) const;
- LayoutUnit columnPositionForChild(const LayoutBox&) const;
- LayoutUnit rowPositionForChild(const LayoutBox&) const;
- void computeContentPositionAndDistributionRowOffset(LayoutUnit availableFreeSpace, GridSizingData&) const;
- void computeContentPositionAndDistributionColumnOffset(LayoutUnit availableFreeSpace, GridSizingData&) const;
+ LayoutUnit rowAxisOffsetForChild(const LayoutBox&) const;
+ LayoutUnit columnAxisOffsetForChild(const LayoutBox&) const;
+ ContentAlignmentData computeContentPositionAndDistributionOffset(GridTrackSizingDirection, LayoutUnit availableFreeSpace, unsigned numberOfGridTracks) const;
LayoutPoint findChildLogicalPosition(const LayoutBox&, GridSizingData&) const;
GridCoordinate cachedGridCoordinate(const LayoutBox&) const;
LayoutUnit gridAreaBreadthForChild(const LayoutBox& child, GridTrackSizingDirection, const Vector<GridTrack>&) const;
+ LayoutUnit gridAreaBreadthForChildIncludingAlignmentOffsets(const LayoutBox&, GridTrackSizingDirection, const GridSizingData&) const;
+
+ void applyStretchAlignmentToTracksIfNeeded(GridTrackSizingDirection, GridSizingData&, LayoutUnit availableSpace);
virtual void paintChildren(const PaintInfo&, const LayoutPoint&) override;
bool allowedToStretchLogicalHeightForChild(const LayoutBox& child) const;
« no previous file with comments | « no previous file | Source/core/layout/LayoutGrid.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698