From 843ab7ff70f52733af509c3784147bc9c697b42a Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Fri, 25 Mar 2005 04:25:30 +0000 Subject: [PATCH] Fix up SVG frames that never call nsFrame::Init to still notify their content that it now has a frame. Bug 287424, r=tor --- layout/svg/base/src/nsSVGGlyphFrame.cpp | 4 ++++ layout/svg/base/src/nsSVGPathGeometryFrame.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/layout/svg/base/src/nsSVGGlyphFrame.cpp b/layout/svg/base/src/nsSVGGlyphFrame.cpp index b6bb7e5098f..bafa4a832af 100644 --- a/layout/svg/base/src/nsSVGGlyphFrame.cpp +++ b/layout/svg/base/src/nsSVGGlyphFrame.cpp @@ -256,6 +256,10 @@ nsSVGGlyphFrame::Init(nsPresContext* aPresContext, NS_IF_ADDREF(mContent); mParent = aParent; + if (mContent) { + mContent->SetMayHaveFrame(PR_TRUE); + } + // construct our glyphmetrics & glyphgeometry objects: nsISVGOuterSVGFrame* outerSVGFrame = GetOuterSVGFrame(); if (!outerSVGFrame) { diff --git a/layout/svg/base/src/nsSVGPathGeometryFrame.cpp b/layout/svg/base/src/nsSVGPathGeometryFrame.cpp index bc3f18cf875..0e874543fb4 100644 --- a/layout/svg/base/src/nsSVGPathGeometryFrame.cpp +++ b/layout/svg/base/src/nsSVGPathGeometryFrame.cpp @@ -117,6 +117,10 @@ nsSVGPathGeometryFrame::Init(nsPresContext* aPresContext, NS_IF_ADDREF(mContent); mParent = aParent; + if (mContent) { + mContent->SetMayHaveFrame(PR_TRUE); + } + Init(); SetStyleContext(aPresContext, aContext);