fix review by sfrasier, approved choffman. simple fix to get first letter style frames/paragraphs to show their selection. simply notifies children that the selection bit should be "on"

git-svn-id: svn://10.0.0.236/trunk@52870 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mjudge%netscape.com
1999-11-05 22:09:16 +00:00
parent c8cc3fe9b2
commit b476111e67
2 changed files with 36 additions and 0 deletions

View File

@@ -49,6 +49,9 @@ public:
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
NS_IMETHOD SetSelected(nsIPresContext* aPresContext, nsIDOMRange *aRange,PRBool aSelected, nsSpread aSpread);
NS_IMETHOD FindTextRuns(nsLineLayout& aLineLayout);
protected:
@@ -152,6 +155,21 @@ nsFirstLetterFrame::SetInitialChildList(nsIPresContext& aPresContext,
return NS_OK;
}
NS_IMETHODIMP
nsFirstLetterFrame::SetSelected(nsIPresContext* aPresContext, nsIDOMRange *aRange,PRBool aSelected, nsSpread aSpread)
{
if (aSelected && ParentDisablesSelection())
return NS_OK;
nsIFrame *child;
nsresult result = FirstChild(nsnull, &child);
while (NS_SUCCEEDED(result) && child)
{
child->SetSelected(aPresContext,aRange, aSelected,aSpread);//dont worry about result. there are more frames to come
result = child->GetNextSibling(&child);
}
return NS_OK;
}
NS_IMETHODIMP
nsFirstLetterFrame::FindTextRuns(nsLineLayout& aLineLayout)
{