fix hack for getting selection to "Really" update the frame
git-svn-id: svn://10.0.0.236/trunk@24091 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1513,8 +1513,20 @@ nsFrame::SetSelected(nsSelectionStruct *aSelStruct)
|
||||
|
||||
nsRect rect;
|
||||
GetRect(rect);
|
||||
ForceDrawFrame(this);//invalidate does not work in all cases.
|
||||
//Invalidate(rect,PR_TRUE); //false is for not immediate
|
||||
nsIFrame *frame = this;
|
||||
nsIFrame *firstframe = nsnull;
|
||||
while (NS_SUCCEEDED(frame->GetPrevInFlow(&frame)) && frame){
|
||||
firstframe = frame;
|
||||
}
|
||||
|
||||
if (firstframe){
|
||||
nsRect rect2;
|
||||
firstframe->GetRect(rect2);
|
||||
rect.y-= rect.y-rect2.y;
|
||||
}
|
||||
|
||||
//ForceDrawFrame(this);//invalidate does not work in all cases.
|
||||
Invalidate(rect,PR_FALSE); //false is for not immediate
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -1513,8 +1513,20 @@ nsFrame::SetSelected(nsSelectionStruct *aSelStruct)
|
||||
|
||||
nsRect rect;
|
||||
GetRect(rect);
|
||||
ForceDrawFrame(this);//invalidate does not work in all cases.
|
||||
//Invalidate(rect,PR_TRUE); //false is for not immediate
|
||||
nsIFrame *frame = this;
|
||||
nsIFrame *firstframe = nsnull;
|
||||
while (NS_SUCCEEDED(frame->GetPrevInFlow(&frame)) && frame){
|
||||
firstframe = frame;
|
||||
}
|
||||
|
||||
if (firstframe){
|
||||
nsRect rect2;
|
||||
firstframe->GetRect(rect2);
|
||||
rect.y-= rect.y-rect2.y;
|
||||
}
|
||||
|
||||
//ForceDrawFrame(this);//invalidate does not work in all cases.
|
||||
Invalidate(rect,PR_FALSE); //false is for not immediate
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user