diff --git a/mozilla/layout/generic/nsImageFrame.cpp b/mozilla/layout/generic/nsImageFrame.cpp index 381288c8185..173bf6079a9 100644 --- a/mozilla/layout/generic/nsImageFrame.cpp +++ b/mozilla/layout/generic/nsImageFrame.cpp @@ -194,6 +194,9 @@ nsHTMLImageLoader::GetDesiredSize(nsIPresContext* aPresContext, // Determine whether the image has fixed content width and height PRBool fixedContentWidth = aReflowState.HaveFixedContentWidth(); PRBool fixedContentHeight = aReflowState.HaveFixedContentHeight(); + if (NS_INTRINSICSIZE == aReflowState.computedWidth) { + fixedContentWidth = PR_FALSE; + } if (NS_INTRINSICSIZE == aReflowState.computedHeight) { fixedContentHeight = PR_FALSE; } diff --git a/mozilla/layout/html/base/src/nsImageFrame.cpp b/mozilla/layout/html/base/src/nsImageFrame.cpp index 381288c8185..173bf6079a9 100644 --- a/mozilla/layout/html/base/src/nsImageFrame.cpp +++ b/mozilla/layout/html/base/src/nsImageFrame.cpp @@ -194,6 +194,9 @@ nsHTMLImageLoader::GetDesiredSize(nsIPresContext* aPresContext, // Determine whether the image has fixed content width and height PRBool fixedContentWidth = aReflowState.HaveFixedContentWidth(); PRBool fixedContentHeight = aReflowState.HaveFixedContentHeight(); + if (NS_INTRINSICSIZE == aReflowState.computedWidth) { + fixedContentWidth = PR_FALSE; + } if (NS_INTRINSICSIZE == aReflowState.computedHeight) { fixedContentHeight = PR_FALSE; }