fixing bugs for unnecessary drawing in text fram as well as other assorted selection bugs.

This commit is contained in:
mjudge%netscape.com 1999-04-28 02:43:02 +00:00
Родитель 4a78156dd6
Коммит a9b5f267ff
2 изменённых файлов: 14 добавлений и 14 удалений

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

@ -1841,13 +1841,6 @@ nsTextFrame::SetSelected(nsIDOMRange *aRange,PRBool aSelected, PRBool aSpread)
else
found = PR_FALSE;
}
if (found){ //if range contains this frame...
/* nsRect frameRect;
GetRect(frameRect);
nsRect rect(0, 0, frameRect.width, frameRect.height);
Invalidate(rect, PR_FALSE);
*/ ForceDrawFrame(this);
}
nsFrameState frameState;
GetFrameState(&frameState);
if ( aSelected )
@ -1855,6 +1848,13 @@ nsTextFrame::SetSelected(nsIDOMRange *aRange,PRBool aSelected, PRBool aSpread)
else
frameState &= ~NS_FRAME_SELECTED_CONTENT;
SetFrameState(frameState);
if (found){ //if range contains this frame...
nsRect frameRect;
GetRect(frameRect);
nsRect rect(0, 0, frameRect.width, frameRect.height);
Invalidate(rect, PR_TRUE);
// ForceDrawFrame(this);
}
return NS_OK;
}

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

@ -1841,13 +1841,6 @@ nsTextFrame::SetSelected(nsIDOMRange *aRange,PRBool aSelected, PRBool aSpread)
else
found = PR_FALSE;
}
if (found){ //if range contains this frame...
/* nsRect frameRect;
GetRect(frameRect);
nsRect rect(0, 0, frameRect.width, frameRect.height);
Invalidate(rect, PR_FALSE);
*/ ForceDrawFrame(this);
}
nsFrameState frameState;
GetFrameState(&frameState);
if ( aSelected )
@ -1855,6 +1848,13 @@ nsTextFrame::SetSelected(nsIDOMRange *aRange,PRBool aSelected, PRBool aSpread)
else
frameState &= ~NS_FRAME_SELECTED_CONTENT;
SetFrameState(frameState);
if (found){ //if range contains this frame...
nsRect frameRect;
GetRect(frameRect);
nsRect rect(0, 0, frameRect.width, frameRect.height);
Invalidate(rect, PR_TRUE);
// ForceDrawFrame(this);
}
return NS_OK;
}