зеркало из https://github.com/mozilla/pjs.git
Bug 543864 patch 2: Make VectorImage::GetWidth & GetHeight return 0 in case of errors. r=roc a=roc
This commit is contained in:
Родитель
e79c62ef4c
Коммит
5c5617aeaf
|
@ -310,11 +310,13 @@ NS_IMETHODIMP
|
|||
VectorImage::GetWidth(PRInt32* aWidth)
|
||||
{
|
||||
if (mError || !mIsFullyLoaded) {
|
||||
*aWidth = 0;
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
if (!mSVGDocumentWrapper->GetWidthOrHeight(SVGDocumentWrapper::eWidth,
|
||||
*aWidth)) {
|
||||
*aWidth = 0;
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
@ -327,11 +329,13 @@ NS_IMETHODIMP
|
|||
VectorImage::GetHeight(PRInt32* aHeight)
|
||||
{
|
||||
if (mError || !mIsFullyLoaded) {
|
||||
*aHeight = 0;
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
if (!mSVGDocumentWrapper->GetWidthOrHeight(SVGDocumentWrapper::eHeight,
|
||||
*aHeight)) {
|
||||
*aHeight = 0;
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче