auto merge of #5134 : pcwalton/servo/transforms, r=SimonSapin

r? @SimonSapin
This commit is contained in:
bors-servo 2015-03-17 13:39:51 -06:00
commit 203240c1d8
14 changed files with 964 additions and 35 deletions

View file

@ -267,6 +267,8 @@ experimental == rtl_simple.html rtl_simple_ref.html
== text_transform_lowercase_a.html text_transform_lowercase_ref.html
== text_transform_none_a.html text_transform_none_ref.html
== text_transform_uppercase_a.html text_transform_uppercase_ref.html
== transform_simple_a.html transform_simple_ref.html
== transform_stacking_context_a.html transform_stacking_context_ref.html
== upper_id_attr.html upper_id_attr_ref.html
flaky_cpu,experimental == vertical-lr-blocks.html vertical-lr-blocks_ref.html
== vertical_align_bottom_a.html vertical_align_bottom_ref.html

View file

@ -0,0 +1,49 @@
<!DOCTYPE html>
<html>
<head>
<!-- Tests that basic CSS transforms work. -->
<style>
section {
position: absolute;
width: 50px;
height: 50px;
top: 25px;
left: 50px;
transform: rotate(90deg) scale(1, 2);
}
div {
position: absolute;
width: 25px;
height: 25px;
}
#a {
background: cyan;
}
#b {
background: magenta;
}
#c {
background: yellow;
}
#d {
background: black;
}
#a, #b {
top: 0;
}
#c, #d {
top: 25px;
}
#a, #c {
left: 0;
}
#b, #d {
left: 25px;
}
</style>
</head>
<body>
<section><div id=a></div><div id=b></div><div id=c></div><div id=d></div></section>
</body>
</html>

View file

@ -0,0 +1,49 @@
<!DOCTYPE html>
<html>
<head>
<!-- Tests that basic CSS transforms work. -->
<style>
section {
position: absolute;
width: 100px;
height: 50px;
top: 25px;
left: 25px;
}
div {
position: absolute;
width: 50px;
height: 25px;
}
#a {
background: yellow;
}
#b {
background: cyan;
}
#c {
background: black;
}
#d {
background: magenta;
}
#a, #b {
top: 0;
}
#c, #d {
top: 25px;
}
#a, #c {
left: 0;
}
#b, #d {
left: 50px;
}
</style>
</head>
<body>
<section><div id=a></div><div id=b></div><div id=c></div><div id=d></div></section>
</body>
</html>

View file

@ -0,0 +1,54 @@
<!DOCTYPE html>
<html>
<head>
<!-- Tests that `transform` causes a new stacking context to be formed. -->
<style>
body {
margin: 0;
}
section {
position: absolute;
width: 100px;
height: 100px;
}
#a {
background: red;
top: 0;
left: 0;
z-index: 1;
}
#b {
background: #00ff00;
top: 25px;
left: 25px;
z-index: 2;
}
#c {
background: blue;
top: 50px;
left: 50px;
z-index: 3;
}
#container {
transform: matrix(1, 0, 0, 1, 0, 0);
width: 200px;
height: 200px;
}
</style>
</head>
<body>
<section id=a></section>
<section id=c></section>
<div id=container>
<section id=b></section>
</div>
</body>
</html>

View file

@ -0,0 +1,41 @@
<!DOCTYPE html>
<html>
<head>
<!-- Tests that `transform` causes a new stacking context to be formed. -->
<style>
section {
position: absolute;
width: 100px;
height: 100px;
}
#a {
background: red;
top: 0;
left: 0;
z-index: 2;
}
#b {
background: #00ff00;
top: 25px;
left: 25px;
z-index: 1;
}
#c {
background: blue;
top: 50px;
left: 50px;
z-index: 3;
}
</style>
</head>
<body>
<section id=a></section>
<section id=c></section>
<section id=b></section>
</body>
</html>