mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 566216. Our parent could be a document fragment. r=dholbert
This commit is contained in:
parent
2e8a7ea60e
commit
ae06132e92
@ -256,7 +256,7 @@ nsSVGUtils::GetParentElement(nsIContent *aContent)
|
||||
|
||||
// otherewise use the explicit one, whether it's null or not...
|
||||
nsIContent* parent = aContent->GetParent();
|
||||
return parent ? parent->AsElement() : nsnull;
|
||||
return parent && parent->IsElement() ? parent->AsElement() : nsnull;
|
||||
}
|
||||
|
||||
float
|
||||
|
19
layout/svg/crashtests/566216-1.svg
Normal file
19
layout/svg/crashtests/566216-1.svg
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg"><animate id="y"/><script>
|
||||
<![CDATA[
|
||||
|
||||
function boom()
|
||||
{
|
||||
var r = document.createRange();
|
||||
r.setEnd(document.getElementById('y'), 0);
|
||||
r.extractContents();
|
||||
}
|
||||
|
||||
window.addEventListener("load", boom, false);
|
||||
|
||||
]]>
|
||||
</script>
|
||||
</svg>
|
||||
|
||||
|
After Width: | Height: | Size: 293 B |
@ -84,3 +84,4 @@ load 522394-1.svg
|
||||
load 522394-2.svg
|
||||
load 522394-3.svg
|
||||
load extref-test-1.xhtml
|
||||
load 566216-1.svg
|
||||
|
Loading…
Reference in New Issue
Block a user