"Michael R" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Hi Boris ,
>
> Here is what I found :
> I see that nsDocument::ContentAppended() is called. Inside 
> nsDocument::ContentAppended() I see different nsDocumentChangeObservers 
> called .
> Among those observers is the PresShell.
> When PresShell::ContentAppended()  is called somehow the value of 
> mDidInitialReflow equals PR_FALSE.
> The function PresShell::ContentAppended() does nothing is it checks 
> mDidInitialReflow vaule and exits is if it's PR_FALSE!
> As far as I can see mDidInitialReflow is set to PR_TRUE when 
> PresShell::InitialReflow() is called.
> So now it remains to understand why the PresShell::InitialReflow() wasn't 
> called ?
> Do you have any idea  ?
>
> Thanks,
> Michael.

The following code overcomes the problem :
   nsCOMPtr<nsIDocument> doc = do_QueryInterface(mMainDoc);
   nsCOMPtr<nsIPresShell> shell = doc ->GetShellAt(0) ;
   if (shell)
      shell->InitialReflow(height,width);
But why wasn't this done automatically ?


_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to