141888 sr=kin r=brade patch to fix too agressive caret disabling from readonly textareas/input areas.

This commit is contained in:
mjudge%netscape.com 2002-08-07 00:01:11 +00:00
Родитель 777f04355b
Коммит 7024b7e81d
2 изменённых файлов: 42 добавлений и 2 удалений

Просмотреть файл

@ -623,6 +623,8 @@ public:
NS_IMETHOD SetHint(nsIFrameSelection::HINT aHint);
NS_IMETHOD SetScrollableView(nsIScrollableView *aScrollableView);
NS_IMETHOD GetScrollableView(nsIScrollableView **aScrollableView);
NS_IMETHOD SetMouseDoubleDown(PRBool aDoubleDown);
NS_IMETHOD GetMouseDoubleDown(PRBool *aDoubleDown);
#ifdef IBMBIDI
NS_IMETHOD GetPrevNextBidiLevels(nsIPresContext *aPresContext,
nsIContent *aNode,
@ -1223,6 +1225,20 @@ NS_IMETHODIMP nsTextInputSelectionImpl::GetScrollableView(nsIScrollableView **aS
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsTextInputSelectionImpl::SetMouseDoubleDown(PRBool aDoubleDown)
{
if(mFrameSelection)
return mFrameSelection->SetMouseDoubleDown(aDoubleDown);
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsTextInputSelectionImpl::GetMouseDoubleDown(PRBool *aDoubleDown)
{
if(mFrameSelection)
return mFrameSelection->GetMouseDoubleDown(aDoubleDown);
return NS_ERROR_FAILURE;
}
#ifdef IBMBIDI
NS_IMETHODIMP nsTextInputSelectionImpl::GetPrevNextBidiLevels(nsIPresContext *aPresContext,
nsIContent *aNode,
@ -2193,7 +2209,11 @@ nsTextControlFrame::CreateAnonymousContent(nsIPresContext* aPresContext,
{
if (mSelCon)
{
mSelCon->SetCaretEnabled(PR_FALSE);
//do not turn caret enabled off at this time. the caret will behave
//dependant on the focused frame it is in. disabling it here has
//an adverse affect on the browser in caret display mode or the editor
//when a readonly/disabled text form is in the page. bug 141888
//mSelCon->SetCaretEnabled(PR_FALSE);
if (editorFlags & nsIPlaintextEditor::eEditorDisabledMask)
mSelCon->SetDisplaySelection(nsISelectionController::SELECTION_OFF);

Просмотреть файл

@ -623,6 +623,8 @@ public:
NS_IMETHOD SetHint(nsIFrameSelection::HINT aHint);
NS_IMETHOD SetScrollableView(nsIScrollableView *aScrollableView);
NS_IMETHOD GetScrollableView(nsIScrollableView **aScrollableView);
NS_IMETHOD SetMouseDoubleDown(PRBool aDoubleDown);
NS_IMETHOD GetMouseDoubleDown(PRBool *aDoubleDown);
#ifdef IBMBIDI
NS_IMETHOD GetPrevNextBidiLevels(nsIPresContext *aPresContext,
nsIContent *aNode,
@ -1223,6 +1225,20 @@ NS_IMETHODIMP nsTextInputSelectionImpl::GetScrollableView(nsIScrollableView **aS
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsTextInputSelectionImpl::SetMouseDoubleDown(PRBool aDoubleDown)
{
if(mFrameSelection)
return mFrameSelection->SetMouseDoubleDown(aDoubleDown);
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsTextInputSelectionImpl::GetMouseDoubleDown(PRBool *aDoubleDown)
{
if(mFrameSelection)
return mFrameSelection->GetMouseDoubleDown(aDoubleDown);
return NS_ERROR_FAILURE;
}
#ifdef IBMBIDI
NS_IMETHODIMP nsTextInputSelectionImpl::GetPrevNextBidiLevels(nsIPresContext *aPresContext,
nsIContent *aNode,
@ -2193,7 +2209,11 @@ nsTextControlFrame::CreateAnonymousContent(nsIPresContext* aPresContext,
{
if (mSelCon)
{
mSelCon->SetCaretEnabled(PR_FALSE);
//do not turn caret enabled off at this time. the caret will behave
//dependant on the focused frame it is in. disabling it here has
//an adverse affect on the browser in caret display mode or the editor
//when a readonly/disabled text form is in the page. bug 141888
//mSelCon->SetCaretEnabled(PR_FALSE);
if (editorFlags & nsIPlaintextEditor::eEditorDisabledMask)
mSelCon->SetDisplaySelection(nsISelectionController::SELECTION_OFF);