Auto merge of #7414 - Adenilson:fixCanvasPanic01, r=pcwalton

Adding a reference test where a bigger area than the original element

Adding a reference test where a bigger area than the original element size is defined at script.

To pass, this depends in a fix on rust-azure (i.e. #195). No for commit, we need the rust-azure to land and next update the deps.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7414)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-11-03 00:22:46 +05:30
commit db1163b1ec
3 changed files with 73 additions and 1 deletions

View file

@ -1007,6 +1007,18 @@
"url": "/_mozilla/css/canvas_linear_gradient_a.html"
}
],
"css/canvas_over_area.html": [
{
"path": "css/canvas_over_area.html",
"references": [
[
"/_mozilla/css/canvas_over_area_ref.html",
"=="
]
],
"url": "/_mozilla/css/canvas_over_area.html"
}
],
"css/case-insensitive-font-family.html": [
{
"path": "css/case-insensitive-font-family.html",
@ -5730,6 +5742,18 @@
"url": "/_mozilla/css/canvas_linear_gradient_a.html"
}
],
"css/canvas_over_area.html": [
{
"path": "css/canvas_over_area.html",
"references": [
[
"/_mozilla/css/canvas_over_area_ref.html",
"=="
]
],
"url": "/_mozilla/css/canvas_over_area.html"
}
],
"css/case-insensitive-font-family.html": [
{
"path": "css/case-insensitive-font-family.html",
@ -8808,4 +8832,4 @@
"rev": null,
"url_base": "/_mozilla/",
"version": 2
}
}

View file

@ -0,0 +1,37 @@
<!doctype html>
<body>
<link rel='match' href='canvas_over_area_ref.html'>
<style>
#base {
background-color: red;
height: 100px;
width: 100px;
}
#painted {
width: 100px;
height: 100px;
position: relative;
top: -100px;
}
</style>
<div id="base"></div>
<canvas id="painted"></canvas>
<script>
onload = function() {
var obj = document.getElementById("painted");
obj.width = 500;
obj.height = 500;
var context = obj.getContext("2d");
context.save();
context.fillStyle = "green";
context.fillRect(0, 0, 500, 500);
context.restore();
};
</script>
</body>
</html>

View file

@ -0,0 +1,11 @@
<style>
#base {
background-color: green;
height: 100px;
width: 100px;
}
</style>
<div id="base"></div>