new selection code for dead areas. this is much better, trust me. the block frame now will look at its best line and look for a spot to select. if it finds another block frame now, it will continue the process in a while loop. each time looking for best x and y area. this reuses the code located in GetNextPrevLine.

git-svn-id: svn://10.0.0.236/trunk@45529 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mjudge%netscape.com
1999-09-01 21:40:16 +00:00
parent fa54e221ee
commit d9a3b1a319
10 changed files with 502 additions and 580 deletions

View File

@@ -907,6 +907,9 @@ nsTextFrame::PaintTextDecorations(nsIRenderingContext& aRenderingContext,
aRenderingContext.SetColor(NS_RGB(128,0,255));
aRenderingContext.FillRect(aX, aY + baseline - offset, aWidth, size);
}break;
default:
NS_ASSERTION(0,"what type of selection do i not know about?");
break;
}
}
@@ -1977,11 +1980,6 @@ nsTextFrame::PeekOffset(nsIFocusTracker *aTracker,
if (aStartOffset < mContentOffset){
aStartOffset = mContentOffset;
}
if (aAmount == eSelectLine)
{
return nsFrame::PeekOffset(aTracker, aDesiredX, aAmount, aDirection, aStartOffset,
aResultContent, aContentOffset, aResultFrame,aEatingWS);
}
if (aStartOffset > (mContentOffset + mContentLength)){
nsIFrame *nextInFlow;
nextInFlow = GetNextInFlow();
@@ -1993,6 +1991,11 @@ nsTextFrame::PeekOffset(nsIFocusTracker *aTracker,
aResultContent,aContentOffset,aResultFrame,aEatingWS);
}
if (aAmount == eSelectLine)
{
return nsFrame::PeekOffset(aTracker, aDesiredX, aAmount, aDirection, aStartOffset,
aResultContent, aContentOffset, aResultFrame,aEatingWS);
}
PRUnichar wordBufMem[WORD_BUF_SIZE];
PRUnichar paintBufMem[TEXT_BUF_SIZE];