mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1228984 - [css-grid] Auto-placement into columns missed some unoccupied span-1 column slots. r=dholbert
This commit is contained in:
parent
50751f7b3f
commit
148ced7ad0
@ -1534,15 +1534,12 @@ nsGridContainerFrame::FindAutoCol(uint32_t aStartCol, uint32_t aLockedRow,
|
||||
// Find the first gap in the current row that's at least 'extent' wide.
|
||||
// ('gap' tracks how wide the current column gap is.)
|
||||
for (uint32_t j = candidate, gap = 0; j < len && gap < extent; ++j) {
|
||||
++gap; // tentative, but we may reset it below if a column is occupied
|
||||
if (cellsInRow[j].mIsOccupied) {
|
||||
// Optimization: skip as many occupied cells as we can.
|
||||
do {
|
||||
++j;
|
||||
} while (j < len && cellsInRow[j].mIsOccupied);
|
||||
candidate = j;
|
||||
gap = 0;
|
||||
if (!cellsInRow[j].mIsOccupied) {
|
||||
++gap;
|
||||
continue;
|
||||
}
|
||||
candidate = j + 1;
|
||||
gap = 0;
|
||||
}
|
||||
if (lastCandidate < candidate && i != iStart) {
|
||||
// Couldn't fit 'extent' tracks at 'lastCandidate' here so we must
|
||||
|
Loading…
Reference in New Issue
Block a user