DeCOMtaminate nsIPresShell::GetDidInitialReflow. (Bug 468645) r+sr=bzbarsky

This commit is contained in:
L. David Baron 2008-12-29 10:07:36 -05:00
parent 3f1a725a7f
commit 5380efc5c3
5 changed files with 5 additions and 25 deletions

View File

@ -1266,9 +1266,7 @@ nsContentSink::StartLayout(PRBool aIgnorePendingSheets)
// docshell in the iframe, and the content sink's call to OpenBody().
// (Bug 153815)
PRBool didInitialReflow = PR_FALSE;
shell->GetDidInitialReflow(&didInitialReflow);
if (didInitialReflow) {
if (shell->DidInitialReflow()) {
// XXX: The assumption here is that if something already
// called InitialReflow() on this shell, it also did some of
// the setup below, so we do nothing and just move on to the

View File

@ -279,9 +279,7 @@ nsMediaDocument::StartLayout()
nsPresShellIterator iter(this);
nsCOMPtr<nsIPresShell> shell;
while ((shell = iter.GetNextShell())) {
PRBool didInitialReflow = PR_FALSE;
shell->GetDidInitialReflow(&didInitialReflow);
if (didInitialReflow) {
if (shell->DidInitialReflow()) {
// Don't mess with this presshell: someone has already handled
// its initial reflow.
continue;

View File

@ -3888,10 +3888,8 @@ nsXULDocument::OverlayForwardReference::Resolve()
nsresult rv;
nsCOMPtr<nsIContent> target;
PRBool notify = PR_FALSE;
nsIPresShell *shell = mDocument->GetPrimaryShell();
if (shell)
shell->GetDidInitialReflow(&notify);
PRBool notify = shell && shell->DidInitialReflow();
nsAutoString id;
mOverlay->GetAttr(kNameSpaceID_None, nsGkAtoms::id, id);

View File

@ -270,11 +270,9 @@ public:
NS_IMETHOD EndObservingDocument() = 0;
/**
* Determine if InitialReflow() was previously called.
* @param aDidInitialReflow PR_TRUE if InitalReflow() was previously called,
* PR_FALSE otherwise.
* Return whether InitialReflow() was previously called.
*/
NS_IMETHOD GetDidInitialReflow(PRBool *aDidInitialReflow) = 0;
PRBool DidInitialReflow() const { return mDidInitialReflow; }
/**
* Perform the initial reflow. Constructs the frame for the root content

View File

@ -804,7 +804,6 @@ public:
NS_IMETHOD BeginObservingDocument();
NS_IMETHOD EndObservingDocument();
NS_IMETHOD GetDidInitialReflow(PRBool *aDidInitialReflow);
NS_IMETHOD InitialReflow(nscoord aWidth, nscoord aHeight);
NS_IMETHOD ResizeReflow(nscoord aWidth, nscoord aHeight);
NS_IMETHOD StyleChangeReflow();
@ -2316,17 +2315,6 @@ static void CheckForFocus(nsPIDOMWindow* aOurWindow,
aFocusController->SetFocusedWindow(aOurWindow);
}
NS_IMETHODIMP
PresShell::GetDidInitialReflow(PRBool *aDidInitialReflow)
{
if (!aDidInitialReflow)
return NS_ERROR_FAILURE;
*aDidInitialReflow = mDidInitialReflow;
return NS_OK;
}
NS_IMETHODIMP
PresShell::InitialReflow(nscoord aWidth, nscoord aHeight)
{