mirror of
https://github.com/servo/servo.git
synced 2025-08-08 06:55:31 +01:00
Update web-platform-tests to revision 256b4685b8e702c14ed854347f23f4979edbfc8e
This commit is contained in:
parent
bac9903fbe
commit
45c91aa0cb
134 changed files with 1297 additions and 426 deletions
|
@ -28,13 +28,12 @@ function drawCanvas(canvasID, color, width) {
|
|||
var canvas = document.getElementById(canvasID);
|
||||
var context = canvas.getContext("2d", {alpha: true});
|
||||
context.clearRect(0, 0, canvas.width, canvas.height);
|
||||
context.strokeStyle = color;
|
||||
context.lineWidth = width;
|
||||
context.strokeRect(40, 40, 120, 120);
|
||||
context.fillStyle = color;
|
||||
context.fillRect(40, 40, width, width);
|
||||
};
|
||||
|
||||
drawCanvas('box-1', 'rgb(50, 100, 150)', '5px');
|
||||
drawCanvas('box-2', 'rgb(150, 100, 50)', '10px');
|
||||
drawCanvas('box-1', 'rgb(50, 100, 150)', '50px');
|
||||
drawCanvas('box-2', 'rgb(150, 100, 50)', '100px');
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue