diff --git a/layout/style/ImageLoader.cpp b/layout/style/ImageLoader.cpp index 09cda1630fa8..3e94cb711ec8 100644 --- a/layout/style/ImageLoader.cpp +++ b/layout/style/ImageLoader.cpp @@ -696,10 +696,9 @@ nsresult ImageLoader::OnSizeAvailable(imgIRequest* aRequest, return NS_OK; } - for (FrameWithFlags& fwf : *frameSet) { - nsIFrame* frame = fwf.mFrame; - if (frame->StyleVisibility()->IsVisible()) { - frame->MarkNeedsDisplayItemRebuild(); + for (const FrameWithFlags& fwf : *frameSet) { + if (fwf.mFrame->StyleVisibility()->IsVisible()) { + fwf.mFrame->SchedulePaint(); } }