Bug 1319318: When resolving a video/audio frame's shrinkwrapped BSize from controls, check whether controls are orthogonal when reading its size. r?mats
MozReview-Commit-ID: 9kH7rLF66zd
--- a/layout/generic/nsVideoFrame.cpp
+++ b/layout/generic/nsVideoFrame.cpp
@@ -372,17 +372,19 @@ nsVideoFrame::Reflow(nsPresContext* aPre
aReflowInput,
child,
availableSize);
ReflowOutput kidDesiredSize(kidReflowInput);
ReflowChild(child, aPresContext, kidDesiredSize, kidReflowInput,
borderPadding.left, borderPadding.top, 0, aStatus);
if (child->GetContent() == mVideoControls && isBSizeShrinkWrapping) {
- contentBoxBSize = kidDesiredSize.BSize(myWM);
+ // Resolve our own BSize based on the controls' size in the same axis.
+ contentBoxBSize = myWM.IsOrthogonalTo(wm) ?
+ kidDesiredSize.ISize(wm) : kidDesiredSize.BSize(wm);
}
FinishReflowChild(child, aPresContext,
kidDesiredSize, &kidReflowInput,
borderPadding.left, borderPadding.top, 0);
}
if (child->GetContent() == mVideoControls && child->GetSize() != oldChildSize) {