mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset e507145a198c (bug 1149037)
This commit is contained in:
parent
84d92cdc91
commit
ada1ac6461
@ -4709,7 +4709,7 @@ nsImageRenderer::ComputeIntrinsicSize()
|
||||
case eStyleImageType_Image:
|
||||
{
|
||||
bool haveWidth, haveHeight;
|
||||
CSSIntSize imageIntSize;
|
||||
nsIntSize imageIntSize;
|
||||
nsLayoutUtils::ComputeSizeForDrawing(mImageContainer, imageIntSize,
|
||||
result.mRatio, haveWidth, haveHeight);
|
||||
if (haveWidth) {
|
||||
|
@ -6105,7 +6105,7 @@ nsLayoutUtils::DrawSingleImage(gfxContext& aContext,
|
||||
const nsRect* aSourceArea)
|
||||
{
|
||||
nscoord appUnitsPerCSSPixel = nsDeviceContext::AppUnitsPerCSSPixel();
|
||||
CSSIntSize pixelImageSize(ComputeSizeForDrawingWithFallback(aImage, aDest.Size()));
|
||||
nsIntSize pixelImageSize(ComputeSizeForDrawingWithFallback(aImage, aDest.Size()));
|
||||
if (pixelImageSize.width < 1 || pixelImageSize.height < 1) {
|
||||
NS_WARNING("Image width or height is non-positive");
|
||||
return DrawResult::TEMPORARY_ERROR;
|
||||
@ -6148,7 +6148,7 @@ nsLayoutUtils::DrawSingleImage(gfxContext& aContext,
|
||||
|
||||
/* static */ void
|
||||
nsLayoutUtils::ComputeSizeForDrawing(imgIContainer *aImage,
|
||||
CSSIntSize& aImageSize, /*outparam*/
|
||||
nsIntSize& aImageSize, /*outparam*/
|
||||
nsSize& aIntrinsicRatio, /*outparam*/
|
||||
bool& aGotWidth, /*outparam*/
|
||||
bool& aGotHeight /*outparam*/)
|
||||
@ -6161,16 +6161,16 @@ nsLayoutUtils::ComputeSizeForDrawing(imgIContainer *aImage,
|
||||
// We hit an error (say, because the image failed to load or couldn't be
|
||||
// decoded) and should return zero size.
|
||||
aGotWidth = aGotHeight = true;
|
||||
aImageSize = CSSIntSize(0, 0);
|
||||
aImageSize = nsIntSize(0, 0);
|
||||
aIntrinsicRatio = nsSize(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/* static */ CSSIntSize
|
||||
/* static */ nsIntSize
|
||||
nsLayoutUtils::ComputeSizeForDrawingWithFallback(imgIContainer* aImage,
|
||||
const nsSize& aFallbackSize)
|
||||
{
|
||||
CSSIntSize imageSize;
|
||||
nsIntSize imageSize;
|
||||
nsSize imageRatio;
|
||||
bool gotHeight, gotWidth;
|
||||
ComputeSizeForDrawing(aImage, imageSize, imageRatio, gotWidth, gotHeight);
|
||||
|
@ -1802,7 +1802,7 @@ public:
|
||||
* have less information about the frame tree.
|
||||
*/
|
||||
static void ComputeSizeForDrawing(imgIContainer* aImage,
|
||||
mozilla::CSSIntSize& aImageSize,
|
||||
nsIntSize& aImageSize,
|
||||
nsSize& aIntrinsicRatio,
|
||||
bool& aGotWidth,
|
||||
bool& aGotHeight);
|
||||
@ -1815,9 +1815,8 @@ public:
|
||||
* after trying all these methods, no value is available for one or both
|
||||
* dimensions, the corresponding dimension of aFallbackSize is used instead.
|
||||
*/
|
||||
static mozilla::CSSIntSize
|
||||
ComputeSizeForDrawingWithFallback(imgIContainer* aImage,
|
||||
const nsSize& aFallbackSize);
|
||||
static nsIntSize ComputeSizeForDrawingWithFallback(imgIContainer* aImage,
|
||||
const nsSize& aFallbackSize);
|
||||
|
||||
/**
|
||||
* Given a source area of an image (in appunits) and a destination area
|
||||
|
@ -2338,7 +2338,7 @@ nsStyleBackground::Size::DependsOnPositioningAreaSize(const nsStyleImage& aImage
|
||||
nsCOMPtr<imgIContainer> imgContainer;
|
||||
aImage.GetImageData()->GetImage(getter_AddRefs(imgContainer));
|
||||
if (imgContainer) {
|
||||
CSSIntSize imageSize;
|
||||
nsIntSize imageSize;
|
||||
nsSize imageRatio;
|
||||
bool hasWidth, hasHeight;
|
||||
nsLayoutUtils::ComputeSizeForDrawing(imgContainer, imageSize, imageRatio,
|
||||
|
Loading…
Reference in New Issue
Block a user