зеркало из https://github.com/mozilla/gecko-dev.git
Fixed bug to allow boxes to have elements inserted and removed from them dynamically.
This commit is contained in:
Родитель
4b7b87047f
Коммит
d4c9d53169
|
@ -104,6 +104,55 @@ nsBoxFrame::Paint(nsIPresContext& aPresContext,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
void
|
||||
nsBoxFrame::Reflow(nsIPresShell& aPresShell)
|
||||
{
|
||||
// generate a reflow command for "this"
|
||||
nsIReflowCommand* reflowCmd = nsnull;
|
||||
rv = NS_NewHTMLReflowCommand(&reflowCmd, target,
|
||||
nsIReflowCommand::ReflowDirty);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
aPresShell.AppendReflowCommand(reflowCmd);
|
||||
NS_RELEASE(reflowCmd);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBoxFrame::RemoveFrame(nsIPresContext& aPresContext,
|
||||
nsIPresShell& aPresShell,
|
||||
nsIAtom* aListName,
|
||||
nsIFrame* aOldFrame)
|
||||
{
|
||||
// remove the child frame
|
||||
nsresult rv = nsHTMLContainerFrame::RemoveFrame(aPresContext, aPresShell, aListName, aOldFrame);
|
||||
mFrames.DeleteFrame(aPresContext, aOldFrame);
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBoxFrame::InsertFrames(nsIPresContext& aPresContext,
|
||||
nsIPresShell& aPresShell,
|
||||
nsIAtom* aListName,
|
||||
nsIFrame* aPrevFrame,
|
||||
nsIFrame* aFrameList)
|
||||
{
|
||||
mFrames.InsertFrames(nsnull, aPrevFrame, aFrameList);
|
||||
return nsHTMLContainerFrame::InsertFrames(aPresContext, aPresShell, aListName, aPrevFrame, aFrameList);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBoxFrame::AppendFrames(nsIPresContext& aPresContext,
|
||||
nsIPresShell& aPresShell,
|
||||
nsIAtom* aListName,
|
||||
nsIFrame* aFrameList)
|
||||
{
|
||||
mFrames.AppendFrames(nsnull, aFrameList);
|
||||
return nsHTMLContainerFrame::AppendFrames(aPresContext, aPresShell, aListName, aFrameList);
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBoxFrame::FlowChildAt(nsIFrame* childFrame,
|
||||
nsIPresContext& aPresContext,
|
||||
|
|
|
@ -94,13 +94,13 @@ public:
|
|||
PRInt32 aHint);
|
||||
|
||||
|
||||
// nsIHTMLReflow overrides
|
||||
// nsIHTMLReflow overrides
|
||||
NS_IMETHOD Reflow(nsIPresContext& aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus);
|
||||
|
||||
NS_IMETHOD Paint(nsIPresContext& aPresContext,
|
||||
NS_IMETHOD Paint(nsIPresContext& aPresContext,
|
||||
nsIRenderingContext& aRenderingContext,
|
||||
const nsRect& aDirtyRect,
|
||||
nsFramePaintLayer aWhichLayer);
|
||||
|
@ -110,10 +110,26 @@ public:
|
|||
nsEventStatus& aEventStatus);
|
||||
|
||||
|
||||
PRBool IsHorizontal() const { return mHorizontal; }
|
||||
NS_IMETHOD AppendFrames(nsIPresContext& aPresContext,
|
||||
nsIPresShell& aPresShell,
|
||||
nsIAtom* aListName,
|
||||
nsIFrame* aFrameList);
|
||||
|
||||
NS_IMETHOD InsertFrames(nsIPresContext& aPresContext,
|
||||
nsIPresShell& aPresShell,
|
||||
nsIAtom* aListName,
|
||||
nsIFrame* aPrevFrame,
|
||||
nsIFrame* aFrameList);
|
||||
|
||||
NS_IMETHOD RemoveFrame(nsIPresContext& aPresContext,
|
||||
nsIPresShell& aPresShell,
|
||||
nsIAtom* aListName,
|
||||
nsIFrame* aOldFrame);
|
||||
|
||||
PRBool IsHorizontal() const { return mHorizontal; }
|
||||
|
||||
protected:
|
||||
nsBoxFrame();
|
||||
nsBoxFrame();
|
||||
|
||||
virtual void GetDesiredSize(nsIPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
|
@ -121,7 +137,6 @@ protected:
|
|||
|
||||
virtual PRIntn GetSkipSides() const { return 0; }
|
||||
|
||||
|
||||
virtual void GetInset(nsMargin& margin);
|
||||
|
||||
virtual void Stretch(nsBoxDataSpring* springs, PRInt32 nSprings, nscoord& size);
|
||||
|
|
Загрузка…
Ссылка в новой задаче