Bug 495968 - Only update the active switch child in nsSVGSwitchFrame::UpdateCoveredRegion. r=roc
authorRobert Longson <longsonr@gmail.com>
Fri, 08 Jan 2010 11:35:18 +0000
changeset 36950 1a3d81ba980abd84599311880d7c916ffdd9d5fa
parent 36949 99bb0c6877f02bb9e7f2d2cd55963cd6fca2582c
child 36951 765335600809c6fe847897351ea6b6cb17c913da
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersroc
bugs495968
milestone1.9.3a1pre
Bug 495968 - Only update the active switch child in nsSVGSwitchFrame::UpdateCoveredRegion. r=roc
layout/svg/base/src/nsSVGSwitchFrame.cpp
--- 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();