Reinstated hack to have the placeholder frame forward the DidReflow() notification

to the floated frame. Needed until the block frame properly handles FirstChild()
and returns the list of floated frames
This commit is contained in:
troy%netscape.com 1998-11-16 18:33:21 +00:00
parent dbaf2fe659
commit a435cf3ef5
4 changed files with 38 additions and 0 deletions

View File

@ -54,6 +54,22 @@ nsPlaceholderFrame::~nsPlaceholderFrame()
{
}
// XXX Major hack...
NS_IMETHODIMP
nsPlaceholderFrame::DidReflow(nsIPresContext& aPresContext, nsDidReflowStatus aStatus)
{
// XXX Floated frames aren't being returned by block's FirstChild() member function
// so make sure they get a DidReflow notification
if (nsnull != mAnchoredItem) {
nsIHTMLReflow* htmlReflow;
if (NS_SUCCEEDED(mAnchoredItem->QueryInterface(kIHTMLReflowIID, (void**)&htmlReflow))) {
htmlReflow->DidReflow(aPresContext, aStatus);
}
}
return nsFrame::DidReflow(aPresContext, aStatus);
}
NS_IMETHODIMP
nsPlaceholderFrame::Reflow(nsIPresContext& aPresContext,
nsHTMLReflowMetrics& aDesiredSize,

View File

@ -48,6 +48,9 @@ public:
nsReflowStatus& aStatus);
// nsIFrame overrides
NS_IMETHOD DidReflow(nsIPresContext& aPresContext,
nsDidReflowStatus aStatus);
NS_IMETHOD Paint(nsIPresContext& aPresContext,
nsIRenderingContext& aRenderingContext,
const nsRect& aDirtyRect);

View File

@ -54,6 +54,22 @@ nsPlaceholderFrame::~nsPlaceholderFrame()
{
}
// XXX Major hack...
NS_IMETHODIMP
nsPlaceholderFrame::DidReflow(nsIPresContext& aPresContext, nsDidReflowStatus aStatus)
{
// XXX Floated frames aren't being returned by block's FirstChild() member function
// so make sure they get a DidReflow notification
if (nsnull != mAnchoredItem) {
nsIHTMLReflow* htmlReflow;
if (NS_SUCCEEDED(mAnchoredItem->QueryInterface(kIHTMLReflowIID, (void**)&htmlReflow))) {
htmlReflow->DidReflow(aPresContext, aStatus);
}
}
return nsFrame::DidReflow(aPresContext, aStatus);
}
NS_IMETHODIMP
nsPlaceholderFrame::Reflow(nsIPresContext& aPresContext,
nsHTMLReflowMetrics& aDesiredSize,

View File

@ -48,6 +48,9 @@ public:
nsReflowStatus& aStatus);
// nsIFrame overrides
NS_IMETHOD DidReflow(nsIPresContext& aPresContext,
nsDidReflowStatus aStatus);
NS_IMETHOD Paint(nsIPresContext& aPresContext,
nsIRenderingContext& aRenderingContext,
const nsRect& aDirtyRect);