зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1401807 Part 3 - Use a local reflow status when reflowing nsVideoFrame's children. r=dholbert
This ensures the video frame's reflow status is not affect by its children's reflow result. MozReview-Commit-ID: 4WwLFyIyV4q --HG-- extra : rebase_source : 1a2f4c4b4b6508dfda195bceef39a80f9093e117
This commit is contained in:
Родитель
569e748c2f
Коммит
a19f7d8471
|
@ -314,6 +314,7 @@ nsVideoFrame::Reflow(nsPresContext* aPresContext,
|
|||
// 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.
|
||||
|
@ -341,8 +342,8 @@ nsVideoFrame::Reflow(nsPresContext* aPresContext,
|
|||
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!");
|
||||
|
||||
|
@ -377,8 +378,8 @@ nsVideoFrame::Reflow(nsPresContext* aPresContext,
|
|||
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!");
|
||||
|
||||
|
@ -422,6 +423,8 @@ nsVideoFrame::Reflow(nsPresContext* aPresContext,
|
|||
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);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче