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