Revision control

1
<!doctype html>
2
<html>
3
<head>
4
<style type="text/css">
5
@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
12
@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 {
29
background-color:green;
30
}
31
@media print {
32
@page somepage:first {
33
margin:3cm;
34
}
35
}
36
@page auto_page {
37
size: auto;
38
}
39
@page square_page {
40
size: 4in;
41
}
42
@page letter_page {
43
size: letter;
44
}
45
@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
73
table {
74
page: Rotated;
75
}
76
div {
77
page: Auto;
78
}
79
pre {
80
page: Auto Rotated; /* Invalid */
81
}
82
p {
83
page: 1cm; /* Invalid */
84
}
85
86
/* 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
100
if (window.testRunner)
101
testRunner.dumpAsText();
102
103
function print(str)
104
{
105
document.getElementById("output").innerHTML += str;
106
}
107
108
function 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