mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-13 20:14:57 -10: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 <[email protected]> Reviewed-by: Yi Gu <[email protected]> Cr-Commit-Position: refs/heads/master@{#723549} -- wpt-commits: 93281ec5a4c254d472eaaa988fb3859877a6ae13 wpt-pr: 20710
16 lines
303 B
HTML
16 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>
|