diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /dom/base/nsImageLoadingContent.cpp | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-adbda400be353e676059e335c3c0aaf99e719475.tar.xz firefox-adbda400be353e676059e335c3c0aaf99e719475.zip |
Adding upstream version 125.0.1.upstream/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.cpp | 14 |
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; +} |