Bug 1303534 - Test: Add test verifying clipping and complex blend modes combine correctly. r=jrmuizel
authorBas Schouten <bschouten@mozilla.com>
Thu, 29 Sep 2016 17:55:26 +0200
changeset 315850 f325ed1abef16a4090cd6d3fd7a81d245c2de705
parent 315849 e4508f246a862379bc3e40380f1972fa808fc685
child 315851 18faa8438eebdf4b25f37b54f645087585b7f5fa
push id20634
push usercbook@mozilla.com
push dateFri, 30 Sep 2016 10:10:13 +0000
treeherderfx-team@afe79b010d13 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1303534
milestone52.0a1
Bug 1303534 - Test: Add test verifying clipping and complex blend modes combine correctly. r=jrmuizel 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,12 +101,13 @@ 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
 fuzzy-if(winWidget,63,1575) fuzzy-if(cocoaWidget,1,24) == 1304353-text-global-composite-op-1.html 1304353-text-global-composite-op-1-ref.html