Bug 1303534 - Test: Add test verifying clipping and complex blend modes combine correctly. r=jrmuizel a=ritu
authorBas Schouten <bschouten@mozilla.com>
Thu, 29 Sep 2016 17:55:26 +0200
changeset 355889 e9bffb4e05344fcebfd484b381919a721bc4a662
parent 355888 287ec2c7587c2e16799c2b01a1f8b9386038352f
child 355890 ac5b00f946f484c36924449e6392f2aee316f620
push id6570
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:26:13 +0000
treeherdermozilla-beta@f455459b2ae5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel, ritu
bugs1303534
milestone51.0a2
Bug 1303534 - Test: Add test verifying clipping and complex blend modes combine correctly. r=jrmuizel a=ritu MozReview-Commit-ID: LawduLvtvWn
layout/reftests/canvas/1303534-1-ref.html
layout/reftests/canvas/1303534-1.html
layout/reftests/canvas/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/canvas/1303534-1-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="UTF-8">
+    <script>
+      function draw() {
+        var c = document.getElementById('c').getContext('2d');
+
+        c.fillStyle = 'lime';
+        c.fillRect(0, 0, 200, 100);
+      }
+    </script>
+  </head>
+  <body onload="draw();">
+    <canvas id='c' width='200' height='100'></canvas>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/canvas/1303534-1.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="UTF-8">
+    <script>
+      function draw() {
+        var c = document.getElementById('c').getContext('2d');
+        var img = document.getElementById("img");
+
+        c.fillStyle = 'lime';
+        c.fillRect(0, 0, 200, 100);
+
+        c.rect(0, 0, 200, 100);
+        c.clip();
+        
+        c.globalCompositeOperation = "multiply";
+        c.fillStyle = 'rgb(255, 255, 255)';
+        c.fillRect(0, 0, 200, 100);
+      }
+    </script>
+  </head>
+  <body onload="draw();">
+    <canvas id='c' width='200' height='100'></canvas>
+  </body>
+</html>
--- a/layout/reftests/canvas/reftest.list
+++ b/layout/reftests/canvas/reftest.list
@@ -101,11 +101,12 @@ fuzzy-if(azureQuartz,2,128) fuzzy-if(d2d
 
 == 802658-1.html 802658-1-ref.html
 == 1074733-1.html 1074733-1-ref.html
 fuzzy-if(Mulet,45,2) == 1107096-invisibles.html 1107096-invisibles-ref.html
 == 1151821-1.html 1151821-1-ref.html
 == 1201272-1.html 1201272-1-ref.html
 == 1224976-1.html 1224976-1-ref.html
 == 1238795-1.html 1238795-1-ref.html
+== 1303534-1.html 1303534-1-ref.html
 
 == 1304353-text-global-alpha-1.html 1304353-text-global-alpha-1-ref.html
 fuzzy-if(winWidget,1,14) == 1304353-text-global-alpha-2.html 1304353-text-global-alpha-2-ref.html