Revert "Create canvasFilter class and interface"
This reverts commit 5d00b2d8b1b3a3431ce093a990524a8b25a2bcac.
Reason for revert: This CL is likely to be the culprit for components_browsertests failures in Linux ChromiumOS MSan Tests and Linux MSan Tests. First occurance: https://ci.chromium.org/p/chromium/builders/ci/Linux%20ChromiumOS%20MSan%20Tests/22898 and https://ci.chromium.org/p/chromium/builders/ci/Linux%20MSan%20Tests/27784
Original change's description:
> Create canvasFilter class and interface
>
> Create a "mongo-db" like interface for filters. Implement blur, but only
> blur.
>
> Bug: 1169216
> Change-Id: I0dc045fa70f0d1e443cf4f8ff53632056cca6924
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2741994
> Reviewed-by: Aaron Krajeski <aaronhk@chromium.org>
> Reviewed-by: Fernando Serboncini <fserb@chromium.org>
> Reviewed-by: Jeremy Roman <jbroman@chromium.org>
> Reviewed-by: Xida Chen <xidachen@chromium.org>
> Reviewed-by: Juanmi Huertas <juanmihd@chromium.org>
> Reviewed-by: Yi Xu <yiyix@chromium.org>
> Commit-Queue: Aaron Krajeski <aaronhk@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#864863}
Bug: 1169216
Change-Id: Idf7ca4cea8ef38a33f89460558482e5f10a64c4f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2775779
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Maggie Cai <mxcai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#865034}
diff --git a/html/canvas/element/manual/filters/canvas-filter-object-blur-expected.html b/html/canvas/element/manual/filters/canvas-filter-object-blur-expected.html
deleted file mode 100644
index ae8911b..0000000
--- a/html/canvas/element/manual/filters/canvas-filter-object-blur-expected.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<body>
- <canvas id="canvas" width="300" height="300"></canvas>
-</body>
-<script>
- var canvas = document.getElementById('canvas');
- var ctx = canvas.getContext('2d');
- ctx.filter = 'blur(2px)';
- ctx.fillStyle = 'yellow';
- ctx.fillRect(10,10,100,100);
- ctx.filter = 'blur(5px)';
- ctx.fillStyle = 'magenta';
- ctx.fillRect(120, 10, 100, 100);
- ctx.filter = 'blur(5px) blur(10px)';
- ctx.fillStyle = 'cyan';
- ctx.fillRect(10, 120, 100, 100);
- ctx.filter = 'none';
- ctx.fillStyle = 'black';
- ctx.fillRect(120, 120, 100, 100);
-</script>
diff --git a/html/canvas/element/manual/filters/canvas-filter-object-blur.html b/html/canvas/element/manual/filters/canvas-filter-object-blur.html
deleted file mode 100644
index b95712b..0000000
--- a/html/canvas/element/manual/filters/canvas-filter-object-blur.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<head>
- <link rel="match" href="canvas-filter-object-blur-expected.html">
-</head>
-<body>
- <canvas id="canvas" width="300" height="300"></canvas>
-</body>
-<script>
- var canvas = document.getElementById('canvas');
- var ctx = canvas.getContext('2d');
- ctx.filter = new CanvasFilter({blur: {stdDeviation: 2}});
- ctx.fillStyle = 'yellow';
- ctx.fillRect(10,10,100,100);
- ctx.filter = new CanvasFilter({blur: {stdDeviation: 5}});
- ctx.fillStyle = 'magenta';
- ctx.fillRect(120, 10, 100, 100);
- ctx.filter = new CanvasFilter([{
- blur: {stdDeviation: 5}}, {blur: {stdDeviation: 10}}]);
- ctx.fillStyle = 'cyan';
- ctx.fillRect(10, 120, 100, 100);
- ctx.filter = 'none';
- ctx.fillStyle = 'black';
- ctx.fillRect(120, 120, 100, 100);
-</script>
diff --git a/html/canvas/element/shadows/2d.shadow.canvasfilter.blur.object.exceptions.html b/html/canvas/element/shadows/2d.shadow.canvasfilter.blur.object.exceptions.html
deleted file mode 100644
index 3605d40..0000000
--- a/html/canvas/element/shadows/2d.shadow.canvasfilter.blur.object.exceptions.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE html>
-<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
-<title>Canvas test: 2d.shadow.canvasfilter.blur.object.exceptions</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/html/canvas/resources/canvas-tests.js"></script>
-<link rel="stylesheet" href="/html/canvas/resources/canvas-tests.css">
-<body class="show_output">
-
-<h1>2d.shadow.canvasfilter.blur.object.exceptions</h1>
-<p class="desc">Test exceptions on CanvasFilter() blur.object</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("Test exceptions on CanvasFilter() blur.object");
-_addTest(function(canvas, ctx) {
-
-assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({blur: null}); });
-assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({blur: {}}); });
-assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({blur: {stdDevation: null}}); });
-assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({blur: {stdDeviation: "foo"}}); });
-
-
-});
-</script>
-
diff --git a/html/canvas/element/shadows/2d.shadow.canvasfilter.object.html b/html/canvas/element/shadows/2d.shadow.canvasfilter.object.html
deleted file mode 100644
index 093bf7e..0000000
--- a/html/canvas/element/shadows/2d.shadow.canvasfilter.object.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE html>
-<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
-<title>Canvas test: 2d.shadow.canvasfilter.object</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/html/canvas/resources/canvas-tests.js"></script>
-<link rel="stylesheet" href="/html/canvas/resources/canvas-tests.css">
-<body class="show_output">
-
-<h1>2d.shadow.canvasfilter.object</h1>
-<p class="desc">Test CanvasFilter() object</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("Test CanvasFilter() object");
-_addTest(function(canvas, ctx) {
-
-_assert(ctx.filter == 'none', "ctx.filter == 'none'");
-ctx.filter = 'blur(5px)';
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-ctx.filter = new CanvasFilter({blur: {stdDeviation: 5}});
-_assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'");
-ctx.filter = new CanvasFilter([{blur: {stdDeviation: 5}}, {blur: {stdDeviation: 10}}]);
-_assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'");
-var canvas2 = document.createElement('canvas');
-var ctx2 = canvas2.getContext('2d');
-ctx2.filter = ctx.filter;
-_assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'");
-ctx.filter = 'blur(5px)';
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-ctx.filter = 'none';
-_assert(ctx.filter == 'none', "ctx.filter == 'none'");
-ctx.filter = new CanvasFilter({blur: {stdDeviation: 5}});
-ctx.filter = "this string is not a filter and should do nothing";
-_assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'");
-
-
-});
-</script>
-
diff --git a/html/canvas/tools/yaml/element/shadows.yaml b/html/canvas/tools/yaml/element/shadows.yaml
index 5459033..284047c 100644
--- a/html/canvas/tools/yaml/element/shadows.yaml
+++ b/html/canvas/tools/yaml/element/shadows.yaml
@@ -1149,6 +1149,11 @@
@assert pixel 50,25 ==~ 0,255,0,255;
expected: green
+
+
+
+
+
- name: 2d.shadow.filter.value
desc: test if ctx.filter works correctly
testing:
@@ -1185,36 +1190,3 @@
ctx.filter = 'blur( 5px)';
assert_equals(ctx.filter, 'blur( 5px)');
-- name: 2d.shadow.canvasfilter.object
- desc: Test CanvasFilter() object
- testing:
- - 2d.shadow.canvasfilter.object
- code: |
- @assert ctx.filter == 'none';
- ctx.filter = 'blur(5px)';
- @assert ctx.filter == 'blur(5px)';
- ctx.filter = new CanvasFilter({blur: {stdDeviation: 5}});
- @assert ctx.filter.toString() == '[object CanvasFilter]';
- ctx.filter = new CanvasFilter([{blur: {stdDeviation: 5}}, {blur: {stdDeviation: 10}}]);
- @assert ctx.filter.toString() == '[object CanvasFilter]';
- var canvas2 = document.createElement('canvas');
- var ctx2 = canvas2.getContext('2d');
- ctx2.filter = ctx.filter;
- @assert ctx.filter.toString() == '[object CanvasFilter]';
- ctx.filter = 'blur(5px)';
- @assert ctx.filter == 'blur(5px)';
- ctx.filter = 'none';
- @assert ctx.filter == 'none';
- ctx.filter = new CanvasFilter({blur: {stdDeviation: 5}});
- ctx.filter = "this string is not a filter and should do nothing";
- @assert ctx.filter.toString() == '[object CanvasFilter]';
-
-- name: 2d.shadow.canvasfilter.blur.object.exceptions
- desc: Test exceptions on CanvasFilter() blur.object
- testing:
- - 2d.shadow.canvasfilter.blur.object.exceptions
- code: |
- @assert throws TypeError ctx.filter = new CanvasFilter({blur: null});
- @assert throws TypeError ctx.filter = new CanvasFilter({blur: {}});
- @assert throws TypeError ctx.filter = new CanvasFilter({blur: {stdDevation: null}});
- @assert throws TypeError ctx.filter = new CanvasFilter({blur: {stdDeviation: "foo"}});