--- a/layout/generic/nsVideoFrame.cpp
+++ b/layout/generic/nsVideoFrame.cpp
@@ -305,17 +305,17 @@ nsVideoFrame::Reflow(nsPresContext* aPre
const bool isBSizeShrinkWrapping = (contentBoxBSize == NS_INTRINSICSIZE);
nscoord borderBoxBSize;
if (!isBSizeShrinkWrapping) {
borderBoxBSize = contentBoxBSize +
aReflowInput.ComputedLogicalBorderPadding().BStartEnd(myWM);
}
- mBorderPadding = aReflowInput.ComputedPhysicalBorderPadding();
+ 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();
if (child->GetContent() == mPosterImage) {
@@ -330,17 +330,17 @@ nsVideoFrame::Reflow(nsPresContext* aPre
aReflowInput,
imageFrame,
availableSize,
&cbSize);
nsRect posterRenderRect;
if (ShouldDisplayPoster()) {
posterRenderRect =
- nsRect(nsPoint(mBorderPadding.left, mBorderPadding.top),
+ 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);
FinishReflowChild(imageFrame, aPresContext,
@@ -350,18 +350,18 @@ nsVideoFrame::Reflow(nsPresContext* aPre
// Android still uses XUL media controls & hence needs this XUL-friendly
// custom reflow code. This will go away in bug 1310907.
#ifdef ANDROID
} else if (child->GetContent() == mVideoControls) {
// Reflow the video controls frame.
nsBoxLayoutState boxState(PresContext(), aReflowInput.mRenderingContext);
nsBoxFrame::LayoutChildAt(boxState,
child,
- nsRect(mBorderPadding.left,
- mBorderPadding.top,
+ nsRect(borderPadding.left,
+ borderPadding.top,
aReflowInput.ComputedWidth(),
aReflowInput.ComputedHeight()));
#endif // ANDROID
} else if (child->GetContent() == mCaptionDiv ||
child->GetContent() == mVideoControls) {
// Reflow the caption and control bar frames.
WritingMode wm = child->GetWritingMode();
@@ -369,25 +369,25 @@ nsVideoFrame::Reflow(nsPresContext* aPre
availableSize.BSize(wm) = NS_UNCONSTRAINEDSIZE;
ReflowInput kidReflowInput(aPresContext,
aReflowInput,
child,
availableSize);
ReflowOutput kidDesiredSize(kidReflowInput);
ReflowChild(child, aPresContext, kidDesiredSize, kidReflowInput,
- mBorderPadding.left, mBorderPadding.top, 0, aStatus);
+ borderPadding.left, borderPadding.top, 0, aStatus);
if (child->GetContent() == mVideoControls && isBSizeShrinkWrapping) {
contentBoxBSize = kidDesiredSize.BSize(myWM);
}
FinishReflowChild(child, aPresContext,
kidDesiredSize, &kidReflowInput,
- mBorderPadding.left, mBorderPadding.top, 0);
+ borderPadding.left, borderPadding.top, 0);
}
if (child->GetContent() == mVideoControls && child->GetSize() != oldChildSize) {
RefPtr<Runnable> event = new DispatchResizeToControls(child->GetContent());
nsContentUtils::AddScriptRunner(event);
}
}
--- a/layout/generic/nsVideoFrame.h
+++ b/layout/generic/nsVideoFrame.h
@@ -125,18 +125,16 @@ protected:
// Sets the mPosterImage's src attribute to be the video's poster attribute,
// if we're the frame for a video element. Only call on frames for video
// elements, not for frames for audio elements.
void UpdatePosterSource(bool aNotify);
virtual ~nsVideoFrame();
- nsMargin mBorderPadding;
-
// Anonymous child which is bound via XBL to the video controls.
nsCOMPtr<nsIContent> mVideoControls;
// Anonymous child which is the image element of the poster frame.
nsCOMPtr<nsIContent> mPosterImage;
// Anonymous child which is the text track caption display div.
nsCOMPtr<nsIContent> mCaptionDiv;