summaryrefslogtreecommitdiffstats
path: root/dom/base/nsImageLoadingContent.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /dom/base/nsImageLoadingContent.cpp
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/base/nsImageLoadingContent.cpp')
-rw-r--r--dom/base/nsImageLoadingContent.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/dom/base/nsImageLoadingContent.cpp b/dom/base/nsImageLoadingContent.cpp
index c1320a3472..fa1798ce35 100644
--- a/dom/base/nsImageLoadingContent.cpp
+++ b/dom/base/nsImageLoadingContent.cpp
@@ -47,6 +47,7 @@
#include "mozilla/dom/BindContext.h"
#include "mozilla/dom/Document.h"
#include "mozilla/dom/Element.h"
+#include "mozilla/dom/FetchPriority.h"
#include "mozilla/dom/PContent.h" // For TextRecognitionResult
#include "mozilla/dom/HTMLImageElement.h"
#include "mozilla/dom/ImageTextBinding.h"
@@ -1143,7 +1144,8 @@ nsresult nsImageLoadingContent::LoadImage(nsIURI* aNewURI, bool aForce,
nsresult rv = nsContentUtils::LoadImage(
aNewURI, element, aDocument, triggeringPrincipal, 0, referrerInfo, this,
loadFlags, element->LocalName(), getter_AddRefs(req), policyType,
- mUseUrgentStartForChannel);
+ mUseUrgentStartForChannel, /* aLinkPreload */ false,
+ /* aEarlyHintPreloaderId */ 0, GetFetchPriorityForImage());
// Reset the flag to avoid loading from XPCOM or somewhere again else without
// initiated by user interaction.
@@ -1639,10 +1641,12 @@ void nsImageLoadingContent::BindToTree(BindContext& aContext,
}
}
-void nsImageLoadingContent::UnbindFromTree(bool aNullParent) {
+void nsImageLoadingContent::UnbindFromTree() {
// We may be leaving the document, so if our image is tracked, untrack it.
nsCOMPtr<Document> doc = GetOurCurrentDoc();
- if (!doc) return;
+ if (!doc) {
+ return;
+ }
UntrackImage(mCurrentRequest);
UntrackImage(mPendingRequest);
@@ -1860,3 +1864,7 @@ nsLoadFlags nsImageLoadingContent::LoadFlags() {
}
return nsIRequest::LOAD_NORMAL;
}
+
+FetchPriority nsImageLoadingContent::GetFetchPriorityForImage() const {
+ return FetchPriority::Auto;
+}