Strip carriage returns from nsVideoFrame.cpp r=chris.double (bug 386142)

This commit is contained in:
fantasai 2009-10-06 00:37:46 -07:00
parent d3c9f1936e
commit 670dd80cf4

View file

@ -219,27 +219,27 @@ nsVideoFrame::Reflow(nsPresContext* aPresContext,
if (child->GetType() == nsGkAtoms::imageFrame) { if (child->GetType() == nsGkAtoms::imageFrame) {
// Reflow the poster frame. // Reflow the poster frame.
nsImageFrame* imageFrame = static_cast<nsImageFrame*>(child); nsImageFrame* imageFrame = static_cast<nsImageFrame*>(child);
nsHTMLReflowMetrics kidDesiredSize; nsHTMLReflowMetrics kidDesiredSize;
nsSize availableSize = nsSize(aReflowState.availableWidth, nsSize availableSize = nsSize(aReflowState.availableWidth,
aReflowState.availableHeight); aReflowState.availableHeight);
nsHTMLReflowState kidReflowState(aPresContext, nsHTMLReflowState kidReflowState(aPresContext,
aReflowState, aReflowState,
imageFrame, imageFrame,
availableSize, availableSize,
aMetrics.width, aMetrics.width,
aMetrics.height); aMetrics.height);
if (ShouldDisplayPoster()) { if (ShouldDisplayPoster()) {
kidReflowState.SetComputedWidth(aReflowState.ComputedWidth()); kidReflowState.SetComputedWidth(aReflowState.ComputedWidth());
kidReflowState.SetComputedHeight(aReflowState.ComputedHeight()); kidReflowState.SetComputedHeight(aReflowState.ComputedHeight());
} else { } else {
kidReflowState.SetComputedWidth(0); kidReflowState.SetComputedWidth(0);
kidReflowState.SetComputedHeight(0); kidReflowState.SetComputedHeight(0);
} }
ReflowChild(imageFrame, aPresContext, kidDesiredSize, kidReflowState, ReflowChild(imageFrame, aPresContext, kidDesiredSize, kidReflowState,
mBorderPadding.left, mBorderPadding.top, 0, aStatus); mBorderPadding.left, mBorderPadding.top, 0, aStatus);
FinishReflowChild(imageFrame, aPresContext, FinishReflowChild(imageFrame, aPresContext,
&kidReflowState, kidDesiredSize, &kidReflowState, kidDesiredSize,
mBorderPadding.left, mBorderPadding.top, 0); mBorderPadding.left, mBorderPadding.top, 0);
} else if (child->GetType() == nsGkAtoms::boxFrame) { } else if (child->GetType() == nsGkAtoms::boxFrame) {
// Reflow the video controls frame. // Reflow the video controls frame.
nsBoxLayoutState boxState(PresContext(), aReflowState.rendContext); nsBoxLayoutState boxState(PresContext(), aReflowState.rendContext);
@ -432,9 +432,9 @@ nsSize nsVideoFrame::GetIntrinsicSize(nsIRenderingContext *aRenderingContext)
if (child && child->GetType() == nsGkAtoms::imageFrame) { if (child && child->GetType() == nsGkAtoms::imageFrame) {
nsImageFrame* imageFrame = static_cast<nsImageFrame*>(child); nsImageFrame* imageFrame = static_cast<nsImageFrame*>(child);
nsSize imgsize; nsSize imgsize;
imageFrame->GetIntrinsicImageSize(imgsize); imageFrame->GetIntrinsicImageSize(imgsize);
return imgsize; return imgsize;
} }
} }
if (!HasVideoData()) { if (!HasVideoData()) {