We're using nsIFrame* as the argument type in many places where we should be using a common SVG base class. E.g. nsSVGUtils::GetOuterSVGFrame which assumes it's okay to call GetStateBits to get SVG bits off what the interface says is an arbitrary nsIFrame*. We need an nsSVGFrame I think, even if we don't use as anything other than an empty interface.
Tough thing to in general do since we don't have a common base class for all svg frames and presumably we don't want to introduce any additional MI unless absolutely necessary. For instance: <defs> - nsSVGContainerFrame derived from nsContainerFrame <rect> - nsSVGPathGeometryFrame derived from nsSVGGeometryFrame derived from nsFrame We may be able to use the interface nsISVGChildFrame rather than nsFrame in more places if we are very careful. For instance <defs> frames do not have the nsISVGChildFrame interface and yet must have SVG specific state bits set on them.