- a/Source/WebCore/ChangeLog +16 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2015-05-14  Manuel Rego Casasnovas  <rego@igalia.com>
2
3
        [CSS Grid Layout] Add scrollbar width in intrinsic logical widths computation
4
        https://bugs.webkit.org/show_bug.cgi?id=145021
5
6
        Like for flexboxes we've to take into account the scrollbar logical
7
        width while computing the intrinsic min and max logical widths.
8
9
        Reviewed by NOBODY (OOPS!).
10
11
        Test: fast/css-grid-layout/compute-intrinsic-widths-scrollbar.html
12
13
        * rendering/RenderGrid.cpp:
14
        (WebCore::RenderGrid::computeIntrinsicLogicalWidths): Add scrollbar
15
        logical width.
16
1
2015-05-14  Beth Dakin  <bdakin@apple.com>
17
2015-05-14  Beth Dakin  <bdakin@apple.com>
2
18
3
        Change range of possible forces for mouseforcechanged DOM event
19
        Change range of possible forces for mouseforcechanged DOM event
- a/Source/WebCore/rendering/RenderGrid.cpp -2 / +4 lines
Lines 301-310 void RenderGrid::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo a/Source/WebCore/rendering/RenderGrid.cpp_sec1
301
301
302
        minLogicalWidth += minTrackBreadth;
302
        minLogicalWidth += minTrackBreadth;
303
        maxLogicalWidth += maxTrackBreadth;
303
        maxLogicalWidth += maxTrackBreadth;
304
305
        // FIXME: This should add in the scrollbarWidth (e.g. see RenderFlexibleBox).
306
    }
304
    }
307
305
306
    LayoutUnit scrollbarWidth = intrinsicScrollbarLogicalWidth();
307
    minLogicalWidth += scrollbarWidth;
308
    maxLogicalWidth += scrollbarWidth;
309
308
    if (!wasPopulated)
310
    if (!wasPopulated)
309
        const_cast<RenderGrid*>(this)->clearGrid();
311
        const_cast<RenderGrid*>(this)->clearGrid();
310
}
312
}
- a/LayoutTests/ChangeLog +10 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2015-05-14  Manuel Rego Casasnovas  <rego@igalia.com>
2
3
        [CSS Grid Layout] Add scrollbar width in intrinsic logical widths computation
4
        https://bugs.webkit.org/show_bug.cgi?id=145021
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        * fast/css-grid-layout/compute-intrinsic-widths-scrollbar-expected.txt: Added.
9
        * fast/css-grid-layout/compute-intrinsic-widths-scrollbar.html: Added.
10
1
2015-05-14  Filip Pizlo  <fpizlo@apple.com>
11
2015-05-14  Filip Pizlo  <fpizlo@apple.com>
2
12
3
        Unreviewed, skip js/regress-141098.html. The fix will be tracked in https://bugs.webkit.org/show_bug.cgi?id=145007
13
        Unreviewed, skip js/regress-141098.html. The fix will be tracked in https://bugs.webkit.org/show_bug.cgi?id=145007
- a/LayoutTests/fast/css-grid-layout/compute-intrinsic-widths-scrollbar-expected.txt +20 lines
Line 0 a/LayoutTests/fast/css-grid-layout/compute-intrinsic-widths-scrollbar-expected.txt_sec1
1
This test checks that grid container scrollbar is computed properly during intrinsic width calculation.
2
3
item
4
PASS
5
item
6
PASS
7
item
8
PASS
9
item
10
PASS
11
item
12
PASS
13
item
14
PASS
15
item
16
PASS
17
item
18
PASS
19
item
20
PASS
- a/LayoutTests/fast/css-grid-layout/compute-intrinsic-widths-scrollbar.html +51 lines
Line 0 a/LayoutTests/fast/css-grid-layout/compute-intrinsic-widths-scrollbar.html_sec1
1
<!DOCTYPE html>
2
<link href="resources/grid.css" rel="stylesheet">
3
<link href="../css-intrinsic-dimensions/resources/width-keyword-classes.css" rel=stylesheet>
4
<style>
5
    .grid {
6
        overflow-y: scroll;
7
    }
8
9
    .item {
10
        width: 200px;
11
    }
12
13
    .oneColumn {
14
        -webkit-grid-template-columns: 200px;
15
    }
16
17
    .fourColumns {
18
        -webkit-grid-template-columns: repeat(4, 50px);
19
    }
20
</style>
21
<script src="../../resources/check-layout.js"></script>
22
<p>This test checks that grid container scrollbar is computed properly during intrinsic width calculation.</p>
23
<body onload="checkLayout('.grid')">
24
    <div class="grid min-content" data-expected-client-width="200">
25
        <div class="item">item</div>
26
    </div>
27
    <div class="grid max-content" data-expected-client-width="200">
28
        <div class="item">item</div>
29
    </div>
30
    <div class="grid fit-content" data-expected-client-width="200">
31
        <div class="item">item</div>
32
    </div>
33
    <div class="grid oneColumn min-content" data-expected-client-width="200">
34
        item
35
    </div>
36
    <div class="grid oneColumn max-content" data-expected-client-width="200">
37
        item
38
    </div>
39
    <div class="grid oneColumn fit-content" data-expected-client-width="200">
40
        item
41
    </div>
42
    <div class="grid fourColumns min-content" data-expected-client-width="200">
43
        item
44
    </div>
45
    <div class="grid fourColumns max-content" data-expected-client-width="200">
46
        item
47
    </div>
48
    <div class="grid fourColumns fit-content" data-expected-client-width="200">
49
        item
50
    </div>
51
</body>

Return to Bug 145021