Skip to content

Commit df461c8

Browse files
committed
Moving layout tests in here.
Canonical link: https://commits.webkit.org/4308@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@4740 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent e5d0804 commit df461c8

807 files changed

Lines changed: 24704 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
layer at (0,0) size 800x600
2+
RenderCanvas at (0,0) size 800x600
3+
layer at (0,0) size 800x183
4+
RenderBlock {HTML} at (0,0) size 800x183
5+
RenderBody {BODY} at (8,8) size 784x161
6+
RenderBlock {P} at (0,0) size 784x161
7+
RenderBlock (anonymous) at (2,2) size 780x16
8+
RenderInline {I} at (0,0) size 226x16
9+
RenderText {TEXT} at (0,0) size 92x16
10+
text run at (0,0) width 92: "Start of a line. "
11+
RenderInline {FONT} at (0,0) size 134x16 [color=#FF0000]
12+
RenderText {TEXT} at (92,0) size 134x16
13+
text run at (92,0) width 134: "More red on this line:"
14+
RenderBlock (anonymous) at (2,34) size 780x59 [color=#FF0000]
15+
RenderBlock {H3} at (0,0) size 780x18
16+
RenderText {TEXT} at (0,0) size 203x18
17+
text run at (0,0) width 203: "Suddenly a block appears!"
18+
RenderBlock {H2} at (0,35) size 780x24
19+
RenderText {TEXT} at (0,0) size 194x24
20+
text run at (0,0) width 194: "And another block!"
21+
RenderBlock (anonymous) at (2,110) size 780x49
22+
RenderInline {I} at (0,0) size 291x32
23+
RenderInline {FONT} at (0,0) size 96x32 [color=#FF0000]
24+
RenderText {TEXT} at (0,0) size 96x16
25+
text run at (0,0) width 96: "Now more text."
26+
RenderBR {BR} at (0,0) size 0x0
27+
RenderText {TEXT} at (0,16) size 66x16
28+
text run at (0,16) width 66: "This is red"
29+
RenderText {TEXT} at (66,16) size 225x16
30+
text run at (66,16) width 225: " but now only italic on the same line"
31+
RenderBR {BR} at (0,0) size 0x0
32+
RenderText {TEXT} at (0,32) size 140x17
33+
text run at (0,32) width 140: "Plain line at the end."
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<p style="border:2px solid red">
2+
<i>Start of a line. <font color=red>More red on this line:
3+
<h3>Suddenly a block appears!</h3>
4+
<h2>And another block!</h2>
5+
Now more text.<br>
6+
This is red</font> but now only italic on the same line</i><br>
7+
Plain line at the end.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
layer at (0,0) size 800x600
2+
RenderCanvas at (0,0) size 800x600
3+
layer at (0,0) size 800x37
4+
RenderBlock {HTML} at (0,0) size 800x37
5+
RenderBody {BODY} at (8,8) size 784x21
6+
RenderBlock {DIV} at (0,0) size 784x21
7+
RenderInline {A} at (0,0) size 30x17 [color=#008000]
8+
RenderText {TEXT} at (2,2) size 30x17
9+
text run at (2,2) width 30: "First"
10+
RenderInline {A} at (0,0) size 49x17 [color=#008000]
11+
RenderText {TEXT} at (32,2) size 49x17
12+
text run at (32,2) width 49: "Second"
13+
RenderInline {A} at (0,0) size 37x17 [color=#008000]
14+
RenderText {TEXT} at (81,2) size 37x17
15+
text run at (81,2) width 37: "Third"
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<head>
2+
<style>
3+
a { color: green; }
4+
</style>
5+
</head>
6+
<body>
7+
<script>
8+
function toggle(id)
9+
{
10+
var node = document.getElementById(id);
11+
node.style.display == 'none' ? node.style.display = 'block' : node.style.display = 'none';
12+
}
13+
</script>
14+
15+
<div style="border:2px solid red"><a onclick="toggle('first');">First</a><span id="first" style="display:none">
16+
&nbsp;First Content.
17+
</span><a onclick="toggle('second');">Second</a><span id="second" style="display:none">
18+
&nbsp;Second Content.
19+
</span><a onclick="toggle('third');">Third</a><span id="third" style="display:none">
20+
&nbsp;Third Content.<a onclick="toggle('crashme');">&nbsp;Crash Me</a><span id="crashme" style="display:none">
21+
&nbsp;&nbsp;You win!
22+
</span></div>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
layer at (0,0) size 800x600
2+
RenderCanvas at (0,0) size 800x600
3+
layer at (0,0) size 800x54
4+
RenderBlock {HTML} at (0,0) size 800x54
5+
RenderBody {BODY} at (8,8) size 784x38
6+
RenderBlock {DIV} at (0,0) size 204x38
7+
RenderText {TEXT} at (2,2) size 198x34
8+
text run at (2,2) width 176: "This is some text. What is"
9+
text run at (2,19) width 198: "going on here. Does it work?"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<html>
2+
<body>
3+
<div style="border:2px solid red; min-width: 200px; max-width:150px">
4+
This is some text. What is going on here. Does it work?
5+
</div>
6+
</body>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
layer at (0,0) size 800x600
2+
RenderCanvas at (0,0) size 800x600
3+
layer at (0,0) size 800x81
4+
RenderBlock {HTML} at (0,0) size 800x81
5+
RenderBody {BODY} at (8,14) size 784x59
6+
RenderBlock {P} at (0,0) size 784x17
7+
RenderText {TEXT} at (0,0) size 577x17
8+
text run at (0,0) width 577: "The following two DIVs should be the same width (resulting in a single 4 by 2 block)."
9+
RenderBlock {DIV} at (0,31) size 42x14 [bgcolor=#000080]
10+
RenderBlock {DIV} at (0,0) size 56x14
11+
RenderBlock {DIV} at (0,45) size 56x14 [bgcolor=#000080]
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2+
<html lang="en">
3+
<head>
4+
<title>CSS Block Box Model: overconstrained horizontal box model and minimum widths</title>
5+
<style type="text/css">
6+
.container { width: 3em; }
7+
.test { margin-left: 0; border-left: 2em solid; padding-left: 0; width: auto; padding-right: 0; border-right: 2em solid; margin-right: 0; }
8+
.control { margin-left: 0; border-left: none; padding-left: 0; width: 4em; padding-right: 0; border-right: none; margin-right: 0; }
9+
div { background: navy; border-color: navy; height: 1em; }
10+
</style>
11+
</head>
12+
<body>
13+
<p>The following two DIVs should be the same width (resulting in a single 4 by 2 block).</p>
14+
<div class="container">
15+
<div class="test"></div>
16+
</div>
17+
<div class="control"></div>
18+
</body>
19+
</html>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
layer at (0,0) size 800x600
2+
RenderCanvas at (0,0) size 800x600
3+
layer at (0,0) size 800x81
4+
RenderBlock {HTML} at (0,0) size 800x81
5+
RenderBody {BODY} at (8,14) size 784x59
6+
RenderBlock {P} at (0,0) size 784x17
7+
RenderText {TEXT} at (0,0) size 577x17
8+
text run at (0,0) width 577: "The following two DIVs should be the same width (resulting in a single 4 by 2 block)."
9+
RenderBlock {DIV} at (0,31) size 42x14 [bgcolor=#000080]
10+
RenderBlock {DIV} at (0,0) size 56x14
11+
RenderBlock {DIV} at (0,45) size 56x14 [bgcolor=#000080]
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2+
<html lang="en">
3+
<head>
4+
<title>CSS Block Box Model: overconstrained horizontal box model and minimum widths</title>
5+
<style type="text/css">
6+
.container { width: 3em; }
7+
.test { margin-left: 0; border-left: none; padding-left: 2em; width: auto; padding-right: 2em; border-right: none; margin-right: 0; }
8+
.control { margin-left: 0; border-left: none; padding-left: 0; width: 4em; padding-right: 0; border-right: none; margin-right: 0; }
9+
div { background: navy; height: 1em; }
10+
</style>
11+
</head>
12+
<body>
13+
<p>The following two DIVs should be the same width (resulting in a single 4 by 2 block).</p>
14+
<div class="container">
15+
<div class="test"></div>
16+
</div>
17+
<div class="control"></div>
18+
</body>
19+
</html>

0 commit comments

Comments
 (0)