Ensure the caret is refreshed after the text frame containing it is redrawn

This commit is contained in:
sfraser%netscape.com 1999-02-13 04:46:47 +00:00
Родитель b539de0aa9
Коммит 1d7f1dd556
2 изменённых файлов: 20 добавлений и 2 удалений

Просмотреть файл

@ -859,9 +859,12 @@ TextFrame::PaintUnicodeText(nsIPresContext& aPresContext,
PaintTextDecorations(aRenderingContext, aStyleContext,
aTextStyle, dx, dy, width);
// aRenderingContext.GetWidth(text, PRUint32(si.mStartOffset), textWidth);
shell->RefreshCaret();
#ifdef SHOW_SELECTION_CURSOR
aRenderingContext.GetWidth(text, PRUint32(selectionOffset), textWidth);
#ifdef SHOW_SELECTION_CURSOR
RenderSelectionCursor(aRenderingContext,
dx + textWidth, dy, mRect.height,
CURSOR_COLOR);
@ -1191,6 +1194,9 @@ TextFrame::PaintTextSlowly(nsIPresContext& aPresContext,
if (si.mEmptySelection) {
RenderString(aRenderingContext, aStyleContext, aTextStyle,
text, textLength, dx, dy, width);
shell->RefreshCaret();
#ifdef SHOW_SELECTION_CURSOR
GetWidth(aRenderingContext, aTextStyle,
@ -1337,6 +1343,9 @@ TextFrame::PaintAsciiText(nsIPresContext& aPresContext,
PaintTextDecorations(aRenderingContext, aStyleContext,
aTextStyle, dx, dy, width);
// aRenderingContext.GetWidth(text, PRUint32(si.mStartOffset), textWidth);
shell->RefreshCaret();
#ifdef SHOW_SELECTION_CURSOR
aRenderingContext.GetWidth(text, PRUint32(selectionOffset), textWidth);
RenderSelectionCursor(aRenderingContext,

Просмотреть файл

@ -859,9 +859,12 @@ TextFrame::PaintUnicodeText(nsIPresContext& aPresContext,
PaintTextDecorations(aRenderingContext, aStyleContext,
aTextStyle, dx, dy, width);
// aRenderingContext.GetWidth(text, PRUint32(si.mStartOffset), textWidth);
shell->RefreshCaret();
#ifdef SHOW_SELECTION_CURSOR
aRenderingContext.GetWidth(text, PRUint32(selectionOffset), textWidth);
#ifdef SHOW_SELECTION_CURSOR
RenderSelectionCursor(aRenderingContext,
dx + textWidth, dy, mRect.height,
CURSOR_COLOR);
@ -1191,6 +1194,9 @@ TextFrame::PaintTextSlowly(nsIPresContext& aPresContext,
if (si.mEmptySelection) {
RenderString(aRenderingContext, aStyleContext, aTextStyle,
text, textLength, dx, dy, width);
shell->RefreshCaret();
#ifdef SHOW_SELECTION_CURSOR
GetWidth(aRenderingContext, aTextStyle,
@ -1337,6 +1343,9 @@ TextFrame::PaintAsciiText(nsIPresContext& aPresContext,
PaintTextDecorations(aRenderingContext, aStyleContext,
aTextStyle, dx, dy, width);
// aRenderingContext.GetWidth(text, PRUint32(si.mStartOffset), textWidth);
shell->RefreshCaret();
#ifdef SHOW_SELECTION_CURSOR
aRenderingContext.GetWidth(text, PRUint32(selectionOffset), textWidth);
RenderSelectionCursor(aRenderingContext,