зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1170052 part 1: Refactor nsImageBoxFrame::PaintImage() so its final failure case is an early return. r=seth
This commit is contained in:
Родитель
1ee7f9ba83
Коммит
a3e3a8c1d8
|
@ -341,17 +341,17 @@ nsImageBoxFrame::PaintImage(nsRenderingContext& aRenderingContext,
|
|||
nsCOMPtr<imgIContainer> imgCon;
|
||||
mImageRequest->GetImage(getter_AddRefs(imgCon));
|
||||
|
||||
if (imgCon) {
|
||||
bool hasSubRect = !mUseSrcAttr && (mSubRect.width > 0 || mSubRect.height > 0);
|
||||
return
|
||||
nsLayoutUtils::DrawSingleImage(*aRenderingContext.ThebesContext(),
|
||||
PresContext(), imgCon,
|
||||
nsLayoutUtils::GetGraphicsFilterForFrame(this),
|
||||
rect, dirty, nullptr, aFlags, nullptr,
|
||||
hasSubRect ? &mSubRect : nullptr);
|
||||
if (!imgCon) {
|
||||
return DrawResult::NOT_READY;
|
||||
}
|
||||
|
||||
return DrawResult::NOT_READY;
|
||||
bool hasSubRect = !mUseSrcAttr && (mSubRect.width > 0 || mSubRect.height > 0);
|
||||
return nsLayoutUtils::DrawSingleImage(
|
||||
*aRenderingContext.ThebesContext(),
|
||||
PresContext(), imgCon,
|
||||
nsLayoutUtils::GetGraphicsFilterForFrame(this),
|
||||
rect, dirty, nullptr, aFlags, nullptr,
|
||||
hasSubRect ? &mSubRect : nullptr);
|
||||
}
|
||||
|
||||
void nsDisplayXULImage::Paint(nsDisplayListBuilder* aBuilder,
|
||||
|
|
Загрузка…
Ссылка в новой задаче