3 <link href=
"resources/grid.css" rel=
"stylesheet">
7 grid-template-rows: repeat(
5,
100px);
8 grid-template-columns: repeat(
5,
100px);
9 width: -webkit-fit-content;
10 background-color: red;
14 -webkit-writing-mode: vertical-lr;
20 background-color: purple;
29 <div>This test checks that we correctly paint scrolled grid container.
</div>
30 <div>There should be no red below.
</div>
32 <div>Default writing mode (horizontal-lr)
</div>
34 <!-- An item in the middle of the grid. -->
35 <div class=
"scrolledDiv" data-scroll-top=
"200" data-scroll-left=
"100">
37 <div class=
"gridItem" style=
"grid-column: 2; grid-row: 2; border-bottom: 100px green solid;"></div>
41 <!-- Bottom-right corner of the grid. -->
42 <div class=
"scrolledDiv" data-scroll-top=
"400" data-scroll-left=
"400">
44 <div class=
"gridItem" style=
"grid-column: 4; grid-row: 5; border-right: 100px green solid;"></div>
48 <!-- Bottom-right corner of the grid. -->
49 <div class=
"scrolledDiv" data-scroll-top=
"400" data-scroll-left=
"400">
51 <div class=
"gridItem" style=
"grid-column: 4; grid-row: 5; border-left: 100px purple solid; background-color: green;"></div>
55 <div>Flipped writing mode (vertical-rl)
</div>
57 <!-- An item in the middle of the grid. -->
58 <div class=
"scrolledDiv" data-scroll-top=
"100" data-scroll-left=
"200">
59 <div class=
"grid verticalRL">
60 <div class=
"gridItem" style=
"grid-column: 2; grid-row: 2; border-right: 100px green solid;"></div>
64 <!-- Bottom-right corner of the grid. -->
65 <div class=
"scrolledDiv" data-scroll-top=
"400" data-scroll-left=
"400">
66 <div class=
"grid verticalRL">
67 <div class=
"gridItem" style=
"grid-column: 4; grid-row: 5; border-bottom: 100px green solid;"></div>
71 <!-- Bottom-right corner of the grid. -->
72 <div class=
"scrolledDiv" data-scroll-top=
"400" data-scroll-left=
"400">
73 <div class=
"grid verticalRL">
74 <div class=
"gridItem" style=
"grid-column: 4; grid-row: 5; border-top: 100px purple solid; background-color: green;"></div>
80 var scrolledDivs
= document
.getElementsByClassName("scrolledDiv");
81 for (i
= 0; i
< scrolledDivs
.length
; ++i
) {
82 scrolledDiv
= scrolledDivs
[i
];
83 scrolledDiv
.scrollTop
= scrolledDiv
.getAttribute("data-scroll-top");
84 scrolledDiv
.scrollLeft
= scrolledDiv
.getAttribute("data-scroll-left");