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

Unified Diff: Source/core/rendering/RenderGrid.h

Issue 148293008: [CSS Grid Layout] Add support to place items using named grid lines (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: New approach Created 6 years, 9 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: Source/core/rendering/RenderGrid.h
diff --git a/Source/core/rendering/RenderGrid.h b/Source/core/rendering/RenderGrid.h
index d3fe920f6ac0b608d6fd5b95ec216d2150f66b15..ab65f6f4a5669547e651bc20dd643a1c1ac89600 100644
--- a/Source/core/rendering/RenderGrid.h
+++ b/Source/core/rendering/RenderGrid.h
@@ -35,10 +35,7 @@ struct GridCoordinate;
struct GridSpan;
class GridTrack;
-enum GridTrackSizingDirection {
- ForColumns,
- ForRows
-};
+typedef HashMap<String, Vector<size_t> > NamedGridLinesMap;
class RenderGrid FINAL : public RenderBlock {
public:
@@ -153,6 +150,9 @@ private:
return m_grid.size();
}
+ const NamedGridLinesMap& gridLinesForSide(GridPositionSide side) const { return (side == ColumnStartSide || side == ColumnEndSide) ? m_namedGridColumnLines : m_namedGridRowLines; }
+ void createGridLineNamesMapsForDirection(GridTrackSizingDirection);
+
typedef Vector<RenderBox*, 1> GridCell;
typedef Vector<Vector<GridCell> > GridRepresentation;
GridRepresentation m_grid;
@@ -163,6 +163,9 @@ private:
OrderIterator m_orderIterator;
Vector<RenderBox*> m_gridItemsOverflowingGridArea;
+ NamedGridLinesMap m_namedGridColumnLines;
+ NamedGridLinesMap m_namedGridRowLines;
+
friend class GridCoordinateSorter;
};

Powered by Google App Engine
This is Rietveld 408576698