Backed out changeset 9395a7b2e54c (bug 876426) for crashtest timeouts on a CLOSED TREE

This commit is contained in:
Ed Morley 2013-05-28 08:50:53 +01:00
parent 4fdd56680e
commit 8c071cdb0c

View File

@ -234,20 +234,6 @@ nsVideoFrame::BuildLayer(nsDisplayListBuilder* aBuilder,
return result.forget();
}
class DispatchResizeToControls : public nsRunnable
{
public:
DispatchResizeToControls(nsIContent* aContent)
: mContent(aContent) {}
NS_IMETHOD Run() {
nsContentUtils::DispatchTrustedEvent(mContent->OwnerDoc(), mContent,
NS_LITERAL_STRING("resize"),
false, false);
return NS_OK;
}
nsCOMPtr<nsIContent> mContent;
};
NS_IMETHODIMP
nsVideoFrame::Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aMetrics,
@ -321,17 +307,12 @@ nsVideoFrame::Reflow(nsPresContext* aPresContext,
} else if (child->GetContent() == mVideoControls) {
// Reflow the video controls frame.
nsBoxLayoutState boxState(PresContext(), aReflowState.rendContext);
nsSize size = child->GetSize();
nsBoxFrame::LayoutChildAt(boxState,
child,
nsRect(mBorderPadding.left,
mBorderPadding.top,
aReflowState.ComputedWidth(),
aReflowState.ComputedHeight()));
if (child->GetSize() != size) {
nsRefPtr<nsRunnable> event = new DispatchResizeToControls(child->GetContent());
nsContentUtils::AddScriptRunner(event);
}
} else if (child->GetContent() == mCaptionDiv) {
// Reflow to caption div
nsHTMLReflowMetrics kidDesiredSize;