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

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

Issue 2135703002: [css-grid] Fix crash when using auto repeat for indefinite widths (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 2b7f531231f44fba6c4270a07ab86968c9e71a77..7ff88ffb9e9a53f14d40e04e8ab8824522b134ef 100644
--- a/third_party/WebKit/Source/core/layout/LayoutGrid.h
+++ b/third_party/WebKit/Source/core/layout/LayoutGrid.h
@@ -131,7 +131,7 @@ private:
size_t computeAutoRepeatTracksCount(GridTrackSizingDirection) const;
- void placeItemsOnGrid();
+ void placeItemsOnGrid(SizingOperation);
void populateExplicitGridAndOrderIterator();
std::unique_ptr<GridArea> createEmptyGridAreaAtSpecifiedPositionsOutsideGrid(const LayoutBox&, GridTrackSizingDirection, const GridSpan& specifiedPositions) const;
void placeSpecifiedMajorAxisItemsOnGrid(const Vector<LayoutBox*>&);
@@ -209,17 +209,19 @@ private:
bool isOrthogonalChild(const LayoutBox&) const;
GridTrackSizingDirection flowAwareDirectionForChild(const LayoutBox&, GridTrackSizingDirection) const;
+ void clearGridDataAndMarkAsDirty() const;
+
typedef Vector<Vector<GridCell>> GridRepresentation;
- GridRepresentation m_grid;
- bool m_gridIsDirty;
+ mutable GridRepresentation m_grid;
+ mutable bool m_gridIsDirty;
Vector<LayoutUnit> m_rowPositions;
Vector<LayoutUnit> m_columnPositions;
LayoutUnit m_offsetBetweenColumns;
LayoutUnit m_offsetBetweenRows;
- HashMap<const LayoutBox*, GridArea> m_gridItemArea;
+ mutable HashMap<const LayoutBox*, GridArea> m_gridItemArea;
OrderIterator m_orderIterator;
- Vector<LayoutBox*> m_gridItemsOverflowingGridArea;
- HashMap<const LayoutBox*, size_t> m_gridItemsIndexesMap;
+ mutable Vector<LayoutBox*> m_gridItemsOverflowingGridArea;
+ mutable HashMap<const LayoutBox*, size_t> m_gridItemsIndexesMap;
LayoutUnit m_minContentHeight { -1 };
LayoutUnit m_maxContentHeight { -1 };
@@ -227,8 +229,8 @@ private:
int m_smallestRowStart;
int m_smallestColumnStart;
- size_t m_autoRepeatColumns { 0 };
- size_t m_autoRepeatRows { 0 };
+ mutable size_t m_autoRepeatColumns { 0 };
+ mutable size_t m_autoRepeatRows { 0 };
bool m_hasAnyOrthogonalChild;
};

Powered by Google App Engine
This is Rietveld 408576698