Making tree scrolling faster.

This commit is contained in:
hyatt%netscape.com 2000-01-08 02:18:14 +00:00
parent 1bd556c060
commit f8c91fadf4
3 changed files with 11 additions and 2 deletions

View File

@ -1878,7 +1878,7 @@ nsXULElement::AppendChildTo(nsIContent* aKid, PRBool aNotify)
NS_PRECONDITION((nsnull != aKid) && (aKid != NS_STATIC_CAST(nsIStyledContent*, this)), "null ptr");
if (! mChildren) {
if (!mChildren) {
rv = NS_NewISupportsArray(getter_AddRefs(mChildren));
if (NS_FAILED(rv)) return rv;
}

View File

@ -231,7 +231,16 @@ nsBoxFrame::Init(nsIPresContext* aPresContext,
nsSpaceManager* spaceManager = new nsSpaceManager(this);
mInner->mSpaceManager = spaceManager;
#ifdef DEBUG_evaughan
// This function is incredibly expensive in profiles. Unless it can be optimized, and
// because it's being used for debug purposes only, this call is being commented out.
// Contact hyatt@netscape.com if you have any questions. Do not put it back in
// until the speed issues with the pseudostyle probes have been resolved, as this
// call substantially impacts box performance.
mInner->UpdatePseudoElements(aPresContext);
#endif
mInner->mHorizontal = GetInitialAlignment();
return rv;
}

View File

@ -1878,7 +1878,7 @@ nsXULElement::AppendChildTo(nsIContent* aKid, PRBool aNotify)
NS_PRECONDITION((nsnull != aKid) && (aKid != NS_STATIC_CAST(nsIStyledContent*, this)), "null ptr");
if (! mChildren) {
if (!mChildren) {
rv = NS_NewISupportsArray(getter_AddRefs(mChildren));
if (NS_FAILED(rv)) return rv;
}