mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-10 21:28:04 +02:00
Automatic update from web-platform-tests [PW] Implement setTransform with DOMMatrix Right now the PaintRenderingContext2D::setTransform that takes a DOMMatrix would crash because it is NOTREACHED(). This CL implements that and add a layout test. Bug: 1029362 Change-Id: I1038dbe1bfcee14e128c46f73606fabcf3923caf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1951566 Commit-Queue: Xida Chen <xidachen@chromium.org> Reviewed-by: Yi Gu <yigu@chromium.org> Cr-Commit-Position: refs/heads/master@{#723549} -- wpt-commits: 93281ec5a4c254d472eaaa988fb3859877a6ae13 wpt-pr: 20710
15 lines
303 B
HTML
15 lines
303 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<body>
|
|
<canvas id ="canvas" width="200" height="200"></canvas>
|
|
<script>
|
|
var ctx = document.getElementById('canvas').getContext('2d');
|
|
ctx.fillStyle = 'green';
|
|
let m = ctx.getTransform();
|
|
m.a = 2;
|
|
m.d = 2;
|
|
ctx.setTransform(m);
|
|
ctx.fillRect(0, 0, 50, 50);
|
|
</script>
|
|
</body>
|
|
</html>
|