Bug 495968 - Only update the active switch child in nsSVGSwitchFrame::UpdateCoveredRegion. r=roc
--- a/layout/svg/base/src/nsSVGSwitchFrame.cpp
+++ b/layout/svg/base/src/nsSVGSwitchFrame.cpp
@@ -162,17 +162,24 @@ nsSVGSwitchFrame::GetCoveredRegion()
return rect;
}
NS_IMETHODIMP
nsSVGSwitchFrame::UpdateCoveredRegion()
{
static_cast<nsSVGSwitchElement*>(mContent)->UpdateActiveChild();
- return nsSVGSwitchFrameBase::UpdateCoveredRegion();
+ nsIFrame *kid = GetActiveChildFrame();
+ if (kid) {
+ nsISVGChildFrame* child = do_QueryFrame(kid);
+ if (child) {
+ child->UpdateCoveredRegion();
+ }
+ }
+ return NS_OK;
}
NS_IMETHODIMP
nsSVGSwitchFrame::InitialUpdate()
{
nsSVGUtils::UpdateGraphic(this);
return nsSVGSwitchFrameBase::InitialUpdate();