3 <link href=
"resources/grid.css" rel=
"stylesheet">
6 grid-template-columns:
50px
100px
200px;
7 grid-template-rows:
50px
100px
200px;
8 background-color: #aaa;
11 margin:
0; /* Disable any margins as they change the top / left offsets. */
16 <script src=
"../../resources/check-layout.js"></script>
17 <body onload=
"checkLayout('.grid > *')">
19 <p>This test checks that the grid items' 'display' computed value matches the specification. It also checks that the grid items are placed in the right grid area.
</p>
21 <div style=
"position: relative;">
23 <!-- These values are taken from the table in CSS 2.1 Chapter 9.7. -->
24 <div data-expected-display=
"table" data-offset-x=
"50" data-offset-y=
"150" style=
"display: inline-table"></div>
25 <div data-expected-display=
"block" data-offset-x=
"50" data-offset-y=
"150" style=
"display: inline"></div>
26 <div data-expected-display=
"block" data-offset-x=
"50" data-offset-y=
"150" style=
"display: table-row-group"></div>
27 <div data-expected-display=
"block" data-offset-x=
"50" data-offset-y=
"150" style=
"display: table-column"></div>
28 <div data-expected-display=
"block" data-offset-x=
"50" data-offset-y=
"150" style=
"display: table-column-group"></div>
29 <div data-expected-display=
"block" data-offset-x=
"50" data-offset-y=
"150" style=
"display: table-header-group"></div>
30 <div data-expected-display=
"block" data-offset-x=
"50" data-offset-y=
"150" style=
"display: table-footer-group"></div>
31 <div data-expected-display=
"block" data-offset-x=
"50" data-offset-y=
"150" style=
"display: table-row"></div>
32 <div data-expected-display=
"block" data-offset-x=
"50" data-offset-y=
"150" style=
"display: table-cell"></div>
33 <div data-expected-display=
"block" data-offset-x=
"50" data-offset-y=
"150" style=
"display: table-caption"></div>
34 <div data-expected-display=
"block" data-offset-x=
"50" data-offset-y=
"150" style=
"display: inline-block"></div>
36 <!-- Some extra values we support. -->
37 <div data-expected-display=
"flex" data-offset-x=
"50" data-offset-y=
"150" style=
"display: flex"></div>
38 <div data-expected-display=
"flex" data-offset-x=
"50" data-offset-y=
"150" style=
"display: flex"></div>
39 <div data-expected-display=
"block" data-offset-x=
"50" data-offset-y=
"150" style=
"display: -webkit-inline-block"></div>
40 <div data-expected-display=
"block" data-offset-x=
"50" data-offset-y=
"150" style=
"display: compact"></div>
41 <div data-expected-display=
"block" data-offset-x=
"50" data-offset-y=
"150" style=
"display: run-in"></div>
43 <!-- Elements with custom renderers. -->
44 <button data-expected-display=
"block" data-offset-x=
"50" data-offset-y=
"150"></button>
45 <canvas data-expected-display=
"block" data-offset-x=
"50" data-offset-y=
"150">canvas
</canvas>
46 <iframe data-expected-display=
"block" data-offset-x=
"50" data-offset-y=
"150" src=
"data:text/html,<body bgcolor=#fff>iframe</body>"></iframe>
47 <iframe seamless
data-expected-display=
"block" data-offset-x=
"50" data-offset-y=
"150" src=
"data:text/html,<body bgcolor=#fff>iframe</body>"></iframe>
48 <object data-expected-display=
"block" data-offset-x=
"50" data-offset-y=
"150">object
</object>
49 <select data-expected-display=
"block" data-offset-x=
"50" data-offset-y=
"150">
50 <option>select
</option>
52 <textarea data-expected-display=
"block" data-offset-x=
"50" data-offset-y=
"150">textarea
</textarea>
53 <input data-expected-display=
"block" data-offset-x=
"50" data-offset-y=
"150" type=
"checkbox" value=
"radio"></input>
54 <input data-expected-display=
"block" data-offset-x=
"50" data-offset-y=
"150" type=
"file" value=
"file"></input>
55 <input data-expected-display=
"block" data-offset-x=
"50" data-offset-y=
"150" type=
"image" value=
"image"></input>
56 <input data-expected-display=
"block" data-offset-x=
"50" data-offset-y=
"150" type=
"password" value=
"image"></input>
57 <input data-expected-display=
"block" data-offset-x=
"50" data-offset-y=
"150" type=
"text" value=
"text"></input>
59 <img data-expected-display=
"block" data-offset-x=
"50" data-offset-y=
"150" src=
"../images/resources/green-256x256.png"></img>
60 <img data-expected-display=
"block" data-offset-x=
"50" data-offset-y=
"150" src=
"nonexistent.png"></img>
62 <svg data-expected-display=
"block" data-offset-x=
"50" data-offset-y=
"150">
63 <circle cx=
"50" cy=
"50" r=
"50" fill=
"blue">
67 <!-- Spans are common so they should be tested. -->
68 <span data-expected-display=
"block" data-offset-x=
"50" data-offset-y=
"150"></span>