mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-25 03:05:34 +00:00
Bug 1401807 Part 1 - Give unconstrained block size when reflowing mPosterImage. r=dholbert
Also, added MOZ_ASSERT to ensure all the video frame's children are fully complete after reflowing (except for the mVideoControls special case on Android). This fixed aStatus.IsEmpty() assertion for the test case added in Part 2. MozReview-Commit-ID: HKze4EZoaJY --HG-- extra : rebase_source : d695ee3a7c884450ba7dd9da41e14ab3621c89ed
This commit is contained in:
parent
6b6cd79992
commit
03b735b023
@ -321,6 +321,8 @@ nsVideoFrame::Reflow(nsPresContext* aPresContext,
|
||||
ReflowOutput kidDesiredSize(aReflowInput);
|
||||
WritingMode wm = imageFrame->GetWritingMode();
|
||||
LogicalSize availableSize = aReflowInput.AvailableSize(wm);
|
||||
availableSize.BSize(wm) = NS_UNCONSTRAINEDSIZE;
|
||||
|
||||
LogicalSize cbSize = aMetrics.Size(aMetrics.GetWritingMode()).
|
||||
ConvertTo(wm, aMetrics.GetWritingMode());
|
||||
ReflowInput kidReflowInput(aPresContext,
|
||||
@ -340,6 +342,10 @@ nsVideoFrame::Reflow(nsPresContext* aPresContext,
|
||||
kidReflowInput.SetComputedHeight(posterRenderRect.height);
|
||||
ReflowChild(imageFrame, aPresContext, kidDesiredSize, kidReflowInput,
|
||||
posterRenderRect.x, posterRenderRect.y, 0, aStatus);
|
||||
MOZ_ASSERT(aStatus.IsFullyComplete(),
|
||||
"We gave our child unconstrained available block-size, "
|
||||
"so it should be complete!");
|
||||
|
||||
FinishReflowChild(imageFrame, aPresContext,
|
||||
kidDesiredSize, &kidReflowInput,
|
||||
posterRenderRect.x, posterRenderRect.y, 0);
|
||||
@ -372,6 +378,9 @@ nsVideoFrame::Reflow(nsPresContext* aPresContext,
|
||||
ReflowOutput kidDesiredSize(kidReflowInput);
|
||||
ReflowChild(child, aPresContext, kidDesiredSize, kidReflowInput,
|
||||
borderPadding.left, borderPadding.top, 0, aStatus);
|
||||
MOZ_ASSERT(aStatus.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.
|
||||
|
Loading…
Reference in New Issue
Block a user