Added methods to support justification

This commit is contained in:
kipp%netscape.com 1998-10-27 16:51:21 +00:00
parent 274d1bc566
commit a6731c54fe
5 changed files with 73 additions and 14 deletions

View File

@ -1187,17 +1187,35 @@ nsFrame::FindTextRuns(nsLineLayout& aLineLayout)
return NS_OK;
}
NS_IMETHODIMP nsFrame::ContentChanged(nsIPresContext* aPresContext,
nsIContent* aChild,
nsISupports* aSubContent)
NS_IMETHODIMP
nsFrame::AdjustFrameSize(nscoord aExtraSpace, nscoord& aUsedSpace)
{
aUsedSpace = 0;
return NS_OK;
}
NS_IMETHODIMP
nsFrame::TrimTrailingWhiteSpace(nsIPresContext& aPresContext,
nsIRenderingContext& aRC,
nscoord& aDeltaWidth)
{
aDeltaWidth = 0;
return NS_OK;
}
NS_IMETHODIMP
nsFrame::ContentChanged(nsIPresContext* aPresContext,
nsIContent* aChild,
nsISupports* aSubContent)
{
return NS_OK;
}
NS_IMETHODIMP nsFrame::AttributeChanged(nsIPresContext* aPresContext,
nsIContent* aChild,
nsIAtom* aAttribute,
PRInt32 aHint)
NS_IMETHODIMP
nsFrame::AttributeChanged(nsIPresContext* aPresContext,
nsIContent* aChild,
nsIAtom* aAttribute,
PRInt32 aHint)
{
return NS_OK;
}

View File

@ -208,6 +208,12 @@ public:
NS_IMETHOD GetReflowMetrics(nsIPresContext& aPresContext,
nsHTMLReflowMetrics& aMetrics);
NS_IMETHOD FindTextRuns(nsLineLayout& aLineLayout);
NS_IMETHOD AdjustFrameSize(nscoord aExtraSpace, nscoord& aUsedSpace);
NS_IMETHOD TrimTrailingWhiteSpace(nsIPresContext& aPresContext,
nsIRenderingContext& aRC,
nscoord& aDeltaWidth);
//@}
// Selection Methods

View File

@ -1187,17 +1187,35 @@ nsFrame::FindTextRuns(nsLineLayout& aLineLayout)
return NS_OK;
}
NS_IMETHODIMP nsFrame::ContentChanged(nsIPresContext* aPresContext,
nsIContent* aChild,
nsISupports* aSubContent)
NS_IMETHODIMP
nsFrame::AdjustFrameSize(nscoord aExtraSpace, nscoord& aUsedSpace)
{
aUsedSpace = 0;
return NS_OK;
}
NS_IMETHODIMP
nsFrame::TrimTrailingWhiteSpace(nsIPresContext& aPresContext,
nsIRenderingContext& aRC,
nscoord& aDeltaWidth)
{
aDeltaWidth = 0;
return NS_OK;
}
NS_IMETHODIMP
nsFrame::ContentChanged(nsIPresContext* aPresContext,
nsIContent* aChild,
nsISupports* aSubContent)
{
return NS_OK;
}
NS_IMETHODIMP nsFrame::AttributeChanged(nsIPresContext* aPresContext,
nsIContent* aChild,
nsIAtom* aAttribute,
PRInt32 aHint)
NS_IMETHODIMP
nsFrame::AttributeChanged(nsIPresContext* aPresContext,
nsIContent* aChild,
nsIAtom* aAttribute,
PRInt32 aHint)
{
return NS_OK;
}

View File

@ -208,6 +208,12 @@ public:
NS_IMETHOD GetReflowMetrics(nsIPresContext& aPresContext,
nsHTMLReflowMetrics& aMetrics);
NS_IMETHOD FindTextRuns(nsLineLayout& aLineLayout);
NS_IMETHOD AdjustFrameSize(nscoord aExtraSpace, nscoord& aUsedSpace);
NS_IMETHOD TrimTrailingWhiteSpace(nsIPresContext& aPresContext,
nsIRenderingContext& aRC,
nscoord& aDeltaWidth);
//@}
// Selection Methods

View File

@ -282,6 +282,17 @@ public:
// Helper method used by block reflow to identify runs of text so that
// proper word-breaking can be done.
NS_IMETHOD FindTextRuns(nsLineLayout& aLineLayout) = 0;
// Justification helper method used to distribute extra space in a
// line to leaf frames. aUsedSpace is filled in with the amount of
// space actually used.
NS_IMETHOD AdjustFrameSize(nscoord aExtraSpace, nscoord& aUsedSpace) = 0;
// Justification helper method that is used to remove trailing
// whitespace before justification.
NS_IMETHOD TrimTrailingWhiteSpace(nsIPresContext& aPresContext,
nsIRenderingContext& aRC,
nscoord& aDeltaWidth) = 0;
};
//----------------------------------------------------------------------