/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
nsresult IconLoader::LoadIcon(nsIURI* aIconURI, nsINode* aNode, bool aIsInternalIcon) { if (mIconRequest) { // Another icon request is already in flight. Kill it.
mIconRequest->CancelWithReason(
NS_BINDING_ABORTED, "Another icon request is already in flight"_ns);
mIconRequest = nullptr;
}
// Ask the image to decode at its intrinsic size.
int32_t width = 0, height = 0;
image->GetWidth(&width);
image->GetHeight(&height);
image->RequestDecodeForSize(nsIntSize(width, height),
imgIContainer::FLAG_HIGH_QUALITY_SCALING);
}
if (aType == imgINotificationObserver::FRAME_COMPLETE) {
nsCOMPtr<imgIContainer> image;
aRequest->GetImage(getter_AddRefs(image));
MOZ_ASSERT(image);
if (mListener) {
mListener->OnComplete(image);
} return;
}
if (aType == imgINotificationObserver::DECODE_COMPLETE) { if (mIconRequest && mIconRequest == aRequest) {
mIconRequest->CancelWithReason(NS_BINDING_ABORTED, "DECODE_COMPLETE"_ns);
mIconRequest = nullptr;
}
}
}
} // namespace mozilla::widget
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.17Bemerkung:
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.