summaryrefslogtreecommitdiffstats
path: root/dom/base/nsImageLoadingContent.cpp
diff options
context:
space:
mode:
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;
+}