mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 916128: Force canvas element size to >= 1 to match the behavior in the contexts. r=bas
This commit is contained in:
parent
207e44d021
commit
c9b14bf386
@ -154,12 +154,18 @@ HTMLCanvasElement::GetWidthHeight()
|
||||
value->Type() == nsAttrValue::eInteger)
|
||||
{
|
||||
size.width = value->GetIntegerValue();
|
||||
if (size.width <= 0) {
|
||||
size.width = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if ((value = GetParsedAttr(nsGkAtoms::height)) &&
|
||||
value->Type() == nsAttrValue::eInteger)
|
||||
{
|
||||
size.height = value->GetIntegerValue();
|
||||
if (size.height <= 0) {
|
||||
size.height = 1;
|
||||
}
|
||||
}
|
||||
|
||||
return size;
|
||||
|
Loading…
Reference in New Issue
Block a user