mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 17:55:50 +00:00
90d2624508
If the canvas is cleared by setting the width or height attributes, its opaqueness should not be affected. This patch keeps support for moz-opaque, and also keeps the behavior that changing the moz-opaque attribute clears the canvas, even if this does not affect the actual opaqueness of the canvas. MozReview-Commit-ID: LOlsJxiP9kc --HG-- extra : rebase_source : 8bb95b1d5932c39a8085e007f9fd1b88b97afe55
17 lines
398 B
HTML
17 lines
398 B
HTML
<!DOCTYPE html>
|
|
<meta charset="utf-8">
|
|
<title>Bug 1219985: Basic rendering into a non-alpha canvas</title>
|
|
|
|
<div style="width: 200px; height: 200px; background-color: red;">
|
|
<canvas id="c" width="200" height="200"></canvas>
|
|
</div>
|
|
|
|
<script>
|
|
|
|
var c = document.getElementById('c');
|
|
var ctx = c.getContext('2d', { alpha: false });
|
|
ctx.fillStyle = 'green';
|
|
ctx.fillRect(50, 50, 100, 100);
|
|
|
|
</script>
|