Bug 1319318: When resolving a video/audio frame's shrinkwrapped BSize from controls, check whether controls are orthogonal when reading its size. r=mats
☠☠ backed out by 159f68a4533f ☠ ☠
authorDaniel Holbert <dholbert@cs.stanford.edu>
Thu, 08 Dec 2016 09:20:25 -1000
changeset 325422 9d41238dabf42896e32ab1df01cb477f25e207f8
parent 325421 06552bcdabecef7cd6c9a4a82ea390a231c04977
child 325423 4ee89b6c76d73e305d2958e30a1c98442b23c907
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersmats
bugs1319318
milestone53.0a1
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
layout/generic/nsVideoFrame.cpp
--- 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) {