blob: 0a0bb0287a6baa19ced8af235e77276449dc3763 [file] [log] [blame]
yuzo@google.com4e988932010-04-28 06:19:36 +00001<!doctype html>
2<html>
3<head>
4<style type="text/css">
yuzo@google.com87d4a842010-05-19 07:33:28 +00005@page :visited { /* :visited is invalid for @page */
6 color: red;
7}
8@page a_page_name:visited { /* :visited is invalid for @page */
9 background-color: red;
10}
11
yuzo@google.com4e988932010-04-28 06:19:36 +000012@page {
13 margin-top:5cm;
14 margin-bottom:10cm;
15}
16@page :left {
17 margin-right:3cm;
18}
19@page :right {
20 margin-left:3cm;
21}
22@page :first {
23 border-width:1px;
24}
25@page hello {
26 color:green;
27}
28@page world:right {
yuzo@google.com87d4a842010-05-19 07:33:28 +000029 background-color:green;
yuzo@google.com4e988932010-04-28 06:19:36 +000030}
31@media print {
32 @page somepage:first {
33 margin:3cm;
34 }
35}
yuzo@google.com734dc152010-04-28 06:45:35 +000036@page auto_page {
37 size: auto;
yuzo@google.com4e988932010-04-28 06:19:36 +000038}
yuzo@google.com734dc152010-04-28 06:45:35 +000039@page square_page {
40 size: 4in;
41}
42@page letter_page {
yuzo@google.com4e988932010-04-28 06:19:36 +000043 size: letter;
44}
yuzo@google.com734dc152010-04-28 06:45:35 +000045@page page_widht_height {
46 size: 10cm 15cm;
47}
48@page page_size_orientation {
49 size: ledger landscape;
50}
51@page page_orientation_size {
52 size: portrait a4;
53}
54@page err_empty_size {
55 size:;
56}
57@page err_unknow_page_size {
58 size: yotsugiri;
59}
60@page err_length_and_page_size {
61 size: 10cm letter;
62}
63@page err_length_and_orientation {
64 size: 10cm landscape;
65}
66@page err_orientations {
67 size: portrait landscape;
68}
69@page err_too_many_params {
70 size: a5 landscape auto;
71}
72
yuzo@google.com77d5c0c2010-04-28 07:09:09 +000073table {
74 page: Rotated;
75}
76div {
77 page: Auto;
78}
79pre {
80 page: Auto Rotated; /* Invalid */
81}
82p {
83 page: 1cm; /* Invalid */
84}
85
yuzo@google.com4e988932010-04-28 06:19:36 +000086/* FIXME: Add the following once margin at-rule is implemented.
87
88@page :first {
89 @top-left-corner {
90 content:"TLC";
91 }
92 @bottom-center {
93 content:"BC";
94 }
95}
96*/
97</style>
98<script type="text/javascript">
99
rniwa@webkit.org5cf7fa82012-06-15 07:38:37 +0000100if (window.testRunner)
101 testRunner.dumpAsText();
yuzo@google.com4e988932010-04-28 06:19:36 +0000102
103function print(str)
104{
105 document.getElementById("output").innerHTML += str;
106}
107
108function printCssTextOfPageRules()
109{
110 var ss = document.styleSheets;
111 for (var i = 0; i < ss.length; i++) {
112 for (var j = 0; j < ss[i].cssRules.length; j++) {
113 print(ss[i].cssRules[j].cssText + "<br/>");
114 }
115 }
116}
117
118</script>
119</head>
120<body onload="printCssTextOfPageRules();">
121<div id="output"></div>
122</body>
123</html>
124