--- a/layout/generic/nsVideoFrame.cpp
+++ b/layout/generic/nsVideoFrame.cpp
@@ -309,16 +309,17 @@ nsVideoFrame::Reflow(nsPresContext* aPre
nsMargin borderPadding = aReflowInput.ComputedPhysicalBorderPadding();
// Reflow the child frames. We may have up to three: an image
// frame (for the poster image), a container frame for the controls,
// and a container frame for the caption.
for (nsIFrame* child : mFrames) {
nsSize oldChildSize = child->GetSize();
+ nsReflowStatus childStatus;
if (child->GetContent() == mPosterImage) {
// Reflow the poster frame.
nsImageFrame* imageFrame = static_cast<nsImageFrame*>(child);
ReflowOutput kidDesiredSize(aReflowInput);
WritingMode wm = imageFrame->GetWritingMode();
LogicalSize availableSize = aReflowInput.AvailableSize(wm);
availableSize.BSize(wm) = NS_UNCONSTRAINEDSIZE;
@@ -336,18 +337,18 @@ nsVideoFrame::Reflow(nsPresContext* aPre
posterRenderRect =
nsRect(nsPoint(borderPadding.left, borderPadding.top),
nsSize(aReflowInput.ComputedWidth(),
aReflowInput.ComputedHeight()));
}
kidReflowInput.SetComputedWidth(posterRenderRect.width);
kidReflowInput.SetComputedHeight(posterRenderRect.height);
ReflowChild(imageFrame, aPresContext, kidDesiredSize, kidReflowInput,
- posterRenderRect.x, posterRenderRect.y, 0, aStatus);
- MOZ_ASSERT(aStatus.IsFullyComplete(),
+ posterRenderRect.x, posterRenderRect.y, 0, childStatus);
+ MOZ_ASSERT(childStatus.IsFullyComplete(),
"We gave our child unconstrained available block-size, "
"so it should be complete!");
FinishReflowChild(imageFrame, aPresContext,
kidDesiredSize, &kidReflowInput,
posterRenderRect.x, posterRenderRect.y, 0);
// Android still uses XUL media controls & hence needs this XUL-friendly
@@ -372,18 +373,18 @@ nsVideoFrame::Reflow(nsPresContext* aPre
availableSize.BSize(wm) = NS_UNCONSTRAINEDSIZE;
ReflowInput kidReflowInput(aPresContext,
aReflowInput,
child,
availableSize);
ReflowOutput kidDesiredSize(kidReflowInput);
ReflowChild(child, aPresContext, kidDesiredSize, kidReflowInput,
- borderPadding.left, borderPadding.top, 0, aStatus);
- MOZ_ASSERT(aStatus.IsFullyComplete(),
+ borderPadding.left, borderPadding.top, 0, childStatus);
+ MOZ_ASSERT(childStatus.IsFullyComplete(),
"We gave our child unconstrained available block-size, "
"so it should be complete!");
if (child->GetContent() == mVideoControls && isBSizeShrinkWrapping) {
// Resolve our own BSize based on the controls' size in the same axis.
contentBoxBSize = myWM.IsOrthogonalTo(wm) ?
kidDesiredSize.ISize(wm) : kidDesiredSize.BSize(wm);
}
@@ -417,16 +418,18 @@ nsVideoFrame::Reflow(nsPresContext* aPre
aMetrics.SetOverflowAreasToDesiredBounds();
FinishAndStoreOverflow(&aMetrics);
NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS,
("exit nsVideoFrame::Reflow: size=%d,%d",
aMetrics.Width(), aMetrics.Height()));
+
+ MOZ_ASSERT(aStatus.IsEmpty(), "This type of frame can't be split.");
NS_FRAME_SET_TRUNCATION(aStatus, aReflowInput, aMetrics);
}
class nsDisplayVideo : public nsDisplayItem {
public:
nsDisplayVideo(nsDisplayListBuilder* aBuilder, nsVideoFrame* aFrame)
: nsDisplayItem(aBuilder, aFrame)
{