Auto merge of #7605 - nox:skew, r=mbrubeck

Implement "transform: skew()"

Thanks to @Jinwoo-Song for the original commit, which I just rebased and cleaned up. Fixes #6237.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7605)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-09-16 06:31:48 -06:00
commit 6a12f00d6d
29 changed files with 259 additions and 118 deletions

View file

@ -371,6 +371,7 @@ flaky_cpu == linebreak_simple_a.html linebreak_simple_b.html
== transform_3d.html transform_3d_ref.html
== transform_optimization.html transform_optimization_ref.html
== transform_simple_a.html transform_simple_ref.html
== transform_skew_a.html transform_skew_ref.html
== transform_stacking_context_a.html transform_stacking_context_ref.html
== upper_id_attr.html upper_id_attr_ref.html
flaky_cpu,prefs:"layout.writing-mode.enabled" == vertical-lr-blocks.html vertical-lr-blocks_ref.html

View file

@ -0,0 +1,51 @@
<!DOCTYPE html>
<html>
<head>
<style>
div {
height: 150px;
width: 150px;
}
div>div {
background-color: blue;
}
.container {
border: 1px solid black;
margin: 20px;
}
.transformed1 {
transform: skewX(0.3rad);
}
.transformed2 {
transform: skewY(0.5rad);
}
.transformed3 {
transform: skew(0.3rad, 0.5rad);
}
</style>
</head>
<body>
<p>
<div class="container">
<div class="transformed1"></div>
</div>
</p>
<p>
<div class="container">
<div class="transformed2"></div>
</div>
</p>
<p>
<div class="container">
<div class="transformed3"></div>
</div>
</p>
</body>
</html>

View file

@ -0,0 +1,52 @@
<!DOCTYPE html>
<html>
<head>
<style>
div {
height: 150px;
width: 150px;
}
div>div {
background-color: blue;
}
.container {
border: 1px solid black;
margin: 20px;
}
.transformed1_ref {
transform: matrix(1, 0, 0.30933624961, 1, 0, 0);
}
.transformed2_ref {
transform: matrix(1, 0.54630248984, 0, 1, 0, 0);
}
.transformed3_ref {
transform: matrix(1, 0.54630248984, 0.30933624961, 1, 0, 0);
}
</style>
</head>
<body>
<p>
<div class="container">
<div class="transformed1_ref"></div>
</div>
</p>
<p>
<div class="container">
<div class="transformed2_ref"></div>
</div>
</p>
<p>
<div class="container">
<div class="transformed3_ref"></div>
</div>
</p>
</body>
</html>

View file

@ -25,4 +25,4 @@ url = "0.2"
cssparser = "0.3.1"
string_cache = "0.1"
string_cache_plugin = "0.1"
euclid = "0.1"
euclid = "0.2"

View file

@ -17,5 +17,5 @@ path = "../../../components/plugins"
[dependencies]
libc = "0.1"
euclid = "0.1"
euclid = "0.2"