mirror of
https://github.com/servo/servo.git
synced 2025-07-31 03:00:29 +01:00
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:
commit
db1163b1ec
3 changed files with 73 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
37
tests/wpt/mozilla/tests/css/canvas_over_area.html
Normal file
37
tests/wpt/mozilla/tests/css/canvas_over_area.html
Normal 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>
|
11
tests/wpt/mozilla/tests/css/canvas_over_area_ref.html
Normal file
11
tests/wpt/mozilla/tests/css/canvas_over_area_ref.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
<style>
|
||||
|
||||
#base {
|
||||
background-color: green;
|
||||
height: 100px;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="base"></div>
|
Loading…
Add table
Add a link
Reference in a new issue