Import Cobalt 19.master.0.203780

Includes the following patches:
  https://cobalt-review.googlesource.com/c/cobalt/+/5210
    by errong.leng@samsung.com
  https://cobalt-review.googlesource.com/c/cobalt/+/5270
    by linus.wang@samsung.com
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/.gitkeep b/src/third_party/web_platform_tests/2dcontext/compositing/.gitkeep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/.gitkeep
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.copy.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.copy.html
new file mode 100644
index 0000000..5f32421
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.copy.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.canvas.copy</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.canvas.copy</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.copy.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = canvas.width;
+canvas2.height = canvas.height;
+var ctx2 = canvas2.getContext('2d');
+ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'copy';
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 255,255,0,191, "50,25", "255,255,0,191", 5);
+
+
+});
+</script>
+<img src="/images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.copy.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.copy.png
new file mode 100644
index 0000000..8e0668e
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.copy.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.destination-atop.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.destination-atop.html
new file mode 100644
index 0000000..14261d0
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.destination-atop.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.canvas.destination-atop</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.canvas.destination-atop</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.destination-atop.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = canvas.width;
+canvas2.height = canvas.height;
+var ctx2 = canvas2.getContext('2d');
+ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-atop';
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 128,255,128,191, "50,25", "128,255,128,191", 5);
+
+
+});
+</script>
+<img src="/images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.destination-atop.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.destination-atop.png
new file mode 100644
index 0000000..59bdc91
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.destination-atop.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.destination-in.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.destination-in.html
new file mode 100644
index 0000000..2320064
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.destination-in.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.canvas.destination-in</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.canvas.destination-in</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.destination-in.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = canvas.width;
+canvas2.height = canvas.height;
+var ctx2 = canvas2.getContext('2d');
+ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-in';
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,255,255,96, "50,25", "0,255,255,96", 5);
+
+
+});
+</script>
+<img src="/images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.destination-in.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.destination-in.png
new file mode 100644
index 0000000..790e418
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.destination-in.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.destination-out.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.destination-out.html
new file mode 100644
index 0000000..5d392ee
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.destination-out.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.canvas.destination-out</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.canvas.destination-out</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.destination-out.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = canvas.width;
+canvas2.height = canvas.height;
+var ctx2 = canvas2.getContext('2d');
+ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-out';
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,255,255,32, "50,25", "0,255,255,32", 5);
+
+
+});
+</script>
+<img src="/images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.destination-out.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.destination-out.png
new file mode 100644
index 0000000..7f5ed1a
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.destination-out.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.destination-over.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.destination-over.html
new file mode 100644
index 0000000..130cbba
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.destination-over.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.canvas.destination-over</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.canvas.destination-over</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.destination-over.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = canvas.width;
+canvas2.height = canvas.height;
+var ctx2 = canvas2.getContext('2d');
+ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-over';
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 109,255,146,223, "50,25", "109,255,146,223", 5);
+
+
+});
+</script>
+<img src="/images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.destination-over.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.destination-over.png
new file mode 100644
index 0000000..ac86892
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.destination-over.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.lighter.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.lighter.html
new file mode 100644
index 0000000..bab8118
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.lighter.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.canvas.lighter</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.canvas.lighter</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.lighter.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = canvas.width;
+canvas2.height = canvas.height;
+var ctx2 = canvas2.getContext('2d');
+ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'lighter';
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 191,255,128,255, "50,25", "191,255,128,255", 5);
+
+
+});
+</script>
+<img src="/images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.lighter.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.lighter.png
new file mode 100644
index 0000000..9ffde41
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.lighter.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.source-atop.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.source-atop.html
new file mode 100644
index 0000000..3d19701
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.source-atop.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.canvas.source-atop</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.canvas.source-atop</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.source-atop.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = canvas.width;
+canvas2.height = canvas.height;
+var ctx2 = canvas2.getContext('2d');
+ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-atop';
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 191,255,64,128, "50,25", "191,255,64,128", 5);
+
+
+});
+</script>
+<img src="/images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.source-atop.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.source-atop.png
new file mode 100644
index 0000000..1ef9630
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.source-atop.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.source-in.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.source-in.html
new file mode 100644
index 0000000..dfc1a5a
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.source-in.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.canvas.source-in</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.canvas.source-in</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.source-in.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = canvas.width;
+canvas2.height = canvas.height;
+var ctx2 = canvas2.getContext('2d');
+ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-in';
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 255,255,0,96, "50,25", "255,255,0,96", 5);
+
+
+});
+</script>
+<img src="/images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.source-in.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.source-in.png
new file mode 100644
index 0000000..c26cdcc
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.source-in.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.source-out.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.source-out.html
new file mode 100644
index 0000000..a4bd322
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.source-out.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.canvas.source-out</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.canvas.source-out</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.source-out.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = canvas.width;
+canvas2.height = canvas.height;
+var ctx2 = canvas2.getContext('2d');
+ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-out';
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 255,255,0,96, "50,25", "255,255,0,96", 5);
+
+
+});
+</script>
+<img src="/images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.source-out.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.source-out.png
new file mode 100644
index 0000000..c26cdcc
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.source-out.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.source-over.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.source-over.html
new file mode 100644
index 0000000..ff8dc52
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.source-over.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.canvas.source-over</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.canvas.source-over</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.source-over.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = canvas.width;
+canvas2.height = canvas.height;
+var ctx2 = canvas2.getContext('2d');
+ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-over';
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 219,255,36,223, "50,25", "219,255,36,223", 5);
+
+
+});
+</script>
+<img src="/images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.source-over.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.source-over.png
new file mode 100644
index 0000000..5437608
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.source-over.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.xor.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.xor.html
new file mode 100644
index 0000000..f39a023
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.xor.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.canvas.xor</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.canvas.xor</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.xor.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = canvas.width;
+canvas2.height = canvas.height;
+var ctx2 = canvas2.getContext('2d');
+ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'xor';
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 191,255,64,128, "50,25", "191,255,64,128", 5);
+
+
+});
+</script>
+<img src="/images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.xor.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.xor.png
new file mode 100644
index 0000000..1ef9630
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.canvas.xor.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.copy.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.copy.html
new file mode 100644
index 0000000..08096cf
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.copy.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.clip.copy</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.clip.copy</h1>
+<p class="desc">fill() does not affect pixels outside the clip region.</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("fill() does not affect pixels outside the clip region.");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'copy';
+ctx.rect(-20, -20, 10, 10);
+ctx.clip();
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 50, 50);
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.destination-atop.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.destination-atop.html
new file mode 100644
index 0000000..c05cd34
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.destination-atop.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.clip.destination-atop</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.clip.destination-atop</h1>
+<p class="desc">fill() does not affect pixels outside the clip region.</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("fill() does not affect pixels outside the clip region.");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-atop';
+ctx.rect(-20, -20, 10, 10);
+ctx.clip();
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 50, 50);
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.destination-in.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.destination-in.html
new file mode 100644
index 0000000..24aff70
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.destination-in.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.clip.destination-in</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.clip.destination-in</h1>
+<p class="desc">fill() does not affect pixels outside the clip region.</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("fill() does not affect pixels outside the clip region.");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-in';
+ctx.rect(-20, -20, 10, 10);
+ctx.clip();
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 50, 50);
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.destination-out.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.destination-out.html
new file mode 100644
index 0000000..afeb009
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.destination-out.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.clip.destination-out</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.clip.destination-out</h1>
+<p class="desc">fill() does not affect pixels outside the clip region.</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("fill() does not affect pixels outside the clip region.");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-out';
+ctx.rect(-20, -20, 10, 10);
+ctx.clip();
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 50, 50);
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.destination-over.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.destination-over.html
new file mode 100644
index 0000000..7a25883
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.destination-over.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.clip.destination-over</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.clip.destination-over</h1>
+<p class="desc">fill() does not affect pixels outside the clip region.</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("fill() does not affect pixels outside the clip region.");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-over';
+ctx.rect(-20, -20, 10, 10);
+ctx.clip();
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 50, 50);
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.lighter.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.lighter.html
new file mode 100644
index 0000000..ffc864b
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.lighter.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.clip.lighter</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.clip.lighter</h1>
+<p class="desc">fill() does not affect pixels outside the clip region.</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("fill() does not affect pixels outside the clip region.");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'lighter';
+ctx.rect(-20, -20, 10, 10);
+ctx.clip();
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 50, 50);
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.source-atop.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.source-atop.html
new file mode 100644
index 0000000..4580b54
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.source-atop.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.clip.source-atop</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.clip.source-atop</h1>
+<p class="desc">fill() does not affect pixels outside the clip region.</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("fill() does not affect pixels outside the clip region.");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-atop';
+ctx.rect(-20, -20, 10, 10);
+ctx.clip();
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 50, 50);
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.source-in.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.source-in.html
new file mode 100644
index 0000000..79c4e16
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.source-in.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.clip.source-in</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.clip.source-in</h1>
+<p class="desc">fill() does not affect pixels outside the clip region.</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("fill() does not affect pixels outside the clip region.");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-in';
+ctx.rect(-20, -20, 10, 10);
+ctx.clip();
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 50, 50);
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.source-out.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.source-out.html
new file mode 100644
index 0000000..5345666
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.source-out.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.clip.source-out</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.clip.source-out</h1>
+<p class="desc">fill() does not affect pixels outside the clip region.</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("fill() does not affect pixels outside the clip region.");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-out';
+ctx.rect(-20, -20, 10, 10);
+ctx.clip();
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 50, 50);
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.source-over.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.source-over.html
new file mode 100644
index 0000000..98b446a
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.source-over.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.clip.source-over</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.clip.source-over</h1>
+<p class="desc">fill() does not affect pixels outside the clip region.</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("fill() does not affect pixels outside the clip region.");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-over';
+ctx.rect(-20, -20, 10, 10);
+ctx.clip();
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 50, 50);
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.xor.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.xor.html
new file mode 100644
index 0000000..b6e36bc
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.clip.xor.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.clip.xor</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.clip.xor</h1>
+<p class="desc">fill() does not affect pixels outside the clip region.</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("fill() does not affect pixels outside the clip region.");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'xor';
+ctx.rect(-20, -20, 10, 10);
+ctx.clip();
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 50, 50);
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.globalAlpha.canvas.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.globalAlpha.canvas.html
new file mode 100644
index 0000000..0b6df49
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.globalAlpha.canvas.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.globalAlpha.canvas</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.globalAlpha.canvas</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = 100;
+canvas2.height = 50;
+var ctx2 = canvas2.getContext('2d');
+ctx2.fillStyle = '#f00';
+ctx2.fillRect(0, 0, 100, 50);
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 2,253,0,255, "50,25", "2,253,0,255", 2);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.globalAlpha.canvaspattern.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.globalAlpha.canvaspattern.html
new file mode 100644
index 0000000..eeb2442
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.globalAlpha.canvaspattern.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.globalAlpha.canvaspattern</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.globalAlpha.canvaspattern</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = 100;
+canvas2.height = 50;
+var ctx2 = canvas2.getContext('2d');
+ctx2.fillStyle = '#f00';
+ctx2.fillRect(0, 0, 100, 50);
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = ctx.createPattern(canvas2, 'no-repeat');
+ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 2,253,0,255, "50,25", "2,253,0,255", 2);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.globalAlpha.default.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.globalAlpha.default.html
new file mode 100644
index 0000000..f84a340
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.globalAlpha.default.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.globalAlpha.default</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.globalAlpha.default</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+_assertSame(ctx.globalAlpha, 1.0, "ctx.globalAlpha", "1.0");
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.globalAlpha.fill.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.globalAlpha.fill.html
new file mode 100644
index 0000000..591fb6b
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.globalAlpha.fill.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.globalAlpha.fill</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.globalAlpha.fill</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 2,253,0,255, "50,25", "2,253,0,255", 2);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.globalAlpha.image.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.globalAlpha.image.html
new file mode 100644
index 0000000..b796992
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.globalAlpha.image.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.globalAlpha.image</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.globalAlpha.image</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations
+ctx.drawImage(document.getElementById('red.png'), 0, 0);
+_assertPixelApprox(canvas, 50,25, 2,253,0,255, "50,25", "2,253,0,255", 2);
+
+
+});
+</script>
+<img src="/images/red.png" id="red.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.globalAlpha.imagepattern.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.globalAlpha.imagepattern.html
new file mode 100644
index 0000000..ab86339
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.globalAlpha.imagepattern.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.globalAlpha.imagepattern</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.globalAlpha.imagepattern</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = ctx.createPattern(document.getElementById('red.png'), 'no-repeat');
+ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 2,253,0,255, "50,25", "2,253,0,255", 2);
+
+
+});
+</script>
+<img src="/images/red.png" id="red.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.globalAlpha.invalid.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.globalAlpha.invalid.html
new file mode 100644
index 0000000..980ef83
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.globalAlpha.invalid.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.globalAlpha.invalid</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.globalAlpha.invalid</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+ctx.globalAlpha = 0.5;
+var a = ctx.globalAlpha; // might not be exactly 0.5, if it is rounded/quantised, so remember for future comparisons
+ctx.globalAlpha = Infinity;
+_assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
+ctx.globalAlpha = -Infinity;
+_assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
+ctx.globalAlpha = NaN;
+_assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.globalAlpha.range.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.globalAlpha.range.html
new file mode 100644
index 0000000..14926e6
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.globalAlpha.range.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.globalAlpha.range</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.globalAlpha.range</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+ctx.globalAlpha = 0.5;
+var a = ctx.globalAlpha; // might not be exactly 0.5, if it is rounded/quantised, so remember for future comparisons
+ctx.globalAlpha = 1.1;
+_assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
+ctx.globalAlpha = -0.1;
+_assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
+ctx.globalAlpha = 0;
+_assertSame(ctx.globalAlpha, 0, "ctx.globalAlpha", "0");
+ctx.globalAlpha = 1;
+_assertSame(ctx.globalAlpha, 1, "ctx.globalAlpha", "1");
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.copy.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.copy.html
new file mode 100644
index 0000000..9649234
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.copy.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.image.copy</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.image.copy</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.image.copy.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'copy';
+ctx.drawImage(document.getElementById('yellow75.png'), 0, 0);
+_assertPixelApprox(canvas, 50,25, 255,255,0,191, "50,25", "255,255,0,191", 5);
+
+
+});
+</script>
+<img src="/images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.copy.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.copy.png
new file mode 100644
index 0000000..8e0668e
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.copy.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.destination-atop.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.destination-atop.html
new file mode 100644
index 0000000..221e7b2
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.destination-atop.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.image.destination-atop</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.image.destination-atop</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.image.destination-atop.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-atop';
+ctx.drawImage(document.getElementById('yellow75.png'), 0, 0);
+_assertPixelApprox(canvas, 50,25, 128,255,128,191, "50,25", "128,255,128,191", 5);
+
+
+});
+</script>
+<img src="/images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.destination-atop.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.destination-atop.png
new file mode 100644
index 0000000..59bdc91
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.destination-atop.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.destination-in.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.destination-in.html
new file mode 100644
index 0000000..b528602
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.destination-in.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.image.destination-in</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.image.destination-in</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.image.destination-in.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-in';
+ctx.drawImage(document.getElementById('yellow75.png'), 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,255,255,96, "50,25", "0,255,255,96", 5);
+
+
+});
+</script>
+<img src="/images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.destination-in.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.destination-in.png
new file mode 100644
index 0000000..790e418
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.destination-in.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.destination-out.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.destination-out.html
new file mode 100644
index 0000000..572ad85
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.destination-out.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.image.destination-out</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.image.destination-out</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.image.destination-out.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-out';
+ctx.drawImage(document.getElementById('yellow75.png'), 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,255,255,32, "50,25", "0,255,255,32", 5);
+
+
+});
+</script>
+<img src="/images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.destination-out.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.destination-out.png
new file mode 100644
index 0000000..7f5ed1a
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.destination-out.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.destination-over.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.destination-over.html
new file mode 100644
index 0000000..1613141
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.destination-over.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.image.destination-over</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.image.destination-over</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.image.destination-over.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-over';
+ctx.drawImage(document.getElementById('yellow75.png'), 0, 0);
+_assertPixelApprox(canvas, 50,25, 109,255,146,223, "50,25", "109,255,146,223", 5);
+
+
+});
+</script>
+<img src="/images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.destination-over.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.destination-over.png
new file mode 100644
index 0000000..ac86892
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.destination-over.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.lighter.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.lighter.html
new file mode 100644
index 0000000..f44d6dc
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.lighter.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.image.lighter</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.image.lighter</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.image.lighter.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'lighter';
+ctx.drawImage(document.getElementById('yellow75.png'), 0, 0);
+_assertPixelApprox(canvas, 50,25, 191,255,128,255, "50,25", "191,255,128,255", 5);
+
+
+});
+</script>
+<img src="/images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.lighter.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.lighter.png
new file mode 100644
index 0000000..9ffde41
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.lighter.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.source-atop.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.source-atop.html
new file mode 100644
index 0000000..2d3a88a
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.source-atop.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.image.source-atop</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.image.source-atop</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.image.source-atop.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-atop';
+ctx.drawImage(document.getElementById('yellow75.png'), 0, 0);
+_assertPixelApprox(canvas, 50,25, 191,255,64,128, "50,25", "191,255,64,128", 5);
+
+
+});
+</script>
+<img src="/images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.source-atop.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.source-atop.png
new file mode 100644
index 0000000..1ef9630
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.source-atop.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.source-in.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.source-in.html
new file mode 100644
index 0000000..a8c1b58
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.source-in.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.image.source-in</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.image.source-in</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.image.source-in.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-in';
+ctx.drawImage(document.getElementById('yellow75.png'), 0, 0);
+_assertPixelApprox(canvas, 50,25, 255,255,0,96, "50,25", "255,255,0,96", 5);
+
+
+});
+</script>
+<img src="/images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.source-in.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.source-in.png
new file mode 100644
index 0000000..c26cdcc
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.source-in.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.source-out.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.source-out.html
new file mode 100644
index 0000000..079d342
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.source-out.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.image.source-out</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.image.source-out</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.image.source-out.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-out';
+ctx.drawImage(document.getElementById('yellow75.png'), 0, 0);
+_assertPixelApprox(canvas, 50,25, 255,255,0,96, "50,25", "255,255,0,96", 5);
+
+
+});
+</script>
+<img src="/images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.source-out.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.source-out.png
new file mode 100644
index 0000000..c26cdcc
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.source-out.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.source-over.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.source-over.html
new file mode 100644
index 0000000..bbb00e2
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.source-over.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.image.source-over</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.image.source-over</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.image.source-over.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-over';
+ctx.drawImage(document.getElementById('yellow75.png'), 0, 0);
+_assertPixelApprox(canvas, 50,25, 219,255,36,223, "50,25", "219,255,36,223", 5);
+
+
+});
+</script>
+<img src="/images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.source-over.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.source-over.png
new file mode 100644
index 0000000..5437608
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.source-over.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.xor.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.xor.html
new file mode 100644
index 0000000..a38ece5
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.xor.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.image.xor</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.image.xor</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.image.xor.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'xor';
+ctx.drawImage(document.getElementById('yellow75.png'), 0, 0);
+_assertPixelApprox(canvas, 50,25, 191,255,64,128, "50,25", "191,255,64,128", 5);
+
+
+});
+</script>
+<img src="/images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.xor.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.xor.png
new file mode 100644
index 0000000..1ef9630
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.image.xor.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.operation.casesensitive.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.operation.casesensitive.html
new file mode 100644
index 0000000..81b7237
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.operation.casesensitive.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.operation.casesensitive</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.operation.casesensitive</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+ctx.globalCompositeOperation = 'xor';
+ctx.globalCompositeOperation = 'Source-over';
+_assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.operation.clear.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.operation.clear.html
new file mode 100644
index 0000000..7212cd0
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.operation.clear.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.operation.clear</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.operation.clear</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+ctx.globalCompositeOperation = 'xor';
+ctx.globalCompositeOperation = 'clear';
+_assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.operation.darker.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.operation.darker.html
new file mode 100644
index 0000000..ac155ab
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.operation.darker.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.operation.darker</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.operation.darker</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+ctx.globalCompositeOperation = 'xor';
+ctx.globalCompositeOperation = 'darker';
+_assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.operation.default.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.operation.default.html
new file mode 100644
index 0000000..165e8b8
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.operation.default.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.operation.default</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.operation.default</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+_assertSame(ctx.globalCompositeOperation, 'source-over', "ctx.globalCompositeOperation", "'source-over'");
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.operation.get.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.operation.get.html
new file mode 100644
index 0000000..53762da
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.operation.get.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.operation.get</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.operation.get</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+var modes = ['source-atop', 'source-in', 'source-out', 'source-over',
+    'destination-atop', 'destination-in', 'destination-out', 'destination-over',
+    'lighter', 'copy', 'xor'];
+for (var i = 0; i < modes.length; ++i)
+{
+    ctx.globalCompositeOperation = modes[i];
+    _assertSame(ctx.globalCompositeOperation, modes[i], "ctx.globalCompositeOperation", "modes[\""+(i)+"\"]");
+}
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.operation.highlight.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.operation.highlight.html
new file mode 100644
index 0000000..8a3bcf7
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.operation.highlight.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.operation.highlight</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.operation.highlight</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+ctx.globalCompositeOperation = 'xor';
+ctx.globalCompositeOperation = 'highlight';
+_assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.operation.nullsuffix.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.operation.nullsuffix.html
new file mode 100644
index 0000000..aa3f8cc
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.operation.nullsuffix.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.operation.nullsuffix</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.operation.nullsuffix</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+ctx.globalCompositeOperation = 'xor';
+ctx.globalCompositeOperation = 'source-over\0';
+_assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.operation.over.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.operation.over.html
new file mode 100644
index 0000000..e9b91e8
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.operation.over.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.operation.over</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.operation.over</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+ctx.globalCompositeOperation = 'xor';
+ctx.globalCompositeOperation = 'over';
+_assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.operation.unrecognised.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.operation.unrecognised.html
new file mode 100644
index 0000000..ced2acc
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.operation.unrecognised.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.operation.unrecognised</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.operation.unrecognised</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+ctx.globalCompositeOperation = 'xor';
+ctx.globalCompositeOperation = 'nonexistent';
+_assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.copy.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.copy.html
new file mode 100644
index 0000000..8bf99f3
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.copy.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.solid.copy</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.solid.copy</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.solid.copy.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'copy';
+ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 255,255,0,255, "50,25", "255,255,0,255", 5);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.copy.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.copy.png
new file mode 100644
index 0000000..fc0883e
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.copy.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.destination-atop.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.destination-atop.html
new file mode 100644
index 0000000..045caaa
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.destination-atop.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.solid.destination-atop</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.solid.destination-atop</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.solid.destination-atop.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-atop';
+ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,255,255,255, "50,25", "0,255,255,255", 5);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.destination-atop.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.destination-atop.png
new file mode 100644
index 0000000..dd04072
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.destination-atop.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.destination-in.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.destination-in.html
new file mode 100644
index 0000000..ec27d60
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.destination-in.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.solid.destination-in</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.solid.destination-in</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.solid.destination-in.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-in';
+ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,255,255,255, "50,25", "0,255,255,255", 5);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.destination-in.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.destination-in.png
new file mode 100644
index 0000000..dd04072
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.destination-in.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.destination-out.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.destination-out.html
new file mode 100644
index 0000000..d96ce76
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.destination-out.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.solid.destination-out</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.solid.destination-out</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.solid.destination-out.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-out';
+ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.destination-out.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.destination-out.png
new file mode 100644
index 0000000..eeedd0f
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.destination-out.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.destination-over.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.destination-over.html
new file mode 100644
index 0000000..08a0238
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.destination-over.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.solid.destination-over</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.solid.destination-over</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.solid.destination-over.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-over';
+ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,255,255,255, "50,25", "0,255,255,255", 5);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.destination-over.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.destination-over.png
new file mode 100644
index 0000000..dd04072
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.destination-over.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.lighter.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.lighter.html
new file mode 100644
index 0000000..0ffdcbb
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.lighter.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.solid.lighter</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.solid.lighter</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.solid.lighter.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'lighter';
+ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 255,255,255,255, "50,25", "255,255,255,255", 5);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.lighter.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.lighter.png
new file mode 100644
index 0000000..bf48767
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.lighter.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.source-atop.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.source-atop.html
new file mode 100644
index 0000000..a122e43
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.source-atop.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.solid.source-atop</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.solid.source-atop</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.solid.source-atop.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-atop';
+ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 255,255,0,255, "50,25", "255,255,0,255", 5);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.source-atop.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.source-atop.png
new file mode 100644
index 0000000..fc0883e
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.source-atop.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.source-in.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.source-in.html
new file mode 100644
index 0000000..ae3124f
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.source-in.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.solid.source-in</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.solid.source-in</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.solid.source-in.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-in';
+ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 255,255,0,255, "50,25", "255,255,0,255", 5);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.source-in.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.source-in.png
new file mode 100644
index 0000000..fc0883e
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.source-in.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.source-out.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.source-out.html
new file mode 100644
index 0000000..8ea1679
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.source-out.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.solid.source-out</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.solid.source-out</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.solid.source-out.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-out';
+ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.source-out.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.source-out.png
new file mode 100644
index 0000000..eeedd0f
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.source-out.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.source-over.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.source-over.html
new file mode 100644
index 0000000..e038d55
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.source-over.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.solid.source-over</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.solid.source-over</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.solid.source-over.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-over';
+ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 255,255,0,255, "50,25", "255,255,0,255", 5);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.source-over.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.source-over.png
new file mode 100644
index 0000000..fc0883e
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.source-over.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.xor.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.xor.html
new file mode 100644
index 0000000..a7b4e82
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.xor.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.solid.xor</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.solid.xor</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.solid.xor.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'xor';
+ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.xor.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.xor.png
new file mode 100644
index 0000000..eeedd0f
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.solid.xor.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.copy.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.copy.html
new file mode 100644
index 0000000..ede8885
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.copy.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.transparent.copy</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.transparent.copy</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.transparent.copy.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'copy';
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,255,191, "50,25", "0,0,255,191", 5);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.copy.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.copy.png
new file mode 100644
index 0000000..170e881
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.copy.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.destination-atop.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.destination-atop.html
new file mode 100644
index 0000000..350fe2b
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.destination-atop.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.transparent.destination-atop</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.transparent.destination-atop</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.transparent.destination-atop.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-atop';
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,128,128,191, "50,25", "0,128,128,191", 5);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.destination-atop.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.destination-atop.png
new file mode 100644
index 0000000..57bbf64
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.destination-atop.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.destination-in.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.destination-in.html
new file mode 100644
index 0000000..b2e907d
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.destination-in.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.transparent.destination-in</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.transparent.destination-in</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.transparent.destination-in.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-in';
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,255,0,96, "50,25", "0,255,0,96", 5);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.destination-in.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.destination-in.png
new file mode 100644
index 0000000..c6895de
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.destination-in.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.destination-out.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.destination-out.html
new file mode 100644
index 0000000..aca47b8
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.destination-out.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.transparent.destination-out</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.transparent.destination-out</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.transparent.destination-out.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-out';
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,255,0,32, "50,25", "0,255,0,32", 5);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.destination-out.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.destination-out.png
new file mode 100644
index 0000000..873a9c4
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.destination-out.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.destination-over.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.destination-over.html
new file mode 100644
index 0000000..676278d
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.destination-over.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.transparent.destination-over</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.transparent.destination-over</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.transparent.destination-over.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-over';
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,146,109,223, "50,25", "0,146,109,223", 5);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.destination-over.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.destination-over.png
new file mode 100644
index 0000000..c0f0326
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.destination-over.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.lighter.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.lighter.html
new file mode 100644
index 0000000..9aba34c
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.lighter.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.transparent.lighter</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.transparent.lighter</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.transparent.lighter.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'lighter';
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,128,191,255, "50,25", "0,128,191,255", 5);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.lighter.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.lighter.png
new file mode 100644
index 0000000..bcb8ab4
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.lighter.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.source-atop.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.source-atop.html
new file mode 100644
index 0000000..18229d6
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.source-atop.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.transparent.source-atop</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.transparent.source-atop</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.transparent.source-atop.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-atop';
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,64,191,128, "50,25", "0,64,191,128", 5);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.source-atop.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.source-atop.png
new file mode 100644
index 0000000..e0afff6
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.source-atop.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.source-in.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.source-in.html
new file mode 100644
index 0000000..57124d8
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.source-in.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.transparent.source-in</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.transparent.source-in</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.transparent.source-in.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-in';
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,255,96, "50,25", "0,0,255,96", 5);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.source-in.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.source-in.png
new file mode 100644
index 0000000..1459b5e
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.source-in.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.source-out.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.source-out.html
new file mode 100644
index 0000000..9b4b9d3
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.source-out.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.transparent.source-out</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.transparent.source-out</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.transparent.source-out.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-out';
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,255,96, "50,25", "0,0,255,96", 5);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.source-out.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.source-out.png
new file mode 100644
index 0000000..1459b5e
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.source-out.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.source-over.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.source-over.html
new file mode 100644
index 0000000..6299e8c
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.source-over.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.transparent.source-over</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.transparent.source-over</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.transparent.source-over.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-over';
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,36,219,223, "50,25", "0,36,219,223", 5);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.source-over.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.source-over.png
new file mode 100644
index 0000000..c92cd95
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.source-over.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.xor.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.xor.html
new file mode 100644
index 0000000..b53d140
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.xor.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.transparent.xor</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.transparent.xor</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.transparent.xor.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'xor';
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,64,191,128, "50,25", "0,64,191,128", 5);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.xor.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.xor.png
new file mode 100644
index 0000000..e0afff6
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.transparent.xor.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.fill.copy.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.fill.copy.html
new file mode 100644
index 0000000..966d726
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.fill.copy.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.uncovered.fill.copy</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.uncovered.fill.copy</h1>
+<p class="desc">fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.fill.copy.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'copy';
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
+ctx.translate(0, 25);
+ctx.fillRect(0, 50, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.fill.copy.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.fill.copy.png
new file mode 100644
index 0000000..eeedd0f
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.fill.copy.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.fill.destination-atop.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.fill.destination-atop.html
new file mode 100644
index 0000000..8ffc8db
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.fill.destination-atop.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.uncovered.fill.destination-atop</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.uncovered.fill.destination-atop</h1>
+<p class="desc">fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.fill.destination-atop.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-atop';
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
+ctx.translate(0, 25);
+ctx.fillRect(0, 50, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.fill.destination-atop.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.fill.destination-atop.png
new file mode 100644
index 0000000..eeedd0f
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.fill.destination-atop.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.fill.destination-in.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.fill.destination-in.html
new file mode 100644
index 0000000..040fdf3
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.fill.destination-in.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.uncovered.fill.destination-in</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.uncovered.fill.destination-in</h1>
+<p class="desc">fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.fill.destination-in.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-in';
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
+ctx.translate(0, 25);
+ctx.fillRect(0, 50, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.fill.destination-in.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.fill.destination-in.png
new file mode 100644
index 0000000..eeedd0f
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.fill.destination-in.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.fill.source-in.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.fill.source-in.html
new file mode 100644
index 0000000..4d64f90
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.fill.source-in.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.uncovered.fill.source-in</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.uncovered.fill.source-in</h1>
+<p class="desc">fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.fill.source-in.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-in';
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
+ctx.translate(0, 25);
+ctx.fillRect(0, 50, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.fill.source-in.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.fill.source-in.png
new file mode 100644
index 0000000..eeedd0f
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.fill.source-in.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.fill.source-out.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.fill.source-out.html
new file mode 100644
index 0000000..d1f39ba
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.fill.source-out.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.uncovered.fill.source-out</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.uncovered.fill.source-out</h1>
+<p class="desc">fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.fill.source-out.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-out';
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
+ctx.translate(0, 25);
+ctx.fillRect(0, 50, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.fill.source-out.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.fill.source-out.png
new file mode 100644
index 0000000..eeedd0f
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.fill.source-out.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.image.copy.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.image.copy.html
new file mode 100644
index 0000000..43e070d
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.image.copy.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.uncovered.image.copy</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.uncovered.image.copy</h1>
+<p class="desc">drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.image.copy.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'copy';
+ctx.drawImage(document.getElementById('yellow.png'), 40, 40, 10, 10, 40, 50, 10, 10);
+_assertPixelApprox(canvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+<img src="/images/yellow.png" id="yellow.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.image.copy.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.image.copy.png
new file mode 100644
index 0000000..eeedd0f
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.image.copy.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.image.destination-atop.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.image.destination-atop.html
new file mode 100644
index 0000000..e59e8aa8
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.image.destination-atop.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.uncovered.image.destination-atop</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.uncovered.image.destination-atop</h1>
+<p class="desc">drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.image.destination-atop.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-atop';
+ctx.drawImage(document.getElementById('yellow.png'), 40, 40, 10, 10, 40, 50, 10, 10);
+_assertPixelApprox(canvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+<img src="/images/yellow.png" id="yellow.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.image.destination-atop.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.image.destination-atop.png
new file mode 100644
index 0000000..eeedd0f
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.image.destination-atop.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.image.destination-in.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.image.destination-in.html
new file mode 100644
index 0000000..2872fd2
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.image.destination-in.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.uncovered.image.destination-in</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.uncovered.image.destination-in</h1>
+<p class="desc">drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.image.destination-in.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-in';
+ctx.drawImage(document.getElementById('yellow.png'), 40, 40, 10, 10, 40, 50, 10, 10);
+_assertPixelApprox(canvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+<img src="/images/yellow.png" id="yellow.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.image.destination-in.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.image.destination-in.png
new file mode 100644
index 0000000..eeedd0f
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.image.destination-in.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.image.source-in.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.image.source-in.html
new file mode 100644
index 0000000..234e924
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.image.source-in.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.uncovered.image.source-in</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.uncovered.image.source-in</h1>
+<p class="desc">drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.image.source-in.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-in';
+ctx.drawImage(document.getElementById('yellow.png'), 40, 40, 10, 10, 40, 50, 10, 10);
+_assertPixelApprox(canvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+<img src="/images/yellow.png" id="yellow.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.image.source-in.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.image.source-in.png
new file mode 100644
index 0000000..eeedd0f
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.image.source-in.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.image.source-out.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.image.source-out.html
new file mode 100644
index 0000000..4ab233a
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.image.source-out.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.uncovered.image.source-out</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.uncovered.image.source-out</h1>
+<p class="desc">drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.image.source-out.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-out';
+ctx.drawImage(document.getElementById('yellow.png'), 40, 40, 10, 10, 40, 50, 10, 10);
+_assertPixelApprox(canvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+<img src="/images/yellow.png" id="yellow.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.image.source-out.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.image.source-out.png
new file mode 100644
index 0000000..eeedd0f
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.image.source-out.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.nocontext.copy.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.nocontext.copy.html
new file mode 100644
index 0000000..68a9366
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.nocontext.copy.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.uncovered.nocontext.copy</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.uncovered.nocontext.copy</h1>
+<p class="desc">drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.nocontext.copy.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged.");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'copy';
+var canvas2 = document.createElement('canvas');
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.nocontext.copy.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.nocontext.copy.png
new file mode 100644
index 0000000..eeedd0f
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.nocontext.copy.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.nocontext.destination-atop.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.nocontext.destination-atop.html
new file mode 100644
index 0000000..ad11e21
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.nocontext.destination-atop.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.uncovered.nocontext.destination-atop</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.uncovered.nocontext.destination-atop</h1>
+<p class="desc">drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.nocontext.destination-atop.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged.");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-atop';
+var canvas2 = document.createElement('canvas');
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.nocontext.destination-atop.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.nocontext.destination-atop.png
new file mode 100644
index 0000000..eeedd0f
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.nocontext.destination-atop.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.nocontext.destination-in.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.nocontext.destination-in.html
new file mode 100644
index 0000000..0412a7a
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.nocontext.destination-in.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.uncovered.nocontext.destination-in</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.uncovered.nocontext.destination-in</h1>
+<p class="desc">drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.nocontext.destination-in.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged.");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-in';
+var canvas2 = document.createElement('canvas');
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.nocontext.destination-in.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.nocontext.destination-in.png
new file mode 100644
index 0000000..eeedd0f
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.nocontext.destination-in.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.nocontext.source-in.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.nocontext.source-in.html
new file mode 100644
index 0000000..d613663
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.nocontext.source-in.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.uncovered.nocontext.source-in</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.uncovered.nocontext.source-in</h1>
+<p class="desc">drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.nocontext.source-in.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged.");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-in';
+var canvas2 = document.createElement('canvas');
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.nocontext.source-in.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.nocontext.source-in.png
new file mode 100644
index 0000000..eeedd0f
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.nocontext.source-in.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.nocontext.source-out.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.nocontext.source-out.html
new file mode 100644
index 0000000..be5d6bf
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.nocontext.source-out.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.uncovered.nocontext.source-out</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.uncovered.nocontext.source-out</h1>
+<p class="desc">drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.nocontext.source-out.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged.");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-out';
+var canvas2 = document.createElement('canvas');
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.nocontext.source-out.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.nocontext.source-out.png
new file mode 100644
index 0000000..eeedd0f
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.nocontext.source-out.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.pattern.copy.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.pattern.copy.html
new file mode 100644
index 0000000..8c38388
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.pattern.copy.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.uncovered.pattern.copy</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.uncovered.pattern.copy</h1>
+<p class="desc">Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.pattern.copy.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'copy';
+ctx.fillStyle = ctx.createPattern(document.getElementById('yellow.png'), 'no-repeat');
+ctx.fillRect(0, 50, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+<img src="/images/yellow.png" id="yellow.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.pattern.copy.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.pattern.copy.png
new file mode 100644
index 0000000..eeedd0f
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.pattern.copy.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.pattern.destination-atop.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.pattern.destination-atop.html
new file mode 100644
index 0000000..7ad35f4
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.pattern.destination-atop.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.uncovered.pattern.destination-atop</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.uncovered.pattern.destination-atop</h1>
+<p class="desc">Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.pattern.destination-atop.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-atop';
+ctx.fillStyle = ctx.createPattern(document.getElementById('yellow.png'), 'no-repeat');
+ctx.fillRect(0, 50, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+<img src="/images/yellow.png" id="yellow.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.pattern.destination-atop.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.pattern.destination-atop.png
new file mode 100644
index 0000000..eeedd0f
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.pattern.destination-atop.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.pattern.destination-in.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.pattern.destination-in.html
new file mode 100644
index 0000000..085851c
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.pattern.destination-in.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.uncovered.pattern.destination-in</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.uncovered.pattern.destination-in</h1>
+<p class="desc">Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.pattern.destination-in.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-in';
+ctx.fillStyle = ctx.createPattern(document.getElementById('yellow.png'), 'no-repeat');
+ctx.fillRect(0, 50, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+<img src="/images/yellow.png" id="yellow.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.pattern.destination-in.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.pattern.destination-in.png
new file mode 100644
index 0000000..eeedd0f
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.pattern.destination-in.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.pattern.source-in.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.pattern.source-in.html
new file mode 100644
index 0000000..7e0b879
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.pattern.source-in.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.uncovered.pattern.source-in</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.uncovered.pattern.source-in</h1>
+<p class="desc">Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.pattern.source-in.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-in';
+ctx.fillStyle = ctx.createPattern(document.getElementById('yellow.png'), 'no-repeat');
+ctx.fillRect(0, 50, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+<img src="/images/yellow.png" id="yellow.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.pattern.source-in.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.pattern.source-in.png
new file mode 100644
index 0000000..eeedd0f
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.pattern.source-in.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.pattern.source-out.html b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.pattern.source-out.html
new file mode 100644
index 0000000..0d34f69
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.pattern.source-out.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.composite.uncovered.pattern.source-out</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.composite.uncovered.pattern.source-out</h1>
+<p class="desc">Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.pattern.source-out.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.");
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-out';
+ctx.fillStyle = ctx.createPattern(document.getElementById('yellow.png'), 'no-repeat');
+ctx.fillRect(0, 50, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+<img src="/images/yellow.png" id="yellow.png" class="resource">
+
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.pattern.source-out.png b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.pattern.source-out.png
new file mode 100644
index 0000000..eeedd0f
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/2d.composite.uncovered.pattern.source-out.png
Binary files differ
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/canvas_compositing_globalcompositeoperation_001-ref.htm b/src/third_party/web_platform_tests/2dcontext/compositing/canvas_compositing_globalcompositeoperation_001-ref.htm
new file mode 100644
index 0000000..70196fb
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/canvas_compositing_globalcompositeoperation_001-ref.htm
@@ -0,0 +1,11 @@
+<!doctype HTML>
+<html>
+    <head>
+        <title>HTML5 Canvas Test:  globalCompositeOperation "destination-over"</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com" />
+    </head>
+    <body>
+        <p>Description: If the globalCompositeOperation is set to "destination-over", display the destination image wherever the destination image is opaque.</p>
+        <div><img alt='black rectangle' src="/images/black-rectangle.png"></div>
+    </body>
+</html>
diff --git a/src/third_party/web_platform_tests/2dcontext/compositing/canvas_compositing_globalcompositeoperation_001.htm b/src/third_party/web_platform_tests/2dcontext/compositing/canvas_compositing_globalcompositeoperation_001.htm
new file mode 100644
index 0000000..8d6208e
--- /dev/null
+++ b/src/third_party/web_platform_tests/2dcontext/compositing/canvas_compositing_globalcompositeoperation_001.htm
@@ -0,0 +1,32 @@
+<!doctype HTML>
+<html>
+    <head>
+        <title>HTML5 Canvas Test:  globalCompositeOperation "destination-over"</title>
+        <link rel="match" href="canvas_compositing_globalcompositeoperation_001-ref.htm">
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com" />
+        <link rel="help" href="http://www.w3.org/TR/2dcontext/#dom-context-2d-globalcompositeoperation" />
+        <meta name="assert" content="If the globalCompositeOperation is set to 'destination-over', display the destination image wherever the destination image is opaque." />
+        <script type="text/javascript">
+            function runTest()
+            {
+                var canvas = document.getElementById("canvas1");
+                var ctx = canvas.getContext("2d");
+
+                // Source image.
+                ctx.fillStyle = "rgba(0, 0, 0, 1.0)";
+                ctx.fillRect(0, 0, 100, 50);
+
+                // Assign the globalCompositeOperation.
+                ctx.globalCompositeOperation = "destination-over";
+
+                // Destination image.
+                ctx.fillStyle = "rgba(255, 0, 0, 1.0)";
+                ctx.fillRect(0, 0, 100, 50);
+            }
+        </script>
+    </head>
+    <body onload="runTest()">
+        <p>Description: If the globalCompositeOperation is set to "destination-over", display the destination image wherever the destination image is opaque.</p>
+        <canvas id="canvas1" width="300" height="150">Browser does not support HTML5 Canvas.</canvas>
+    </body>
+</html>