e85d40e15a05c4032413a298351c69a6cbdb189c
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / css-grid-layout / grid-item-named-grid-area-resolution.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <link href="resources/grid.css" rel="stylesheet">
5 <style>
6 .grid {
7     grid-template-rows: (before) 50px (middle) 100px (after);
8     grid-template-columns: 40px 80px 160px;
9 }
10
11 .gridWithoutRepeat {
12     grid-template-areas: "first second third"
13                          "fourth fifth sixth";
14 }
15
16 .gridWithRepeat {
17     grid-template-areas: "first  second third"
18                          "fourth fourth third";
19 }
20
21 .gridItemFirstArea {
22     grid-area: first;
23 }
24
25 .gridItemSecondArea {
26     grid-area: second;
27 }
28
29 .gridItemThirdArea {
30     grid-area: third;
31 }
32
33 .gridItemFourthArea {
34     grid-area: fourth;
35 }
36
37 .gridItemFifthArea {
38     grid-area: fifth;
39 }
40
41 .gridItemSixthArea {
42     grid-area: sixth;
43 }
44
45 .gridItemSpan2ThirdArea {
46     grid-row: fourth;
47     grid-column: span 2 / third;
48 }
49
50 .gridItemNamedGridLineWithArea {
51     grid-row: third / after;
52     grid-column: 1;
53 }
54 </style>
55 <script src="../../resources/check-layout.js"></script>
56 </head>
57 <body onload="checkLayout('.grid')">
58
59 <p>This test checks that we resolve named grid areas per the specification.</p>
60
61 <div style="position: relative">
62     <div class="grid gridWithoutRepeat">
63         <div class="sizedToGridArea gridItemSixthArea" data-offset-x="120" data-offset-y="50" data-expected-width="160" data-expected-height="100"></div>
64         <div class="sizedToGridArea gridItemFifthArea" data-offset-x="40" data-offset-y="50" data-expected-width="80" data-expected-height="100"></div>
65         <div class="sizedToGridArea gridItemFourthArea" data-offset-x="0" data-offset-y="50" data-expected-width="40" data-expected-height="100"></div>
66         <div class="sizedToGridArea gridItemThirdArea" data-offset-x="120" data-offset-y="0" data-expected-width="160" data-expected-height="50"></div>
67         <div class="sizedToGridArea gridItemSecondArea" data-offset-x="40" data-offset-y="0" data-expected-width="80" data-expected-height="50"></div>
68         <div class="sizedToGridArea gridItemFirstArea" data-offset-x="0" data-offset-y="0" data-expected-width="40" data-expected-height="50"></div>
69
70         <div class="sizedToGridArea gridItemSpan2ThirdArea" data-offset-x="40" data-offset-y="50" data-expected-width="240" data-expected-height="100"></div>
71         <div class="sizedToGridArea gridItemNamedGridLineWithArea" data-offset-x="0" data-offset-y="0" data-expected-width="40" data-expected-height="150"></div>
72     </div>
73 </div>
74
75 <div style="position: relative">
76     <div class="grid gridWithRepeat">
77         <!-- fifth and sixth are invalid named grid areas. -->
78         <div class="sizedToGridArea gridItemSixthArea" data-offset-x="0" data-offset-y="0" data-expected-width="40" data-expected-height="50"></div>
79         <div class="sizedToGridArea gridItemFifthArea" data-offset-x="0" data-offset-y="0" data-expected-width="40" data-expected-height="50"></div>
80
81         <div class="sizedToGridArea gridItemFourthArea" data-offset-x="0" data-offset-y="50" data-expected-width="120" data-expected-height="100"></div>
82         <div class="sizedToGridArea gridItemThirdArea" data-offset-x="120" data-offset-y="0" data-expected-width="160" data-expected-height="150"></div>
83         <div class="sizedToGridArea gridItemSecondArea" data-offset-x="40" data-offset-y="0" data-expected-width="80" data-expected-height="50"></div>
84         <div class="sizedToGridArea gridItemFirstArea" data-offset-x="0" data-offset-y="0" data-expected-width="40" data-expected-height="50"></div>
85
86         <div class="sizedToGridArea gridItemSpan2ThirdArea" data-offset-x="40" data-offset-y="50" data-expected-width="240" data-expected-height="100"></div>
87         <div class="sizedToGridArea gridItemNamedGridLineWithArea" data-offset-x="0" data-offset-y="0" data-expected-width="40" data-expected-height="150"></div>
88     </div>
89 </div>
90
91 </body>
92 </html>