mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 722003 - Fix crash calling getClientRects on non-rendered foreignObject. r=roc
This commit is contained in:
parent
47f54cc3f1
commit
0ae44350a8
@ -294,6 +294,10 @@ nsSVGForeignObjectFrame::GetTransformMatrix(nsIFrame* aAncestor,
|
||||
*aOutAncestor = nsSVGUtils::GetOuterSVGFrame(this);
|
||||
NS_ASSERTION(*aOutAncestor, "How did we end up without an outer frame?");
|
||||
|
||||
if (GetStateBits() & NS_STATE_SVG_NONDISPLAY_CHILD) {
|
||||
return gfx3DMatrix::From2D(gfxMatrix(0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
|
||||
}
|
||||
|
||||
/* Return the matrix back to the root, factoring in the x and y offsets. */
|
||||
return gfx3DMatrix::From2D(GetCanvasTMForChildren());
|
||||
}
|
||||
|
13
layout/svg/crashtests/722003-1.svg
Normal file
13
layout/svg/crashtests/722003-1.svg
Normal file
@ -0,0 +1,13 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
|
||||
<marker><foreignObject><span id="x" xmlns="http://www.w3.org/1999/xhtml"></span></foreignObject></marker>
|
||||
|
||||
<script>
|
||||
|
||||
window.addEventListener("load", function() {
|
||||
document.getElementById("x").getClientRects();
|
||||
}, false);
|
||||
|
||||
</script>
|
||||
|
||||
</svg>
|
After Width: | Height: | Size: 283 B |
@ -122,3 +122,4 @@ load 693424-1.svg
|
||||
load 709920-1.svg
|
||||
load 709920-2.svg
|
||||
load 713413-1.svg
|
||||
load 722003-1.svg
|
||||
|
Loading…
Reference in New Issue
Block a user