b=17546. Changed block frame code to save/restore space manager when create

a space manager, and changes button code to use the NS_BLOCK_SPACE_MGR flag
when creating the area frame


git-svn-id: svn://10.0.0.236/trunk@53199 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
troy%netscape.com
1999-11-11 06:00:41 +00:00
parent 7b9aae2779
commit 29fc759acb
8 changed files with 56 additions and 2 deletions

View File

@@ -1393,6 +1393,7 @@ nsBlockFrame::Reflow(nsIPresContext& aPresContext,
// Should we create a space manager?
nsCOMPtr<nsISpaceManager> spaceManager;
nsISpaceManager* oldSpaceManager = aReflowState.mSpaceManager;
if (NS_BLOCK_SPACE_MGR & mState) {
nsSpaceManager* rawPtr = new nsSpaceManager(this);
if (!rawPtr) {
@@ -1529,6 +1530,13 @@ nsBlockFrame::Reflow(nsIPresContext& aPresContext,
}
}
// If we set the space manager, then restore the old space manager now that we're
// going out of scope
if (NS_BLOCK_SPACE_MGR & mState) {
nsHTMLReflowState& reflowState = (nsHTMLReflowState&)aReflowState;
reflowState.mSpaceManager = oldSpaceManager;
}
#if 0
#ifdef NOISY_SPACEMANAGER
if (eReflowReason_Incremental == aReflowState.reason) {