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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutGrid.h

Issue 2287533002: [css-grid] Remove a duplicated auto repeat computation for intrinsic sizes (Closed)
Patch Set: Rebased patch Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 LayoutUnit maxBreadth) const; 128 LayoutUnit maxBreadth) const;
129 LayoutUnit computeUsedBreadthOfMaxLength(const GridTrackSize&, 129 LayoutUnit computeUsedBreadthOfMaxLength(const GridTrackSize&,
130 LayoutUnit usedBreadth, 130 LayoutUnit usedBreadth,
131 LayoutUnit maxBreadth) const; 131 LayoutUnit maxBreadth) const;
132 void resolveContentBasedTrackSizingFunctions(GridTrackSizingDirection, 132 void resolveContentBasedTrackSizingFunctions(GridTrackSizingDirection,
133 GridSizingData&) const; 133 GridSizingData&) const;
134 134
135 void ensureGridSize(size_t maximumRowSize, size_t maximumColumnSize); 135 void ensureGridSize(size_t maximumRowSize, size_t maximumColumnSize);
136 void insertItemIntoGrid(LayoutBox&, const GridArea&); 136 void insertItemIntoGrid(LayoutBox&, const GridArea&);
137 137
138 void updateAutoRepeatTracksAndSetDirtyIfNeeded(SizingOperation);
138 size_t computeAutoRepeatTracksCount(GridTrackSizingDirection, 139 size_t computeAutoRepeatTracksCount(GridTrackSizingDirection,
139 SizingOperation) const; 140 SizingOperation) const;
140 141
141 typedef ListHashSet<size_t> OrderedTrackIndexSet; 142 typedef ListHashSet<size_t> OrderedTrackIndexSet;
142 std::unique_ptr<OrderedTrackIndexSet> computeEmptyTracksForAutoRepeat( 143 std::unique_ptr<OrderedTrackIndexSet> computeEmptyTracksForAutoRepeat(
143 GridTrackSizingDirection) const; 144 GridTrackSizingDirection) const;
144 145
145 bool hasAutoRepeatEmptyTracks(GridTrackSizingDirection) const; 146 bool hasAutoRepeatEmptyTracks(GridTrackSizingDirection) const;
146 bool isEmptyAutoRepeatTrack(GridTrackSizingDirection, 147 bool isEmptyAutoRepeatTrack(GridTrackSizingDirection,
147 size_t lineNumber) const; 148 size_t lineNumber) const;
148 149
149 void placeItemsOnGrid(SizingOperation); 150 void placeItemsOnGrid();
150 void populateExplicitGridAndOrderIterator(); 151 void populateExplicitGridAndOrderIterator();
151 std::unique_ptr<GridArea> createEmptyGridAreaAtSpecifiedPositionsOutsideGrid( 152 std::unique_ptr<GridArea> createEmptyGridAreaAtSpecifiedPositionsOutsideGrid(
152 const LayoutBox&, 153 const LayoutBox&,
153 GridTrackSizingDirection, 154 GridTrackSizingDirection,
154 const GridSpan& specifiedPositions) const; 155 const GridSpan& specifiedPositions) const;
155 void placeSpecifiedMajorAxisItemsOnGrid(const Vector<LayoutBox*>&); 156 void placeSpecifiedMajorAxisItemsOnGrid(const Vector<LayoutBox*>&);
156 void placeAutoMajorAxisItemsOnGrid(const Vector<LayoutBox*>&); 157 void placeAutoMajorAxisItemsOnGrid(const Vector<LayoutBox*>&);
157 void placeAutoMajorAxisItemOnGrid( 158 void placeAutoMajorAxisItemOnGrid(
158 LayoutBox&, 159 LayoutBox&,
159 std::pair<size_t, size_t>& autoPlacementCursor); 160 std::pair<size_t, size_t>& autoPlacementCursor);
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 std::unique_ptr<OrderedTrackIndexSet> m_autoRepeatEmptyRows{nullptr}; 355 std::unique_ptr<OrderedTrackIndexSet> m_autoRepeatEmptyRows{nullptr};
355 356
356 Optional<bool> m_hasDefiniteLogicalHeight; 357 Optional<bool> m_hasDefiniteLogicalHeight;
357 }; 358 };
358 359
359 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid()); 360 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid());
360 361
361 } // namespace blink 362 } // namespace blink
362 363
363 #endif // LayoutGrid_h 364 #endif // LayoutGrid_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698