diff --git a/layout/generic/nsImageFrame.cpp b/layout/generic/nsImageFrame.cpp index 2063c7484e3..fc232b49451 100644 --- a/layout/generic/nsImageFrame.cpp +++ b/layout/generic/nsImageFrame.cpp @@ -731,7 +731,7 @@ nsImageFrame::FrameChanged(imgIRequest *aRequest, } void -nsImageFrame::EnsureIntrinsicSizeAndRatio(nsPresContext* aPresContext) +nsImageFrame::EnsureIntrinsicSizeAndRatio() { // If mIntrinsicSize.width and height are 0, then we need to update from the // image container. @@ -771,8 +771,7 @@ nsImageFrame::ComputeSize(nsRenderingContext *aRenderingContext, const LogicalSize& aPadding, uint32_t aFlags) { - nsPresContext *presContext = PresContext(); - EnsureIntrinsicSizeAndRatio(presContext); + EnsureIntrinsicSizeAndRatio(); nsCOMPtr imageLoader = do_QueryInterface(mContent); NS_ASSERTION(imageLoader, "No content node??"); @@ -849,8 +848,7 @@ nsImageFrame::GetMinISize(nsRenderingContext *aRenderingContext) // min-height, and max-height properties. DebugOnly result; DISPLAY_MIN_WIDTH(this, result); - nsPresContext *presContext = PresContext(); - EnsureIntrinsicSizeAndRatio(presContext); + EnsureIntrinsicSizeAndRatio(); return mIntrinsicSize.width.GetUnit() == eStyleUnit_Coord ? mIntrinsicSize.width.GetCoordValue() : 0; } @@ -862,8 +860,7 @@ nsImageFrame::GetPrefISize(nsRenderingContext *aRenderingContext) // min-height, and max-height properties. DebugOnly result; DISPLAY_PREF_WIDTH(this, result); - nsPresContext *presContext = PresContext(); - EnsureIntrinsicSizeAndRatio(presContext); + EnsureIntrinsicSizeAndRatio(); // convert from normal twips to scaled twips (printing...) return mIntrinsicSize.width.GetUnit() == eStyleUnit_Coord ? mIntrinsicSize.width.GetCoordValue() : 0; diff --git a/layout/generic/nsImageFrame.h b/layout/generic/nsImageFrame.h index 6efe84676dd..8be688ab4a5 100644 --- a/layout/generic/nsImageFrame.h +++ b/layout/generic/nsImageFrame.h @@ -173,7 +173,7 @@ public: protected: virtual ~nsImageFrame(); - void EnsureIntrinsicSizeAndRatio(nsPresContext* aPresContext); + void EnsureIntrinsicSizeAndRatio(); virtual mozilla::LogicalSize ComputeSize(nsRenderingContext *aRenderingContext,