mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 05:15:45 +00:00
DeCOMtaminate nsIPresShell::GetDidInitialReflow. (Bug 468645) r+sr=bzbarsky
This commit is contained in:
parent
3f1a725a7f
commit
5380efc5c3
@ -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
|
||||
|
@ -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;
|
||||
|
@ -3888,10 +3888,8 @@ nsXULDocument::OverlayForwardReference::Resolve()
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIContent> target;
|
||||
|
||||
PRBool notify = PR_FALSE;
|
||||
nsIPresShell *shell = mDocument->GetPrimaryShell();
|
||||
if (shell)
|
||||
shell->GetDidInitialReflow(¬ify);
|
||||
PRBool notify = shell && shell->DidInitialReflow();
|
||||
|
||||
nsAutoString id;
|
||||
mOverlay->GetAttr(kNameSpaceID_None, nsGkAtoms::id, id);
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user