From e386c5a0b1e20203d98404d86a2ba5c20bef2adc Mon Sep 17 00:00:00 2001 From: Daniel Holbert Date: Fri, 12 Sep 2014 13:15:23 -0700 Subject: [PATCH] Bug 1066805: Drop unused parameter from nsImageFrame::EnsureIntrinsicSizeAndRatio(). r=tn --- layout/generic/nsImageFrame.cpp | 11 ++++------- layout/generic/nsImageFrame.h | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) 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,