diff --git a/layout/svg/base/src/nsSVGPatternFrame.cpp b/layout/svg/base/src/nsSVGPatternFrame.cpp index 1fcebeb531c4..a32b8dbe90d9 100644 --- a/layout/svg/base/src/nsSVGPatternFrame.cpp +++ b/layout/svg/base/src/nsSVGPatternFrame.cpp @@ -196,8 +196,8 @@ nsSVGPatternFrame::PaintPattern(gfxASurface** surface, *surface = nsnull; // Get the first child of the pattern data we will render - nsIFrame *firstKid; - if (NS_FAILED(GetPatternFirstChild(&firstKid))) + nsIFrame* firstKid = GetPatternFirstChild(); + if (!firstKid) return NS_ERROR_FAILURE; // Either no kids or a bad reference /* @@ -351,22 +351,22 @@ nsSVGPatternFrame::PaintPattern(gfxASurface** surface, // How do we handle the insertion of a new frame? // We really don't want to rerender this every time, // do we? -NS_IMETHODIMP -nsSVGPatternFrame::GetPatternFirstChild(nsIFrame **kid) +nsIFrame* +nsSVGPatternFrame::GetPatternFirstChild() { // Do we have any children ourselves? - *kid = mFrames.FirstChild(); - if (*kid) - return NS_OK; + nsIFrame* kid = mFrames.FirstChild(); + if (kid) + return kid; // No, see if we chain to someone who does AutoPatternReferencer patternRef(this); - nsSVGPatternFrame *next = GetReferencedPatternIfNotInUse(); + nsSVGPatternFrame* next = GetReferencedPatternIfNotInUse(); if (!next) - return NS_ERROR_FAILURE; + return nsnull; - return next->GetPatternFirstChild(kid); + return next->GetPatternFirstChild(); } PRUint16 diff --git a/layout/svg/base/src/nsSVGPatternFrame.h b/layout/svg/base/src/nsSVGPatternFrame.h index e2e564a70863..05909946a8e6 100644 --- a/layout/svg/base/src/nsSVGPatternFrame.h +++ b/layout/svg/base/src/nsSVGPatternFrame.h @@ -143,7 +143,7 @@ protected: nsIFrame *aSource, float aGraphicOpacity, const gfxRect *aOverrideBounds); - NS_IMETHOD GetPatternFirstChild(nsIFrame **kid); + nsIFrame* GetPatternFirstChild(); gfxRect GetPatternRect(const gfxRect &bbox, const gfxMatrix &callerCTM, nsIFrame *aTarget);