From 485cc4d8936a28ce6efb562ae712b3631069e1f0 Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Thu, 6 Nov 2008 19:45:37 +0000 Subject: [PATCH] Bug 460803. Start layout more like the content sinks do. r+sr=sicking, a=dveditz git-svn-id: svn://10.0.0.236/trunk@254918 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/html/document/src/nsMediaDocument.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mozilla/content/html/document/src/nsMediaDocument.cpp b/mozilla/content/html/document/src/nsMediaDocument.cpp index 20df54534d5..1ef208cf51d 100644 --- a/mozilla/content/html/document/src/nsMediaDocument.cpp +++ b/mozilla/content/html/document/src/nsMediaDocument.cpp @@ -269,8 +269,15 @@ nsMediaDocument::StartLayout() nsPresShellIterator iter(this); nsCOMPtr shell; while ((shell = iter.GetNextShell())) { + PRBool didInitialReflow = PR_FALSE; + shell->GetDidInitialReflow(&didInitialReflow); + if (didInitialReflow) { + // Don't mess with this presshell: someone has already handled + // its initial reflow. + continue; + } + nsRect visibleArea = shell->GetPresContext()->GetVisibleArea(); - nsCOMPtr shellGrip = shell; nsresult rv = shell->InitialReflow(visibleArea.width, visibleArea.height); NS_ENSURE_SUCCESS(rv, rv);