Bug 865945. Increment the visible count before calling FrameCreated so that the image for an SVGFEImage element is actually considered visible. r=mats
authorTimothy Nikkel <tnikkel@gmail.com>
Fri, 26 Apr 2013 14:58:15 -0500
changeset 141055 e185401101a8ff27c5e9dc1729ec038c070aecda
parent 141054 f31ae2be12f0b3625fb529163620c47e54b1fed7
child 141056 6255ed636db10e67ced1e6043781e1c5a650b682
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmats
bugs865945
milestone23.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 865945. Increment the visible count before calling FrameCreated so that the image for an SVGFEImage element is actually considered visible. r=mats
layout/svg/SVGFEImageFrame.cpp
--- a/layout/svg/SVGFEImageFrame.cpp
+++ b/layout/svg/SVGFEImageFrame.cpp
@@ -105,19 +105,21 @@ SVGFEImageFrame::Init(nsIContent* aConte
                "Trying to construct an SVGFEImageFrame for a "
                "content element that doesn't support the right interfaces");
 
   SVGFEImageFrameBase::Init(aContent, aParent, aPrevInFlow);
   nsCOMPtr<nsIImageLoadingContent> imageLoader =
     do_QueryInterface(SVGFEImageFrameBase::mContent);
 
   if (imageLoader) {
+    // We assume that feImage's are always visible.
+    // Increment the visible count before calling FrameCreated so that
+    // FrameCreated will actually track the image correctly.
+    imageLoader->IncrementVisibleCount();
     imageLoader->FrameCreated(this);
-    // We assume that feImage's are always visible.
-    imageLoader->IncrementVisibleCount();
   }
 }
 
 nsIAtom *
 SVGFEImageFrame::GetType() const
 {
   return nsGkAtoms::svgFEImageFrame;
 }