summaryrefslogtreecommitdiffstats
path: root/layout/generic/nsImageFrame.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 /layout/generic/nsImageFrame.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 '')
-rw-r--r--layout/generic/nsImageFrame.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/layout/generic/nsImageFrame.cpp b/layout/generic/nsImageFrame.cpp
index e0a6243ed2..c1e69df6c9 100644
--- a/layout/generic/nsImageFrame.cpp
+++ b/layout/generic/nsImageFrame.cpp
@@ -18,6 +18,7 @@
#include "mozilla/DebugOnly.h"
#include "mozilla/Encoding.h"
#include "mozilla/HTMLEditor.h"
+#include "mozilla/dom/FetchPriority.h"
#include "mozilla/dom/ImageTracker.h"
#include "mozilla/gfx/2D.h"
#include "mozilla/gfx/Helpers.h"
@@ -268,7 +269,7 @@ BrokenImageIcon::BrokenImageIcon(const nsImageFrame& aFrame) {
loadFlags, nullptr, contentPolicyType, u""_ns,
false, /* aUseUrgentStartForChannel */
false, /* aLinkPreload */
- 0, getter_AddRefs(mImage));
+ 0, FetchPriority::Auto, getter_AddRefs(mImage));
Unused << NS_WARN_IF(NS_FAILED(rv));
}
@@ -554,15 +555,16 @@ void nsImageFrame::DidSetComputedStyle(ComputedStyle* aOldStyle) {
//
// TODO(emilio): We might want to do the same for regular list-style-image or
// even simple content: url() changes.
- if (mKind == Kind::XULImage) {
- if (!mContent->AsElement()->HasNonEmptyAttr(nsGkAtoms::src) && aOldStyle &&
+ if (mKind == Kind::XULImage && aOldStyle) {
+ if (!mContent->AsElement()->HasNonEmptyAttr(nsGkAtoms::src) &&
aOldStyle->StyleList()->mListStyleImage !=
StyleList()->mListStyleImage) {
UpdateXULImage();
}
- if (!mOwnedRequest && aOldStyle &&
- aOldStyle->StyleDisplay()->EffectiveAppearance() !=
- StyleDisplay()->EffectiveAppearance()) {
+ // If we have no image our intrinsic size might be themed. We need to
+ // update the size even if the effective appearance hasn't changed to
+ // deal correctly with theme changes.
+ if (!mOwnedRequest) {
UpdateIntrinsicSize();
}
}