зеркало из https://github.com/mozilla/gecko-dev.git
fix hack for getting selection to "Really" update the frame
This commit is contained in:
Родитель
af8a9c4ee1
Коммит
dbe82d4fb3
|
@ -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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче