summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/canvas
diff options
context:
space:
mode:
authorajuma <ajuma@chromium.org>2016-01-22 09:57:36 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-22 17:58:29 +0000
commitcd8e75689cfa58f46d7059e6d3f17549d0fcc0a7 (patch)
tree9498d36d24bd8ce64d1dada949166c014ecf93dc /third_party/WebKit/LayoutTests/fast/canvas
parent53875e51aa316040e67df2a7607ed97fc39e598e (diff)
downloadchromium_src-cd8e75689cfa58f46d7059e6d3f17549d0fcc0a7.zip
chromium_src-cd8e75689cfa58f46d7059e6d3f17549d0fcc0a7.tar.gz
chromium_src-cd8e75689cfa58f46d7059e6d3f17549d0fcc0a7.tar.bz2
Fix assertion failure in CanvasRenderingContext2D::compositedDraw
When a canvas has a filter but that filter is undefined (either because it refers to a non-existent filter, or because that filter is defined later), compositedDraw shouldn't be called. Review URL: https://codereview.chromium.org/1606363002 Cr-Commit-Position: refs/heads/master@{#370994}
Diffstat (limited to 'third_party/WebKit/LayoutTests/fast/canvas')
-rw-r--r--third_party/WebKit/LayoutTests/fast/canvas/canvas-filter-undefined-expected.html7
-rw-r--r--third_party/WebKit/LayoutTests/fast/canvas/canvas-filter-undefined-then-defined-expected.html9
-rw-r--r--third_party/WebKit/LayoutTests/fast/canvas/canvas-filter-undefined-then-defined.html22
-rw-r--r--third_party/WebKit/LayoutTests/fast/canvas/canvas-filter-undefined.html8
4 files changed, 46 insertions, 0 deletions
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-filter-undefined-expected.html b/third_party/WebKit/LayoutTests/fast/canvas/canvas-filter-undefined-expected.html
new file mode 100644
index 0000000..96e369d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-filter-undefined-expected.html
@@ -0,0 +1,7 @@
+<canvas id="canvas" width="100" height="100"></canvas>
+<script>
+var canvas = document.getElementById('canvas');
+var ctx = canvas.getContext('2d');
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 90, 90);
+</script>
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-filter-undefined-then-defined-expected.html b/third_party/WebKit/LayoutTests/fast/canvas/canvas-filter-undefined-then-defined-expected.html
new file mode 100644
index 0000000..4bd1b58
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-filter-undefined-then-defined-expected.html
@@ -0,0 +1,9 @@
+<canvas id="canvas" width="100" height="100"></canvas>
+<script>
+var canvas = document.getElementById('canvas');
+var ctx = canvas.getContext('2d');
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 90, 90);
+ctx.fillStyle = '#00f';
+ctx.fillRect(0, 0, 50, 40);
+</script>
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-filter-undefined-then-defined.html b/third_party/WebKit/LayoutTests/fast/canvas/canvas-filter-undefined-then-defined.html
new file mode 100644
index 0000000..bbf264d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-filter-undefined-then-defined.html
@@ -0,0 +1,22 @@
+<canvas id="canvas" width="100" height="100"></canvas>
+<script>
+var canvas = document.getElementById('canvas');
+var ctx = canvas.getContext('2d');
+ctx.filter = 'url(#crop)';
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 90, 90);
+</script>
+<svg style="display: block; width: 0; height: 0">
+ <defs>
+ <filter id="crop" primitiveUnits="objectBoundingBox">
+ <femerge x="0" y="0" width="50%" height="40%">
+ <femergenode in="SourceGraphic"></femergenode>
+ </femerge>
+ </filter>
+ </defs>
+</svg>
+<script>
+ctx.filter = 'url(#crop)';
+ctx.fillStyle = '#00f';
+ctx.fillRect(0, 0, 90, 90);
+</script>
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-filter-undefined.html b/third_party/WebKit/LayoutTests/fast/canvas/canvas-filter-undefined.html
new file mode 100644
index 0000000..b343ade
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-filter-undefined.html
@@ -0,0 +1,8 @@
+<canvas id="canvas" width="100" height="100"></canvas>
+<script>
+var canvas = document.getElementById('canvas');
+var ctx = canvas.getContext('2d');
+ctx.filter = 'url(#nonexistent)';
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 90, 90);
+</script>