summaryrefslogtreecommitdiffstats
path: root/layout/generic/nsImageFrame.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
commita90a5cba08fdf6c0ceb95101c275108a152a3aed (patch)
tree532507288f3defd7f4dcf1af49698bcb76034855 /layout/generic/nsImageFrame.cpp
parentAdding debian version 126.0.1-1. (diff)
downloadfirefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz
firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/generic/nsImageFrame.cpp')
-rw-r--r--layout/generic/nsImageFrame.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/layout/generic/nsImageFrame.cpp b/layout/generic/nsImageFrame.cpp
index 91d8430b60..c330f1ce6b 100644
--- a/layout/generic/nsImageFrame.cpp
+++ b/layout/generic/nsImageFrame.cpp
@@ -645,8 +645,9 @@ const StyleImage* nsImageFrame::GetImageFromStyle() const {
nonAnonymousParent->GetContent());
styleContent = nonAnonymousParent->StyleContent();
}
- MOZ_RELEASE_ASSERT(contentIndex < styleContent->ContentCount());
- auto& contentItem = styleContent->ContentAt(contentIndex);
+ auto items = styleContent->NonAltContentItems();
+ MOZ_RELEASE_ASSERT(contentIndex < items.Length());
+ const auto& contentItem = items[contentIndex];
MOZ_RELEASE_ASSERT(contentItem.IsImage());
return &contentItem.AsImage();
}
@@ -1055,11 +1056,8 @@ bool nsImageFrame::ShouldCreateImageFrameForContentProperty(
if (aElement.IsRootOfNativeAnonymousSubtree()) {
return false;
}
- const auto& content = aStyle.StyleContent()->mContent;
- if (!content.IsItems()) {
- return false;
- }
- Span<const StyleContentItem> items = content.AsItems().AsSpan();
+ Span<const StyleContentItem> items =
+ aStyle.StyleContent()->NonAltContentItems();
return items.Length() == 1 && items[0].IsImage();
}
@@ -2857,10 +2855,10 @@ LogicalSides nsImageFrame::GetLogicalSkipSides() const {
return skip;
}
if (GetPrevInFlow()) {
- skip |= eLogicalSideBitsBStart;
+ skip += LogicalSide::BStart;
}
if (GetNextInFlow()) {
- skip |= eLogicalSideBitsBEnd;
+ skip += LogicalSide::BEnd;
}
return skip;
}