[CSS Grid Layout] Implement grid items sizing for fixed minmax grid tracks
[WebKit-https.git] / Source / WebCore / rendering / RenderGrid.h
index 829bf88..8eedfc2 100644 (file)
@@ -30,6 +30,8 @@
 
 namespace WebCore {
 
+class GridTrack;
+
 class RenderGrid : public RenderBlock {
 public:
     RenderGrid(Node*);
@@ -38,16 +40,22 @@ public:
     virtual const char* renderName() const OVERRIDE;
 
     virtual void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) OVERRIDE;
+    virtual void computePreferredLogicalWidths() OVERRIDE;
 
     virtual bool avoidsFloats() const OVERRIDE { return true; }
+    virtual bool canCollapseAnonymousBlockChild() const OVERRIDE { return false; }
 
 private:
-    class GridTrack;
+    virtual bool isRenderGrid() const OVERRIDE { return true; }
+
     enum TrackSizingDirection { ForColumns, ForRows };
     void computedUsedBreadthOfGridTracks(TrackSizingDirection, Vector<GridTrack>&);
+    LayoutUnit computeUsedBreadthOfLength(TrackSizingDirection, const Length&);
+    void distributeSpaceToTracks(TrackSizingDirection, Vector<GridTrack>&, LayoutUnit availableLogicalSpace);
     void layoutGridItems();
 
     LayoutPoint findChildLogicalPosition(RenderBox*, const Vector<GridTrack>& columnTracks, const Vector<GridTrack>& rowTracks);
+    size_t resolveGridPosition(const GridPosition&) const;
 };
 
 } // namespace WebCore