summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/WebKit/LayoutTests')
-rw-r--r--third_party/WebKit/LayoutTests/fast/canvas/canvas-filter-width-height-expected.html7
-rw-r--r--third_party/WebKit/LayoutTests/fast/canvas/canvas-filter-width-height.html17
2 files changed, 24 insertions, 0 deletions
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-filter-width-height-expected.html b/third_party/WebKit/LayoutTests/fast/canvas/canvas-filter-width-height-expected.html
new file mode 100644
index 0000000..0e23e3f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-filter-width-height-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, 50, 40);
+</script>
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-filter-width-height.html b/third_party/WebKit/LayoutTests/fast/canvas/canvas-filter-width-height.html
new file mode 100644
index 0000000..1185895
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-filter-width-height.html
@@ -0,0 +1,17 @@
+<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>
+<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>