mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-09 14:28:25 +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)
|
if (state & NS_FRAME_INDEPENDENT_SELECTION)
|
||||||
{
|
{
|
||||||
nsIFrame *tmp = this;
|
nsIFrame *tmp = this;
|
||||||
nsIFrame *parent;
|
while ( NS_SUCCEEDED(tmp->GetParent(&tmp)) && tmp)
|
||||||
while ( NS_SUCCEEDED(tmp->GetParent(&parent)) && parent)
|
|
||||||
{
|
{
|
||||||
parent->GetFrameState(&state);
|
tmp->GetFrameState(&state);
|
||||||
if (! (state & NS_FRAME_INDEPENDENT_SELECTION)) //we have found the nsGfx*
|
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);
|
return castParent->GetSelectionController(aPresContext, aSelCon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1925,13 +1925,12 @@ nsFrame::GetSelectionController(nsIPresContext *aPresContext, nsISelectionContro
|
|||||||
if (state & NS_FRAME_INDEPENDENT_SELECTION)
|
if (state & NS_FRAME_INDEPENDENT_SELECTION)
|
||||||
{
|
{
|
||||||
nsIFrame *tmp = this;
|
nsIFrame *tmp = this;
|
||||||
nsIFrame *parent;
|
while ( NS_SUCCEEDED(tmp->GetParent(&tmp)) && tmp)
|
||||||
while ( NS_SUCCEEDED(tmp->GetParent(&parent)) && parent)
|
|
||||||
{
|
{
|
||||||
parent->GetFrameState(&state);
|
tmp->GetFrameState(&state);
|
||||||
if (! (state & NS_FRAME_INDEPENDENT_SELECTION)) //we have found the nsGfx*
|
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);
|
return castParent->GetSelectionController(aPresContext, aSelCon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user