Added a hack to make sure that the floated frame gets a DidReflow notification

This commit is contained in:
troy%netscape.com 1998-11-07 00:03:45 +00:00
parent 1d6d94539e
commit 5befa347fb
4 changed files with 38 additions and 0 deletions

View File

@ -55,6 +55,23 @@ nsPlaceholderFrame::~nsPlaceholderFrame()
{ {
} }
// XXX Major hack...
NS_IMETHODIMP
nsPlaceholderFrame::DidReflow(nsIPresContext& aPresContext, nsDidReflowStatus aStatus)
{
// XXX Floated frame isn't in the block frame's list of children so make
// sure it gets 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);
}
// XXX Major hack...
NS_IMETHODIMP NS_IMETHODIMP
nsPlaceholderFrame::DeleteFrame(nsIPresContext& aPresContext) nsPlaceholderFrame::DeleteFrame(nsIPresContext& aPresContext)
{ {

View File

@ -47,6 +47,8 @@ public:
nsReflowStatus& aStatus); nsReflowStatus& aStatus);
// nsIFrame overrides // nsIFrame overrides
NS_IMETHOD DidReflow(nsIPresContext& aPresContext,
nsDidReflowStatus aStatus);
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext);
NS_IMETHOD Paint(nsIPresContext& aPresContext, NS_IMETHOD Paint(nsIPresContext& aPresContext,

View File

@ -55,6 +55,23 @@ nsPlaceholderFrame::~nsPlaceholderFrame()
{ {
} }
// XXX Major hack...
NS_IMETHODIMP
nsPlaceholderFrame::DidReflow(nsIPresContext& aPresContext, nsDidReflowStatus aStatus)
{
// XXX Floated frame isn't in the block frame's list of children so make
// sure it gets 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);
}
// XXX Major hack...
NS_IMETHODIMP NS_IMETHODIMP
nsPlaceholderFrame::DeleteFrame(nsIPresContext& aPresContext) nsPlaceholderFrame::DeleteFrame(nsIPresContext& aPresContext)
{ {

View File

@ -47,6 +47,8 @@ public:
nsReflowStatus& aStatus); nsReflowStatus& aStatus);
// nsIFrame overrides // nsIFrame overrides
NS_IMETHOD DidReflow(nsIPresContext& aPresContext,
nsDidReflowStatus aStatus);
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext);
NS_IMETHOD Paint(nsIPresContext& aPresContext, NS_IMETHOD Paint(nsIPresContext& aPresContext,