mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 492186 - Crash with altGlyphDef and getBBox. r=roc
This commit is contained in:
parent
7b3cd99d48
commit
52302767f0
@ -272,8 +272,11 @@ nsSVGDisplayContainerFrame::GetBBoxContribution(const gfxMatrix &aToBBoxUserspac
|
||||
gfxMatrix transform = aToBBoxUserspace;
|
||||
// nsSVGGlyphFrame's mContent is a nsTextNode!
|
||||
if (kid->GetType() != nsGkAtoms::svgGlyphFrame) {
|
||||
transform = static_cast<nsSVGElement*>(kid->GetContent())->
|
||||
PrependLocalTransformTo(aToBBoxUserspace);
|
||||
nsIContent *content = kid->GetContent();
|
||||
if (content->IsNodeOfType(nsINode::eSVG)) {
|
||||
transform = static_cast<nsSVGElement*>(content)->
|
||||
PrependLocalTransformTo(aToBBoxUserspace);
|
||||
}
|
||||
}
|
||||
bboxUnion = bboxUnion.Union(svgKid->GetBBoxContribution(transform));
|
||||
}
|
||||
|
@ -189,8 +189,12 @@ nsSVGSwitchFrame::GetBBoxContribution(const gfxMatrix &aToBBoxUserspace)
|
||||
nsIFrame* kid = GetActiveChildFrame();
|
||||
nsISVGChildFrame* svgKid = do_QueryFrame(kid);
|
||||
if (svgKid) {
|
||||
gfxMatrix transform = static_cast<nsSVGElement*>(kid->GetContent())->
|
||||
PrependLocalTransformTo(aToBBoxUserspace);
|
||||
nsIContent *content = kid->GetContent();
|
||||
gfxMatrix transform = aToBBoxUserspace;
|
||||
if (content->IsNodeOfType(nsINode::eSVG)) {
|
||||
transform = static_cast<nsSVGElement*>(content)->
|
||||
PrependLocalTransformTo(aToBBoxUserspace);
|
||||
}
|
||||
return svgKid->GetBBoxContribution(transform);
|
||||
}
|
||||
return gfxRect(0.0, 0.0, 0.0, 0.0);
|
||||
|
6
layout/svg/crashtests/492186-1.svg
Normal file
6
layout/svg/crashtests/492186-1.svg
Normal file
@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<altGlyphDef/>
|
||||
<script xmlns="http://www.w3.org/1999/xhtml">
|
||||
document.documentElement.getBBox();
|
||||
</script>
|
||||
</svg>
|
After Width: | Height: | Size: 155 B |
@ -73,4 +73,5 @@ load 472782-1.svg
|
||||
load 475181-1.svg
|
||||
load 475193-1.html
|
||||
load 478128-1.svg
|
||||
load 492186-1.svg
|
||||
load extref-test-1.xhtml
|
||||
|
Loading…
Reference in New Issue
Block a user