mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1212954 - Make BaseSize::IsEmpty return true for negative sizes to avoid NS_ERROR in VectorImage::GetFrameAtSize when root svg doesn't have intrinsic width or height. r=roc
This commit is contained in:
parent
64ef92adbe
commit
9524cbb750
@ -27,7 +27,7 @@ struct BaseSize {
|
||||
void SizeTo(T aWidth, T aHeight) { width = aWidth; height = aHeight; }
|
||||
|
||||
bool IsEmpty() const {
|
||||
return width == 0 || height == 0;
|
||||
return width <= 0 || height <= 0;
|
||||
}
|
||||
|
||||
bool IsSquare() const {
|
||||
|
16
image/test/crashtests/1212954-1.svg
Normal file
16
image/test/crashtests/1212954-1.svg
Normal file
@ -0,0 +1,16 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
|
||||
<defs>
|
||||
<filter id="f">
|
||||
<!-- the image data is
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="-5" height="1%" />
|
||||
-->
|
||||
<feImage xlink:href="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSItNSIgaGVpZ2h0
|
||||
PSIxJSIgLz4K" />
|
||||
</filter>
|
||||
</defs>
|
||||
|
||||
<rect width="1" height="1" filter="url(#f)" />
|
||||
|
||||
</svg>
|
After Width: | Height: | Size: 464 B |
@ -54,6 +54,7 @@ load invalid-disposal-method-2.gif
|
||||
load invalid-disposal-method-3.gif
|
||||
|
||||
load 1205923-1.html
|
||||
load 1212954-1.svg
|
||||
|
||||
# Ensure we handle ICO directory entries which specify the wrong size for the
|
||||
# contained resource.
|
||||
|
Loading…
Reference in New Issue
Block a user