summaryrefslogtreecommitdiffstats
path: root/layout/generic/nsImageFrame.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'layout/generic/nsImageFrame.cpp')
-rw-r--r--layout/generic/nsImageFrame.cpp21
1 files changed, 7 insertions, 14 deletions
diff --git a/layout/generic/nsImageFrame.cpp b/layout/generic/nsImageFrame.cpp
index c1e69df6c9..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();
}
@@ -1476,8 +1474,6 @@ nscoord nsImageFrame::GetContinuationOffset() const {
nscoord nsImageFrame::GetMinISize(gfxContext* aRenderingContext) {
// XXX The caller doesn't account for constraints of the block-size,
// min-block-size, and max-block-size properties.
- DebugOnly<nscoord> result;
- DISPLAY_MIN_INLINE_SIZE(this, result);
EnsureIntrinsicSizeAndRatio();
const auto& iSize = GetWritingMode().IsVertical() ? mIntrinsicSize.height
: mIntrinsicSize.width;
@@ -1487,8 +1483,6 @@ nscoord nsImageFrame::GetMinISize(gfxContext* aRenderingContext) {
nscoord nsImageFrame::GetPrefISize(gfxContext* aRenderingContext) {
// XXX The caller doesn't account for constraints of the block-size,
// min-block-size, and max-block-size properties.
- DebugOnly<nscoord> result;
- DISPLAY_PREF_INLINE_SIZE(this, result);
EnsureIntrinsicSizeAndRatio();
const auto& iSize = GetWritingMode().IsVertical() ? mIntrinsicSize.height
: mIntrinsicSize.width;
@@ -1526,7 +1520,6 @@ void nsImageFrame::Reflow(nsPresContext* aPresContext, ReflowOutput& aMetrics,
nsReflowStatus& aStatus) {
MarkInReflow();
DO_GLOBAL_REFLOW_COUNT("nsImageFrame");
- DISPLAY_REFLOW(aPresContext, this, aReflowInput, aMetrics, aStatus);
MOZ_ASSERT(aStatus.IsEmpty(), "Caller should pass a fresh reflow status!");
NS_FRAME_TRACE(
NS_FRAME_TRACE_CALLS,
@@ -2862,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;
}