Commit a435cf3e authored by troy%netscape.com's avatar troy%netscape.com
Browse files

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
parent dbaf2fe6
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -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,
+3 −0
Original line number Diff line number Diff line
@@ -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);
+16 −0
Original line number Diff line number Diff line
@@ -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,
+3 −0
Original line number Diff line number Diff line
@@ -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);