mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 798802 - Fix layer uninitialised in nsHTMLCanvasElement::InvalidateCanvasContent(). r=mattwoodrow
This commit is contained in:
parent
3cdb713c07
commit
cc38702572
18
content/html/content/crashtests/798802-1.html
Normal file
18
content/html/content/crashtests/798802-1.html
Normal file
@ -0,0 +1,18 @@
|
||||
<html>
|
||||
<head>
|
||||
<script>
|
||||
onload = function() {
|
||||
var canvas2d = document.createElement('canvas')
|
||||
canvas2d.setAttribute('width', 0)
|
||||
document.body.appendChild(canvas2d)
|
||||
var ctx2d = canvas2d.getContext('2d')
|
||||
ctx2d.fillStyle = 'black'
|
||||
var gl = document.createElement('canvas').getContext('experimental-webgl')
|
||||
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, canvas2d)
|
||||
ctx2d.fillRect(0, 0, 1, 1)
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
@ -41,3 +41,4 @@ load 795221-2.html
|
||||
load 795221-3.html
|
||||
load 795221-4.html
|
||||
load 795221-5.xml
|
||||
load 798802-1.html
|
||||
|
@ -836,7 +836,7 @@ nsHTMLCanvasElement::InvalidateCanvasContent(const gfxRect* damageRect)
|
||||
|
||||
frame->MarkLayersActive(nsChangeHint(0));
|
||||
|
||||
Layer* layer;
|
||||
Layer* layer = nullptr;
|
||||
if (damageRect) {
|
||||
nsIntSize size = GetWidthHeight();
|
||||
if (size.width != 0 && size.height != 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user