| Differences between
and this patch
- a/Source/WebCore/ChangeLog +21 lines
Lines 1-5 a/Source/WebCore/ChangeLog_sec1
1
2015-01-19  Sergio Villar Senin  <svillar@igalia.com>
1
2015-01-19  Sergio Villar Senin  <svillar@igalia.com>
2
2
3
        [CSS Grid Layout] Size tracks using a list of all items sorted by span
4
        https://bugs.webkit.org/show_bug.cgi?id=140615
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        In r173620 we fixed
9
        RenderGrid::resolveContentBasedTrackSizingFunctions() so that it
10
        now collects all items spanning content-sized tracks and process
11
        them one by one after sorting them by ascending span.
12
13
        The problem is that it was incorrectly implemented, it has two
14
        important bugs. First one is that the hash table that collects
15
        items is regenerated after processing each track, so it's actually
16
        doing nothing. Secondly we're only sorting the items on each
17
        track, instead of all the items in the grid.
18
19
        * rendering/RenderGrid.cpp:
20
        (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
21
22
2015-01-19  Sergio Villar Senin  <svillar@igalia.com>
23
3
        [CSS Grid Layout] Tracks shrink sometimes with indefinite remaining space
24
        [CSS Grid Layout] Tracks shrink sometimes with indefinite remaining space
4
        https://bugs.webkit.org/show_bug.cgi?id=139059
25
        https://bugs.webkit.org/show_bug.cgi?id=139059
5
26
- a/Source/WebCore/rendering/RenderGrid.cpp -11 / +13 lines
Lines 183-188 public: a/Source/WebCore/rendering/RenderGrid.cpp_sec1
183
    Vector<LayoutUnit> distributeTrackVector;
183
    Vector<LayoutUnit> distributeTrackVector;
184
    Vector<GridTrack*> filteredTracks;
184
    Vector<GridTrack*> filteredTracks;
185
    Vector<unsigned> growAboveMaxBreadthTrackIndexes;
185
    Vector<unsigned> growAboveMaxBreadthTrackIndexes;
186
    Vector<GridItemWithSpan> itemsSortedByIncreasingSpan;
186
};
187
};
187
188
188
RenderGrid::RenderGrid(Element& element, Ref<RenderStyle>&& style)
189
RenderGrid::RenderGrid(Element& element, Ref<RenderStyle>&& style)
Lines 559-583 private: a/Source/WebCore/rendering/RenderGrid.cpp_sec2
559
void RenderGrid::resolveContentBasedTrackSizingFunctions(GridTrackSizingDirection direction, GridSizingData& sizingData)
560
void RenderGrid::resolveContentBasedTrackSizingFunctions(GridTrackSizingDirection direction, GridSizingData& sizingData)
560
{
561
{
561
    // FIXME: Split the grid tracks into groups that doesn't overlap a <flex> grid track.
562
    // FIXME: Split the grid tracks into groups that doesn't overlap a <flex> grid track.
562
563
    sizingData.itemsSortedByIncreasingSpan.shrink(0);
564
    HashSet<RenderBox*> itemsSet;
563
    for (auto trackIndex : sizingData.contentSizedTracksIndex) {
565
    for (auto trackIndex : sizingData.contentSizedTracksIndex) {
564
        GridIterator iterator(m_grid, direction, trackIndex);
566
        GridIterator iterator(m_grid, direction, trackIndex);
565
        HashSet<RenderBox*> itemsSet;
566
        Vector<GridItemWithSpan> itemsSortedByIncreasingSpan;
567
567
568
        while (RenderBox* gridItem = iterator.nextGridItem()) {
568
        while (RenderBox* gridItem = iterator.nextGridItem()) {
569
            if (itemsSet.add(gridItem).isNewEntry)
569
            if (itemsSet.add(gridItem).isNewEntry)
570
                itemsSortedByIncreasingSpan.append(GridItemWithSpan(*gridItem, cachedGridCoordinate(*gridItem), direction));
570
                sizingData.itemsSortedByIncreasingSpan.append(GridItemWithSpan(*gridItem, cachedGridCoordinate(*gridItem), direction));
571
        }
571
        }
572
        std::stable_sort(itemsSortedByIncreasingSpan.begin(), itemsSortedByIncreasingSpan.end());
572
    }
573
    std::sort(sizingData.itemsSortedByIncreasingSpan.begin(), sizingData.itemsSortedByIncreasingSpan.end());
573
574
574
        for (auto& itemWithSpan : itemsSortedByIncreasingSpan) {
575
    for (auto& itemWithSpan : sizingData.itemsSortedByIncreasingSpan) {
575
            resolveContentBasedTrackSizingFunctionsForItems(direction, sizingData, itemWithSpan, &GridTrackSize::hasMinOrMaxContentMinTrackBreadth, &RenderGrid::minContentForChild, &GridTrack::usedBreadth, &GridTrack::growUsedBreadth, &GridTrackSize::hasMinContentMinTrackBreadthAndMinOrMaxContentMaxTrackBreadth);
576
        resolveContentBasedTrackSizingFunctionsForItems(direction, sizingData, itemWithSpan, &GridTrackSize::hasMinOrMaxContentMinTrackBreadth, &RenderGrid::minContentForChild, &GridTrack::usedBreadth, &GridTrack::growUsedBreadth, &GridTrackSize::hasMinContentMinTrackBreadthAndMinOrMaxContentMaxTrackBreadth);
576
            resolveContentBasedTrackSizingFunctionsForItems(direction, sizingData, itemWithSpan, &GridTrackSize::hasMaxContentMinTrackBreadth, &RenderGrid::maxContentForChild, &GridTrack::usedBreadth, &GridTrack::growUsedBreadth, &GridTrackSize::hasMaxContentMinTrackBreadthAndMaxContentMaxTrackBreadth);
577
        resolveContentBasedTrackSizingFunctionsForItems(direction, sizingData, itemWithSpan, &GridTrackSize::hasMaxContentMinTrackBreadth, &RenderGrid::maxContentForChild, &GridTrack::usedBreadth, &GridTrack::growUsedBreadth, &GridTrackSize::hasMaxContentMinTrackBreadthAndMaxContentMaxTrackBreadth);
577
            resolveContentBasedTrackSizingFunctionsForItems(direction, sizingData, itemWithSpan, &GridTrackSize::hasMinOrMaxContentMaxTrackBreadth, &RenderGrid::minContentForChild, &GridTrack::maxBreadthIfNotInfinite, &GridTrack::growMaxBreadth);
578
        resolveContentBasedTrackSizingFunctionsForItems(direction, sizingData, itemWithSpan, &GridTrackSize::hasMinOrMaxContentMaxTrackBreadth, &RenderGrid::minContentForChild, &GridTrack::maxBreadthIfNotInfinite, &GridTrack::growMaxBreadth);
578
            resolveContentBasedTrackSizingFunctionsForItems(direction, sizingData, itemWithSpan, &GridTrackSize::hasMaxContentMaxTrackBreadth, &RenderGrid::maxContentForChild, &GridTrack::maxBreadthIfNotInfinite, &GridTrack::growMaxBreadth);
579
        resolveContentBasedTrackSizingFunctionsForItems(direction, sizingData, itemWithSpan, &GridTrackSize::hasMaxContentMaxTrackBreadth, &RenderGrid::maxContentForChild, &GridTrack::maxBreadthIfNotInfinite, &GridTrack::growMaxBreadth);
579
        }
580
    }
580
581
582
    for (auto trackIndex : sizingData.contentSizedTracksIndex) {
581
        GridTrack& track = (direction == ForColumns) ? sizingData.columnTracks[trackIndex] : sizingData.rowTracks[trackIndex];
583
        GridTrack& track = (direction == ForColumns) ? sizingData.columnTracks[trackIndex] : sizingData.rowTracks[trackIndex];
582
        if (track.m_maxBreadth == infinity)
584
        if (track.m_maxBreadth == infinity)
583
            track.m_maxBreadth = track.m_usedBreadth;
585
            track.m_maxBreadth = track.m_usedBreadth;
- a/LayoutTests/ChangeLog +15 lines
Lines 1-5 a/LayoutTests/ChangeLog_sec1
1
2015-01-19  Sergio Villar Senin  <svillar@igalia.com>
1
2015-01-19  Sergio Villar Senin  <svillar@igalia.com>
2
2
3
        [CSS Grid Layout] Size tracks using a list of all items sorted by span
4
        https://bugs.webkit.org/show_bug.cgi?id=140615
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        * TestExpectations: Added a test that starts to fail because this
9
        patch unveils an existing bug that will be addressed in a follow-up patch.
10
        * fast/css-grid-layout/grid-content-sized-columns-resolution-expected.txt:
11
        Added tons of new test cases.
12
        * fast/css-grid-layout/grid-content-sized-columns-resolution.html: Ditto.
13
        * fast/css-grid-layout/grid-preferred-logical-widths.html:
14
        Adjusted results.
15
16
2015-01-19  Sergio Villar Senin  <svillar@igalia.com>
17
3
        [CSS Grid Layout] Tracks shrink sometimes with indefinite remaining space
18
        [CSS Grid Layout] Tracks shrink sometimes with indefinite remaining space
4
        https://bugs.webkit.org/show_bug.cgi?id=139059
19
        https://bugs.webkit.org/show_bug.cgi?id=139059
5
20
- a/LayoutTests/TestExpectations +2 lines
Lines 455-457 webkit.org/b/139840 fast/xmlhttprequest/xmlhttprequest-recursive-sync-event.html a/LayoutTests/TestExpectations_sec1
455
webkit.org/b/140043 [ Debug ] js/dom/Promise.html [ Pass Failure ]
455
webkit.org/b/140043 [ Debug ] js/dom/Promise.html [ Pass Failure ]
456
456
457
webkit.org/b/140309 css3/background/background-repeat-space-content.html [ ImageOnlyFailure ]
457
webkit.org/b/140309 css3/background/background-repeat-space-content.html [ ImageOnlyFailure ]
458
459
webkit.org/b/139058 fast/css-grid-layout/flex-and-minmax-content-resolution-rows.html [ Failure ]
- a/LayoutTests/fast/css-grid-layout/grid-content-sized-columns-resolution-expected.txt +92 lines
Lines 10-15 PASS window.getComputedStyle(gridAutoMinContent, '').getPropertyValue('-webkit-g a/LayoutTests/fast/css-grid-layout/grid-content-sized-columns-resolution-expected.txt_sec1
10
PASS window.getComputedStyle(gridAutoMaxContent, '').getPropertyValue('-webkit-grid-template-columns') is "20px 70px"
10
PASS window.getComputedStyle(gridAutoMaxContent, '').getPropertyValue('-webkit-grid-template-columns') is "20px 70px"
11
PASS window.getComputedStyle(gridMaxContentAndMinContentFixed, '').getPropertyValue('-webkit-grid-template-columns') is "70px 20px"
11
PASS window.getComputedStyle(gridMaxContentAndMinContentFixed, '').getPropertyValue('-webkit-grid-template-columns') is "70px 20px"
12
PASS window.getComputedStyle(gridMaxContentAndMaxContentFixed, '').getPropertyValue('-webkit-grid-template-columns') is "55px 35px"
12
PASS window.getComputedStyle(gridMaxContentAndMaxContentFixed, '').getPropertyValue('-webkit-grid-template-columns') is "55px 35px"
13
14
Check that items are processed by ascending span to compute track breadths forbidding extra space distribution.
15
PASS window.getComputedStyle(gridMinContentFixedAndAutoUnsortedConstrained, '').getPropertyValue('-webkit-grid-template-columns') is "0px 40px"
16
PASS window.getComputedStyle(gridAutoAndAutoUnsortedConstrained, '').getPropertyValue('-webkit-grid-template-columns') is "5px 35px"
17
PASS window.getComputedStyle(gridMinContentAndMinContentFixedUnsortedConstrained, '').getPropertyValue('-webkit-grid-template-columns') is "0px 40px"
18
PASS window.getComputedStyle(gridMaxContentAndMinContentUnsortedConstrained, '').getPropertyValue('-webkit-grid-template-columns') is "0px 70px"
19
PASS window.getComputedStyle(gridFixedMinContentAndMaxContentUnsortedConstrained, '').getPropertyValue('-webkit-grid-template-columns') is "10px 70px"
20
PASS window.getComputedStyle(gridFixedMaxContentAndMinContentUnsortedConstrained, '').getPropertyValue('-webkit-grid-template-columns') is "10px 40px"
21
PASS window.getComputedStyle(gridMinContentAndMaxContentFixedUnsortedConstrained, '').getPropertyValue('-webkit-grid-template-columns') is "0px 90px"
22
PASS window.getComputedStyle(gridMaxContentFixedAndAutoUnsortedConstrained, '').getPropertyValue('-webkit-grid-template-columns') is "10px 40px"
23
PASS window.getComputedStyle(gridAutoMinContentUnsortedConstrained, '').getPropertyValue('-webkit-grid-template-columns') is "0px 60px"
24
PASS window.getComputedStyle(gridAutoMaxContentUnsortedConstrained, '').getPropertyValue('-webkit-grid-template-columns') is "0px 90px"
25
PASS window.getComputedStyle(gridMaxContentAndMinContentFixedUnsortedConstrained, '').getPropertyValue('-webkit-grid-template-columns') is "50px 40px"
26
PASS window.getComputedStyle(gridMaxContentAndMaxContentFixedUnsortedConstrained, '').getPropertyValue('-webkit-grid-template-columns') is "40px 70px"
27
28
Check that items are processed by ascending span to compute track breadths allowing extra space distribution.
29
PASS window.getComputedStyle(gridMinContentFixedAndAutoUnsorted, '').getPropertyValue('-webkit-grid-template-columns') is "15px 90px"
30
PASS window.getComputedStyle(gridAutoAndAutoUnsorted, '').getPropertyValue('-webkit-grid-template-columns') is "30px 60px"
31
PASS window.getComputedStyle(gridMinContentAndMinContentFixedUnsorted, '').getPropertyValue('-webkit-grid-template-columns') is "10px 40px"
32
PASS window.getComputedStyle(gridMaxContentAndMinContentUnsorted, '').getPropertyValue('-webkit-grid-template-columns') is "0px 70px"
33
PASS window.getComputedStyle(gridFixedMinContentAndMaxContentUnsorted, '').getPropertyValue('-webkit-grid-template-columns') is "10px 70px"
34
PASS window.getComputedStyle(gridFixedMaxContentAndMinContentUnsorted, '').getPropertyValue('-webkit-grid-template-columns') is "50px 40px"
35
PASS window.getComputedStyle(gridMinContentAndMaxContentFixedUnsorted, '').getPropertyValue('-webkit-grid-template-columns') is "10px 90px"
36
PASS window.getComputedStyle(gridMaxContentFixedAndAutoUnsorted, '').getPropertyValue('-webkit-grid-template-columns') is "15px 70px"
37
PASS window.getComputedStyle(gridAutoMinContentUnsorted, '').getPropertyValue('-webkit-grid-template-columns') is "50px 60px"
38
PASS window.getComputedStyle(gridAutoMaxContentUnsorted, '').getPropertyValue('-webkit-grid-template-columns') is "0px 90px"
39
PASS window.getComputedStyle(gridMaxContentAndMinContentFixedUnsorted, '').getPropertyValue('-webkit-grid-template-columns') is "55px 40px"
40
PASS window.getComputedStyle(gridMaxContentAndMaxContentFixedUnsorted, '').getPropertyValue('-webkit-grid-template-columns') is "75px 70px"
13
PASS window.getComputedStyle(gridMinContentFixedAndAutoAboveLimits, '').getPropertyValue('-webkit-grid-template-columns') is "15px 95px"
41
PASS window.getComputedStyle(gridMinContentFixedAndAutoAboveLimits, '').getPropertyValue('-webkit-grid-template-columns') is "15px 95px"
14
PASS window.getComputedStyle(gridMaxContentFixedAndAutoAboveLimits, '').getPropertyValue('-webkit-grid-template-columns') is "65px 85px"
42
PASS window.getComputedStyle(gridMaxContentFixedAndAutoAboveLimits, '').getPropertyValue('-webkit-grid-template-columns') is "65px 85px"
15
PASS window.getComputedStyle(gridMinContentFixedAndFixedFixedAndAuto, '').getPropertyValue('-webkit-grid-template-columns') is "20px 20px 60px"
43
PASS window.getComputedStyle(gridMinContentFixedAndFixedFixedAndAuto, '').getPropertyValue('-webkit-grid-template-columns') is "20px 20px 60px"
Lines 30-35 XXXX XXXX a/LayoutTests/fast/css-grid-layout/grid-content-sized-columns-resolution-expected.txt_sec2
30
XXXX XXXX
58
XXXX XXXX
31
XXXX XXXX
59
XXXX XXXX
32
XXXX XXXX
60
XXXX XXXX
61
XXXX XXXX
62
XXXX XXXX
63
XXX
64
XXXX XXXX
65
XX XX XX
66
XXXX XXXX
67
XXX XXX
68
XXXXXXX
69
XXXXX XX
70
XXX
71
XXXXX
72
XXXX XXXX
73
X X
74
XXXX
75
XXXX XXXX
76
XXXX XXXX
77
XX XX
78
XXXX
79
XXX XXX
80
XX XX XX XX
81
XXXXXX XXXXXX
82
XXXX XXXX
83
XXX XXX
84
XXXXX
85
XXX XXX
86
XXXX XXXX
87
XXXX XXXX
88
XX
89
XXXX XXXX
90
XX XX XX XX
91
XXXXXXX
92
XXXX XXXX
93
XXXX XXXX
94
XXXX XXXX
95
XXX
96
XXXX XXXX
97
XX XX XX XX
98
XXXX XXXX
99
XXX XXX
100
XXXXXXX
101
XXXXX XX
102
XXX
103
XXXXX
104
XXXX XXXX
105
X X
106
XXXX
107
XXXX XXXX
108
XXXX XXXX
109
XX XX
110
XXXX
111
XXX XXX
112
XX XX XX XX
113
XXXXXX XXXXXX
114
XXXX XXXX
115
XXX XXX
116
XXXXX
117
XXX XXX
118
XXXX XXXX
119
XXXX XXXX
120
XX
121
XXXX XXXX
122
XX XX XX XX
123
XXXXXXX
124
XXXX XXXX
33
XXXXXXXXXXX
125
XXXXXXXXXXX
34
XXXX XXXX
126
XXXX XXXX
35
XXXXXXXXXXXXXXX
127
XXXXXXXXXXXXXXX
- a/LayoutTests/fast/css-grid-layout/grid-content-sized-columns-resolution.html +192 lines
Lines 103-108 a/LayoutTests/fast/css-grid-layout/grid-content-sized-columns-resolution.html_sec1
103
    <div class="firstRowBothColumn">XXXX XXXX</div>
103
    <div class="firstRowBothColumn">XXXX XXXX</div>
104
</div>
104
</div>
105
105
106
<!-- Check that items are processed by ascending span instead of going track by track forbidding extra space distribution. -->
107
<div class="constrainedContainer">
108
    <div class="grid gridMinContentFixedAndAuto" id="gridMinContentFixedAndAutoUnsortedConstrained">
109
	<div class="firstRowBothColumn">XXXX XXXX</div>
110
	<div class="firstRowSecondColumn">XXXX XXXX</div>
111
    </div>
112
</div>
113
114
<div class="constrainedContainer">
115
    <div class="grid gridAutoAndAuto" id="gridAutoAndAutoUnsortedConstrained">
116
	<div class="firstRowBothColumn">XXXX XXXX</div>
117
	<div class="firstRowSecondColumn">XXX</div>
118
    </div>
119
</div>
120
121
<div class="constrainedContainer">
122
    <div class="grid gridMinContentAndMinContentFixed" id="gridMinContentAndMinContentFixedUnsortedConstrained">
123
	<div class="firstRowBothColumn">XXXX XXXX</div>
124
	<div class="firstRowBothColumn">XX XX XX</div>
125
	<div class="firstRowSecondColumn">XXXX XXXX</div>
126
    </div>
127
</div>
128
129
<div class="constrainedContainer">
130
    <div class="grid gridMaxContentAndMinContent" id="gridMaxContentAndMinContentUnsortedConstrained">
131
	<div class="firstRowBothColumn">XXX XXX</div>
132
	<div class="firstRowSecondColumn">XXXXXXX</div>
133
    </div>
134
</div>
135
136
<div class="constrainedContainer">
137
    <div class="grid gridFixedMinContentAndMaxContent" id="gridFixedMinContentAndMaxContentUnsortedConstrained">
138
	<div class="firstRowBothColumn">XXXXX XX</div>
139
	<div class="firstRowSecondColumn">XXX</div>
140
	<div class="firstRowSecondColumn">XXXXX</div>
141
    </div>
142
</div>
143
144
<div class="constrainedContainer">
145
    <div class="grid gridFixedMaxContentAndMinContent" id="gridFixedMaxContentAndMinContentUnsortedConstrained">
146
	<div class="firstRowBothColumn">XXXX XXXX</div>
147
	<div class="firstRowBothColumn">X X</div>
148
	<div class="firstRowSecondColumn">XXXX</div>
149
    </div>
150
</div>
151
152
<div class="constrainedContainer">
153
    <div class="grid gridMinContentAndMaxContentFixed" id="gridMinContentAndMaxContentFixedUnsortedConstrained">
154
	<div class="firstRowBothColumn">XXXX XXXX</div>
155
	<div class="firstRowSecondColumn">XXXX XXXX</div>
156
    </div>
157
</div>
158
159
<div class="constrainedContainer">
160
    <div class="grid gridMaxContentFixedAndAuto" id="gridMaxContentFixedAndAutoUnsortedConstrained">
161
	<div class="firstRowBothColumn">XX XX</div>
162
	<div class="firstRowSecondColumn">XXXX</div>
163
	<div class="firstRowSecondColumn">XXX XXX</div>
164
    </div>
165
</div>
166
167
<div class="constrainedContainer">
168
    <div class="grid gridAutoMinContent" id="gridAutoMinContentUnsortedConstrained">
169
	<div class="firstRowBothColumn">XX XX XX XX</div>
170
	<div class="firstRowSecondColumn">XXXXXX XXXXXX</div>
171
    </div>
172
</div>
173
174
<div class="constrainedContainer">
175
    <div class="grid gridAutoMaxContent" id="gridAutoMaxContentUnsortedConstrained">
176
	<div class="firstRowBothColumn">XXXX XXXX</div>
177
	<div class="firstRowBothColumn">XXX XXX</div>
178
	<div class="firstRowSecondColumn">XXXXX</div>
179
    </div>
180
</div>
181
182
<div class="constrainedContainer">
183
    <div class="grid gridMaxContentAndMinContentFixed" id="gridMaxContentAndMinContentFixedUnsortedConstrained">
184
	<div class="firstRowBothColumn">XXX XXX</div>
185
	<div class="firstRowBothColumn">XXXX XXXX</div>
186
	<div class="firstRowSecondColumn">XXXX XXXX</div>
187
	<div class="firstRowSecondColumn">XX</div>
188
    </div>
189
</div>
190
191
<div class="constrainedContainer">
192
    <div class="grid gridMaxContentAndMaxContentFixed" id="gridMaxContentAndMaxContentFixedUnsortedConstrained">
193
	<div class="firstRowBothColumn">XXXX XXXX</div>
194
	<div class="firstRowBothColumn">XX XX XX XX</div>
195
	<div class="firstRowSecondColumn">XXXXXXX</div>
196
    </div>
197
</div>
198
199
<!-- Check that items are processed by ascending span instead of going track by track allowing extra space distribution. -->
200
<div class="grid gridMinContentFixedAndAuto" id="gridMinContentFixedAndAutoUnsorted">
201
    <div class="firstRowBothColumn">XXXX XXXX</div>
202
    <div class="firstRowSecondColumn">XXXX XXXX</div>
203
</div>
204
205
<div class="grid gridAutoAndAuto" id="gridAutoAndAutoUnsorted">
206
    <div class="firstRowBothColumn">XXXX XXXX</div>
207
    <div class="firstRowSecondColumn">XXX</div>
208
</div>
209
210
<div class="grid gridMinContentAndMinContentFixed" id="gridMinContentAndMinContentFixedUnsorted">
211
    <div class="firstRowBothColumn">XXXX XXXX</div>
212
    <div class="firstRowBothColumn">XX XX XX XX</div>
213
    <div class="firstRowSecondColumn">XXXX XXXX</div>
214
</div>
215
216
<div class="grid gridMaxContentAndMinContent" id="gridMaxContentAndMinContentUnsorted">
217
    <div class="firstRowBothColumn">XXX XXX</div>
218
    <div class="firstRowSecondColumn">XXXXXXX</div>
219
</div>
220
221
<div class="grid gridFixedMinContentAndMaxContent" id="gridFixedMinContentAndMaxContentUnsorted">
222
    <div class="firstRowBothColumn">XXXXX XX</div>
223
    <div class="firstRowSecondColumn">XXX</div>
224
    <div class="firstRowSecondColumn">XXXXX</div>
225
</div>
226
227
<div class="grid gridFixedMaxContentAndMinContent" id="gridFixedMaxContentAndMinContentUnsorted">
228
    <div class="firstRowBothColumn">XXXX XXXX</div>
229
    <div class="firstRowBothColumn">X X</div>
230
    <div class="firstRowSecondColumn">XXXX</div>
231
</div>
232
233
<div class="grid gridMinContentAndMaxContentFixed" id="gridMinContentAndMaxContentFixedUnsorted">
234
    <div class="firstRowBothColumn">XXXX XXXX</div>
235
    <div class="firstRowSecondColumn">XXXX XXXX</div>
236
</div>
237
238
<div class="grid gridMaxContentFixedAndAuto" id="gridMaxContentFixedAndAutoUnsorted">
239
    <div class="firstRowBothColumn">XX XX</div>
240
    <div class="firstRowSecondColumn">XXXX</div>
241
    <div class="firstRowSecondColumn">XXX XXX</div>
242
</div>
243
244
<div class="grid gridAutoMinContent" id="gridAutoMinContentUnsorted">
245
    <div class="firstRowBothColumn">XX XX XX XX</div>
246
    <div class="firstRowSecondColumn">XXXXXX XXXXXX</div>
247
</div>
248
249
<div class="grid gridAutoMaxContent" id="gridAutoMaxContentUnsorted">
250
    <div class="firstRowBothColumn">XXXX XXXX</div>
251
    <div class="firstRowBothColumn">XXX XXX</div>
252
    <div class="firstRowSecondColumn">XXXXX</div>
253
</div>
254
255
<div class="grid gridMaxContentAndMinContentFixed" id="gridMaxContentAndMinContentFixedUnsorted">
256
    <div class="firstRowBothColumn">XXX XXX</div>
257
    <div class="firstRowBothColumn">XXXX XXXX</div>
258
    <div class="firstRowSecondColumn">XXXX XXXX</div>
259
    <div class="firstRowSecondColumn">XX</div>
260
</div>
261
262
<div class="grid gridMaxContentAndMaxContentFixed" id="gridMaxContentAndMaxContentFixedUnsorted">
263
    <div class="firstRowBothColumn">XXXX XXXX</div>
264
    <div class="firstRowBothColumn">XX XX XX XX</div>
265
    <div class="firstRowSecondColumn">XXXXXXX</div>
266
</div>
267
106
<!-- The next four force the grid to grow only a particular subset of tracks above the limits -->
268
<!-- The next four force the grid to grow only a particular subset of tracks above the limits -->
107
<div class="constrainedContainer">
269
<div class="constrainedContainer">
108
    <div class="grid gridMinContentFixedAndAuto" id="gridMinContentFixedAndAutoAboveLimits">
270
    <div class="grid gridMinContentFixedAndAuto" id="gridMinContentFixedAndAutoAboveLimits">
Lines 151-156 testGridColumnsValues("gridAutoMaxContent", "20px 70px"); a/LayoutTests/fast/css-grid-layout/grid-content-sized-columns-resolution.html_sec2
151
testGridColumnsValues("gridMaxContentAndMinContentFixed", "70px 20px");
313
testGridColumnsValues("gridMaxContentAndMinContentFixed", "70px 20px");
152
testGridColumnsValues("gridMaxContentAndMaxContentFixed", "55px 35px");
314
testGridColumnsValues("gridMaxContentAndMaxContentFixed", "55px 35px");
153
315
316
debug("");
317
debug("Check that items are processed by ascending span to compute track breadths forbidding extra space distribution.");
318
testGridColumnsValues("gridMinContentFixedAndAutoUnsortedConstrained", "0px 40px");
319
testGridColumnsValues("gridAutoAndAutoUnsortedConstrained", "5px 35px");
320
testGridColumnsValues("gridMinContentAndMinContentFixedUnsortedConstrained", "0px 40px");
321
testGridColumnsValues("gridMaxContentAndMinContentUnsortedConstrained", "0px 70px");
322
testGridColumnsValues("gridFixedMinContentAndMaxContentUnsortedConstrained", "10px 70px");
323
testGridColumnsValues("gridFixedMaxContentAndMinContentUnsortedConstrained", "10px 40px");
324
testGridColumnsValues("gridMinContentAndMaxContentFixedUnsortedConstrained", "0px 90px");
325
testGridColumnsValues("gridMaxContentFixedAndAutoUnsortedConstrained", "10px 40px");
326
testGridColumnsValues("gridAutoMinContentUnsortedConstrained", "0px 60px");
327
testGridColumnsValues("gridAutoMaxContentUnsortedConstrained", "0px 90px");
328
testGridColumnsValues("gridMaxContentAndMinContentFixedUnsortedConstrained", "50px 40px");
329
testGridColumnsValues("gridMaxContentAndMaxContentFixedUnsortedConstrained", "40px 70px");
330
331
debug("");
332
debug("Check that items are processed by ascending span to compute track breadths allowing extra space distribution.");
333
testGridColumnsValues("gridMinContentFixedAndAutoUnsorted", "15px 90px");
334
testGridColumnsValues("gridAutoAndAutoUnsorted", "30px 60px");
335
testGridColumnsValues("gridMinContentAndMinContentFixedUnsorted", "10px 40px");
336
testGridColumnsValues("gridMaxContentAndMinContentUnsorted", "0px 70px");
337
testGridColumnsValues("gridFixedMinContentAndMaxContentUnsorted", "10px 70px");
338
testGridColumnsValues("gridFixedMaxContentAndMinContentUnsorted", "50px 40px");
339
testGridColumnsValues("gridMinContentAndMaxContentFixedUnsorted", "10px 90px");
340
testGridColumnsValues("gridMaxContentFixedAndAutoUnsorted", "15px 70px");
341
testGridColumnsValues("gridAutoMinContentUnsorted", "50px 60px");
342
testGridColumnsValues("gridAutoMaxContentUnsorted", "0px 90px");
343
testGridColumnsValues("gridMaxContentAndMinContentFixedUnsorted", "55px 40px");
344
testGridColumnsValues("gridMaxContentAndMaxContentFixedUnsorted", "75px 70px");
345
154
testGridColumnsValues("gridMinContentFixedAndAutoAboveLimits", "15px 95px");
346
testGridColumnsValues("gridMinContentFixedAndAutoAboveLimits", "15px 95px");
155
testGridColumnsValues("gridMaxContentFixedAndAutoAboveLimits", "65px 85px");
347
testGridColumnsValues("gridMaxContentFixedAndAutoAboveLimits", "65px 85px");
156
testGridColumnsValues("gridMinContentFixedAndFixedFixedAndAuto", "20px 20px 60px");
348
testGridColumnsValues("gridMinContentFixedAndFixedFixedAndAuto", "20px 20px 60px");
- a/LayoutTests/fast/css-grid-layout/grid-preferred-logical-widths.html -1 / +1 lines
Lines 127-133 a/LayoutTests/fast/css-grid-layout/grid-preferred-logical-widths.html_sec1
127
    <div class="firstRowFirstColumn">XX XX XX</div>
127
    <div class="firstRowFirstColumn">XX XX XX</div>
128
    <div class="firstRowBothColumn">XX XX XX</div>
128
    <div class="firstRowBothColumn">XX XX XX</div>
129
</div>
129
</div>
130
<div class="grid gridAutoContent max-content" data-expected-height="10" data-expected-width="120">
130
<div class="grid gridAutoContent max-content" data-expected-height="10" data-expected-width="80">
131
    <div class="firstRowBothColumn">XX XX XX</div>
131
    <div class="firstRowBothColumn">XX XX XX</div>
132
    <div class="firstRowSecondColumn">XX XX XX</div>
132
    <div class="firstRowSecondColumn">XX XX XX</div>
133
</div>
133
</div>

Return to Bug 140615