mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 19:33:18 +00:00
bad infiniteloop fix
This commit is contained in:
parent
c30da52a01
commit
450040c157
@ -1925,13 +1925,12 @@ nsFrame::GetSelectionController(nsIPresContext *aPresContext, nsISelectionContro
|
||||
if (state & NS_FRAME_INDEPENDENT_SELECTION)
|
||||
{
|
||||
nsIFrame *tmp = this;
|
||||
nsIFrame *parent;
|
||||
while ( NS_SUCCEEDED(tmp->GetParent(&parent)) && parent)
|
||||
while ( NS_SUCCEEDED(tmp->GetParent(&tmp)) && tmp)
|
||||
{
|
||||
parent->GetFrameState(&state);
|
||||
tmp->GetFrameState(&state);
|
||||
if (! (state & NS_FRAME_INDEPENDENT_SELECTION)) //we have found the nsGfx*
|
||||
{
|
||||
nsFrame* castParent = NS_STATIC_CAST(nsFrame *,parent);
|
||||
nsFrame* castParent = NS_STATIC_CAST(nsFrame *,tmp);
|
||||
return castParent->GetSelectionController(aPresContext, aSelCon);
|
||||
}
|
||||
}
|
||||
|
@ -1925,13 +1925,12 @@ nsFrame::GetSelectionController(nsIPresContext *aPresContext, nsISelectionContro
|
||||
if (state & NS_FRAME_INDEPENDENT_SELECTION)
|
||||
{
|
||||
nsIFrame *tmp = this;
|
||||
nsIFrame *parent;
|
||||
while ( NS_SUCCEEDED(tmp->GetParent(&parent)) && parent)
|
||||
while ( NS_SUCCEEDED(tmp->GetParent(&tmp)) && tmp)
|
||||
{
|
||||
parent->GetFrameState(&state);
|
||||
tmp->GetFrameState(&state);
|
||||
if (! (state & NS_FRAME_INDEPENDENT_SELECTION)) //we have found the nsGfx*
|
||||
{
|
||||
nsFrame* castParent = NS_STATIC_CAST(nsFrame *,parent);
|
||||
nsFrame* castParent = NS_STATIC_CAST(nsFrame *,tmp);
|
||||
return castParent->GetSelectionController(aPresContext, aSelCon);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user