From aa97bbbd9868513af1058d68350b54b0476602f5 Mon Sep 17 00:00:00 2001 From: "mjudge%netscape.com" Date: Fri, 11 May 2001 18:51:43 +0000 Subject: [PATCH] reverting method for getting selection controller. this WAS to stop selection from snapping from outer document to inside the text field. unfortunately this caused a regression with copying. r= kin a= leaf git-svn-id: svn://10.0.0.236/trunk@94673 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsFrame.cpp | 6 +++--- mozilla/layout/html/base/src/nsFrame.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mozilla/layout/generic/nsFrame.cpp b/mozilla/layout/generic/nsFrame.cpp index d212020b381..82a71944165 100644 --- a/mozilla/layout/generic/nsFrame.cpp +++ b/mozilla/layout/generic/nsFrame.cpp @@ -2472,15 +2472,15 @@ nsFrame::GetSelectionController(nsIPresContext *aPresContext, nsISelectionContro if (state & NS_FRAME_INDEPENDENT_SELECTION) { nsIFrame *tmp = this; - nsresult result = tmp->GetParent(&tmp);//start one up from this one on the parent chain - while (NS_SUCCEEDED(result) && tmp) + while (tmp) { nsIGfxTextControlFrame2 *tcf; if (NS_SUCCEEDED(tmp->QueryInterface(NS_GET_IID(nsIGfxTextControlFrame2),(void**)&tcf))) { return tcf->GetSelectionContr(aSelCon); } - result = NS_FAILED(tmp->GetParent(&tmp)); + if (NS_FAILED(tmp->GetParent(&tmp))) + break; } } nsCOMPtr shell; diff --git a/mozilla/layout/html/base/src/nsFrame.cpp b/mozilla/layout/html/base/src/nsFrame.cpp index d212020b381..82a71944165 100644 --- a/mozilla/layout/html/base/src/nsFrame.cpp +++ b/mozilla/layout/html/base/src/nsFrame.cpp @@ -2472,15 +2472,15 @@ nsFrame::GetSelectionController(nsIPresContext *aPresContext, nsISelectionContro if (state & NS_FRAME_INDEPENDENT_SELECTION) { nsIFrame *tmp = this; - nsresult result = tmp->GetParent(&tmp);//start one up from this one on the parent chain - while (NS_SUCCEEDED(result) && tmp) + while (tmp) { nsIGfxTextControlFrame2 *tcf; if (NS_SUCCEEDED(tmp->QueryInterface(NS_GET_IID(nsIGfxTextControlFrame2),(void**)&tcf))) { return tcf->GetSelectionContr(aSelCon); } - result = NS_FAILED(tmp->GetParent(&tmp)); + if (NS_FAILED(tmp->GetParent(&tmp))) + break; } } nsCOMPtr shell;