зеркало из https://github.com/mozilla/pjs.git
check in for andreas, it now checks to make sure that the image or lowimage is not
null before getting the width and height b=36902, a=waterson
This commit is contained in:
Родитель
08e968606d
Коммит
8c110fcbfd
|
@ -603,8 +603,13 @@ nsImageFrame::Paint(nsIPresContext* aPresContext,
|
|||
if (mImageLoader.GetLoadImageFailed()) {
|
||||
float p2t;
|
||||
aPresContext->GetScaledPixelsToTwips(&p2t);
|
||||
inner.width = NSIntPixelsToTwips(image->GetWidth(), p2t);
|
||||
inner.height = NSIntPixelsToTwips(image->GetHeight(), p2t);
|
||||
if (image != nsnull) {
|
||||
inner.width = NSIntPixelsToTwips(image->GetWidth(), p2t);
|
||||
inner.height = NSIntPixelsToTwips(image->GetHeight(), p2t);
|
||||
} else if (lowImage != nsnull) {
|
||||
inner.width = NSIntPixelsToTwips(lowImage->GetWidth(), p2t);
|
||||
inner.height = NSIntPixelsToTwips(lowImage->GetHeight(), p2t);
|
||||
}
|
||||
}
|
||||
|
||||
if (lowImage != nsnull && lowSrcLinesLoaded > 0) {
|
||||
|
|
|
@ -603,8 +603,13 @@ nsImageFrame::Paint(nsIPresContext* aPresContext,
|
|||
if (mImageLoader.GetLoadImageFailed()) {
|
||||
float p2t;
|
||||
aPresContext->GetScaledPixelsToTwips(&p2t);
|
||||
inner.width = NSIntPixelsToTwips(image->GetWidth(), p2t);
|
||||
inner.height = NSIntPixelsToTwips(image->GetHeight(), p2t);
|
||||
if (image != nsnull) {
|
||||
inner.width = NSIntPixelsToTwips(image->GetWidth(), p2t);
|
||||
inner.height = NSIntPixelsToTwips(image->GetHeight(), p2t);
|
||||
} else if (lowImage != nsnull) {
|
||||
inner.width = NSIntPixelsToTwips(lowImage->GetWidth(), p2t);
|
||||
inner.height = NSIntPixelsToTwips(lowImage->GetHeight(), p2t);
|
||||
}
|
||||
}
|
||||
|
||||
if (lowImage != nsnull && lowSrcLinesLoaded > 0) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче