From 52087d5ee4cba6e925fa5f1f3e56f86ea98df477 Mon Sep 17 00:00:00 2001 From: "kipp%netscape.com" Date: Wed, 15 Sep 1999 00:26:10 +0000 Subject: [PATCH] Disabled (obsolete?) usage of MoveInSpaceManager git-svn-id: svn://10.0.0.236/trunk@47474 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsBlockReflowContext.cpp | 13 +++++++++---- .../layout/html/base/src/nsBlockReflowContext.cpp | 13 +++++++++---- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/mozilla/layout/generic/nsBlockReflowContext.cpp b/mozilla/layout/generic/nsBlockReflowContext.cpp index ff01ad6cfec..d57e2f63f46 100644 --- a/mozilla/layout/generic/nsBlockReflowContext.cpp +++ b/mozilla/layout/generic/nsBlockReflowContext.cpp @@ -377,17 +377,19 @@ nsBlockReflowContext::PlaceBlock(PRBool aForceFit, #endif } +#if XXX // For empty blocks we revert the y coordinate back so that the // top margin is no longer applied. - nsIHTMLReflow* htmlReflow; - nsresult rv = mFrame->QueryInterface(kIHTMLReflowIID, (void**)&htmlReflow); + nsBlockFrame* bf; + nsresult rv = mFrame->QueryInterface(kBlockFrameCID, (void**)&bf); if (NS_SUCCEEDED(rv)) { // XXX This isn't good enough. What if the floater was placed // downward, just below another floater? nscoord dy = mSpace.y - mY; - htmlReflow->MoveInSpaceManager(mPresContext, - mOuterReflowState.mSpaceManager, 0, dy); + bf->MoveInSpaceManager(mPresContext, mOuterReflowState.mSpaceManager, + dy); } +#endif y = mSpace.y; // Empty blocks do not have anything special done to them and they @@ -523,6 +525,8 @@ nsBlockReflowContext::PlaceBlock(PRBool aForceFit, // Now place the frame mFrame->SetRect(nsRect(x, y, mMetrics.width, mMetrics.height)); +// XXX obsolete, i believe... +#if 0 // If the block frame ended up moving then we need to slide // anything inside of it that impacts the space manager // (otherwise the impacted space in the space manager will be @@ -541,6 +545,7 @@ nsBlockReflowContext::PlaceBlock(PRBool aForceFit, dx, dy); } } +#endif // Adjust the max-element-size in the metrics to take into // account the margins around the block element. Note that we diff --git a/mozilla/layout/html/base/src/nsBlockReflowContext.cpp b/mozilla/layout/html/base/src/nsBlockReflowContext.cpp index ff01ad6cfec..d57e2f63f46 100644 --- a/mozilla/layout/html/base/src/nsBlockReflowContext.cpp +++ b/mozilla/layout/html/base/src/nsBlockReflowContext.cpp @@ -377,17 +377,19 @@ nsBlockReflowContext::PlaceBlock(PRBool aForceFit, #endif } +#if XXX // For empty blocks we revert the y coordinate back so that the // top margin is no longer applied. - nsIHTMLReflow* htmlReflow; - nsresult rv = mFrame->QueryInterface(kIHTMLReflowIID, (void**)&htmlReflow); + nsBlockFrame* bf; + nsresult rv = mFrame->QueryInterface(kBlockFrameCID, (void**)&bf); if (NS_SUCCEEDED(rv)) { // XXX This isn't good enough. What if the floater was placed // downward, just below another floater? nscoord dy = mSpace.y - mY; - htmlReflow->MoveInSpaceManager(mPresContext, - mOuterReflowState.mSpaceManager, 0, dy); + bf->MoveInSpaceManager(mPresContext, mOuterReflowState.mSpaceManager, + dy); } +#endif y = mSpace.y; // Empty blocks do not have anything special done to them and they @@ -523,6 +525,8 @@ nsBlockReflowContext::PlaceBlock(PRBool aForceFit, // Now place the frame mFrame->SetRect(nsRect(x, y, mMetrics.width, mMetrics.height)); +// XXX obsolete, i believe... +#if 0 // If the block frame ended up moving then we need to slide // anything inside of it that impacts the space manager // (otherwise the impacted space in the space manager will be @@ -541,6 +545,7 @@ nsBlockReflowContext::PlaceBlock(PRBool aForceFit, dx, dy); } } +#endif // Adjust the max-element-size in the metrics to take into // account the margins around the block element. Note that we