aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2015-11-03 00:22:46 +0530
committerbors-servo <lbergstrom+bors@mozilla.com>2015-11-03 00:22:46 +0530
commitdb1163b1eceb5fef6463c4425e99d974a85a50a8 (patch)
treee812967f8f70329a33b829c4c38eceaeae09ca4a
parent5c11c88e92ccbc3013501096d5625778774c9fee (diff)
parentb1197c31d1bff0192d0e25c1a65e21bd3c76c0f6 (diff)
downloadservo-db1163b1eceb5fef6463c4425e99d974a85a50a8.tar.gz
servo-db1163b1eceb5fef6463c4425e99d974a85a50a8.zip
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 -->
-rw-r--r--tests/wpt/mozilla/meta/MANIFEST.json26
-rw-r--r--tests/wpt/mozilla/tests/css/canvas_over_area.html37
-rw-r--r--tests/wpt/mozilla/tests/css/canvas_over_area_ref.html11
3 files changed, 73 insertions, 1 deletions
diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json
index 6132dea8524..10980937d89 100644
--- a/tests/wpt/mozilla/meta/MANIFEST.json
+++ b/tests/wpt/mozilla/meta/MANIFEST.json
@@ -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
-} \ No newline at end of file
+}
diff --git a/tests/wpt/mozilla/tests/css/canvas_over_area.html b/tests/wpt/mozilla/tests/css/canvas_over_area.html
new file mode 100644
index 00000000000..c1e062cad68
--- /dev/null
+++ b/tests/wpt/mozilla/tests/css/canvas_over_area.html
@@ -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>
diff --git a/tests/wpt/mozilla/tests/css/canvas_over_area_ref.html b/tests/wpt/mozilla/tests/css/canvas_over_area_ref.html
new file mode 100644
index 00000000000..5cfa3c76ad6
--- /dev/null
+++ b/tests/wpt/mozilla/tests/css/canvas_over_area_ref.html
@@ -0,0 +1,11 @@
+<style>
+
+#base {
+ background-color: green;
+ height: 100px;
+ width: 100px;
+}
+
+</style>
+
+<div id="base"></div>