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 /layout/generic/nsImageFrame.cpp | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/generic/nsImageFrame.cpp')
-rw-r--r-- | layout/generic/nsImageFrame.cpp | 14 |
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(); } } |