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

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

Issue 1317643005: [css-grid] Fix track sizing algo w/ size restrictions and intrinsic sizes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: New design 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutGrid.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutGrid.h b/third_party/WebKit/Source/core/layout/LayoutGrid.h
index c5b3cc3bb8fb9c633bbaaf751db08f82e5483c70..76e70611232e8bd353695b9f5cd38f83190b5ffc 100644
--- a/third_party/WebKit/Source/core/layout/LayoutGrid.h
+++ b/third_party/WebKit/Source/core/layout/LayoutGrid.h
@@ -94,6 +94,8 @@ public:
private:
bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectLayoutGrid || LayoutBlock::isOfType(type); }
void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const override;
+ LayoutUnit computeContentAndScrollbarLogicalHeightUsing(SizeType, const Length& height, LayoutUnit intrinsicContentHeight) const override;
+ LayoutUnit computeIntrinsicLogicalContentHeightUsing(const Length& logicalHeightLength, LayoutUnit intrinsicContentHeight, LayoutUnit borderAndPadding) const override;
void addChild(LayoutObject* newChild, LayoutObject* beforeChild = nullptr) override;
void removeChild(LayoutObject*) override;
@@ -123,7 +125,11 @@ private:
GridTrackSizingDirection autoPlacementMajorAxisDirection() const;
GridTrackSizingDirection autoPlacementMinorAxisDirection() const;
- void layoutGridItems();
+ void computeGridTrackSizes(GridSizingData&, LayoutUnit& freeSpaceForColumns, LayoutUnit& freeSpaceForRows);
+ LayoutUnit computeTrackBasedLogicalHeight(const GridSizingData&) const;
+ void updateLogicalHeightDependentGridTracks(const LayoutUnit& trackBasedLogicalHeight, GridSizingData&, LayoutUnit& availableSpaceForRows);
+
+ void layoutGridItems(GridSizingData&, LayoutUnit& freeSpaceForColumns, LayoutUnit& freeSpaceForRows);
void prepareChildForPositionedLayout(LayoutBox&);
void layoutPositionedObjects(bool relayoutChildren, PositionedLayoutBehavior = DefaultLayout);
void offsetAndBreadthForPositionedChild(const LayoutBox&, GridTrackSizingDirection, LayoutUnit& offset, LayoutUnit& breadth);
@@ -198,6 +204,9 @@ private:
OrderIterator m_orderIterator;
Vector<LayoutBox*> m_gridItemsOverflowingGridArea;
HashMap<const LayoutBox*, size_t> m_gridItemsIndexesMap;
+
+ LayoutUnit m_minContentHeight;
+ LayoutUnit m_maxContentHeight;
};
DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid());

Powered by Google App Engine
This is Rietveld 408576698