Bug 842850 (Part 2) - Remove imgIContainer::GetRootLayoutFrame. r=dholbert,joe sr=bz

This commit is contained in:
Seth Fowler 2013-02-28 12:22:46 -08:00
Родитель c9f0633db1
Коммит d3ae5f62de
3 изменённых файлов: 5 добавлений и 34 удалений

Просмотреть файл

@ -58,7 +58,7 @@ native nsSize(nsSize);
*
* Internally, imgIContainer also manages animation of images.
*/
[scriptable, builtinclass, uuid(6f0113b2-c429-41a8-b433-35f6c36c5651)]
[scriptable, builtinclass, uuid(585f4087-5148-478a-862c-5e90cc61413d)]
interface imgIContainer : nsISupports
{
/**
@ -233,16 +233,6 @@ interface imgIContainer : nsISupports
[const] in SVGImageContext aSVGContext,
in uint32_t aFlags);
/**
* If this image is TYPE_VECTOR, i.e. is really an embedded SVG document,
* this method returns a pointer to the root nsIFrame of that document. If
* not (or if the root nsIFrame isn't available for some reason), this method
* returns nullptr.
*
* "notxpcom" for convenience, since we have no need for nsresult return-val.
*/
[notxpcom] nsIFrame GetRootLayoutFrame();
/*
* Ensures that an image is decoding. Calling this function guarantees that
* the image will at some point fire off decode notifications. Calling draw(),

Просмотреть файл

@ -3150,14 +3150,6 @@ RasterImage::Draw(gfxContext *aContext,
return NS_OK;
}
//******************************************************************************
/* [notxpcom] nsIFrame GetRootLayoutFrame() */
nsIFrame*
RasterImage::GetRootLayoutFrame()
{
return nullptr;
}
//******************************************************************************
/* void lockImage() */
NS_IMETHODIMP

Просмотреть файл

@ -498,10 +498,10 @@ VectorImage::GetHeight(int32_t* aHeight)
NS_IMETHODIMP
VectorImage::GetIntrinsicSize(nsSize* aSize)
{
nsIFrame* rootFrame = GetRootLayoutFrame();
if (!rootFrame)
if (mError || !mIsFullyLoaded)
return NS_ERROR_FAILURE;
nsIFrame* rootFrame = mSVGDocumentWrapper->GetRootLayoutFrame();
*aSize = nsSize(-1, -1);
nsIFrame::IntrinsicSize rfSize = rootFrame->GetIntrinsicSize();
if (rfSize.width.GetUnit() == eStyleUnit_Coord)
@ -517,10 +517,10 @@ VectorImage::GetIntrinsicSize(nsSize* aSize)
NS_IMETHODIMP
VectorImage::GetIntrinsicRatio(nsSize* aRatio)
{
nsIFrame* rootFrame = GetRootLayoutFrame();
if (!rootFrame)
if (mError || !mIsFullyLoaded)
return NS_ERROR_FAILURE;
nsIFrame* rootFrame = mSVGDocumentWrapper->GetRootLayoutFrame();
*aRatio = rootFrame->GetIntrinsicRatio();
return NS_OK;
}
@ -773,17 +773,6 @@ VectorImage::Draw(gfxContext* aContext,
return NS_OK;
}
//******************************************************************************
/* [notxpcom] nsIFrame GetRootLayoutFrame() */
nsIFrame*
VectorImage::GetRootLayoutFrame()
{
if (mError)
return nullptr;
return mSVGDocumentWrapper->GetRootLayoutFrame();
}
//******************************************************************************
/* void requestDecode() */
NS_IMETHODIMP