зеркало из https://github.com/mozilla/pjs.git
Bug 657160 - Remove NS_NewCaret; r=ehsan,roc
This commit is contained in:
Родитель
87c61fd2e9
Коммит
ac07777124
|
@ -552,15 +552,11 @@ nsEditorEventListener::DragEnter(nsIDOMDragEvent* aDragEvent)
|
||||||
nsCOMPtr<nsIPresShell> presShell = GetPresShell();
|
nsCOMPtr<nsIPresShell> presShell = GetPresShell();
|
||||||
NS_ENSURE_TRUE(presShell, NS_OK);
|
NS_ENSURE_TRUE(presShell, NS_OK);
|
||||||
|
|
||||||
if (!mCaret)
|
if (!mCaret) {
|
||||||
{
|
mCaret = new nsCaret();
|
||||||
NS_NewCaret(getter_AddRefs(mCaret));
|
|
||||||
if (mCaret)
|
|
||||||
{
|
|
||||||
mCaret->Init(presShell);
|
mCaret->Init(presShell);
|
||||||
mCaret->SetCaretReadOnly(PR_TRUE);
|
mCaret->SetCaretReadOnly(PR_TRUE);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
presShell->SetCaret(mCaret);
|
presShell->SetCaret(mCaret);
|
||||||
|
|
||||||
|
|
|
@ -1183,17 +1183,3 @@ nsCaret::SetIgnoreUserModify(PRBool aIgnoreUserModify)
|
||||||
}
|
}
|
||||||
mIgnoreUserModify = aIgnoreUserModify;
|
mIgnoreUserModify = aIgnoreUserModify;
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
nsresult NS_NewCaret(nsCaret** aInstancePtrResult)
|
|
||||||
{
|
|
||||||
NS_PRECONDITION(aInstancePtrResult, "null ptr");
|
|
||||||
|
|
||||||
nsCaret* caret = new nsCaret();
|
|
||||||
if (nsnull == caret)
|
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
|
||||||
NS_ADDREF(caret);
|
|
||||||
*aInstancePtrResult = caret;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
* vim: set ts=2 sw=2 et tw=78:
|
/* vim: set ts=2 sw=2 et tw=78: */
|
||||||
*
|
/* ***** BEGIN LICENSE BLOCK *****
|
||||||
* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||||
*
|
*
|
||||||
* The contents of this file are subject to the Mozilla Public License Version
|
* The contents of this file are subject to the Mozilla Public License Version
|
||||||
|
@ -298,9 +297,6 @@ protected:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nsresult
|
|
||||||
NS_NewCaret(nsCaret** aInstancePtrResult);
|
|
||||||
|
|
||||||
// handy stack-based class for temporarily disabling the caret
|
// handy stack-based class for temporarily disabling the caret
|
||||||
|
|
||||||
class StCaretHider
|
class StCaretHider
|
||||||
|
|
|
@ -1850,12 +1850,9 @@ PresShell::Init(nsIDocument* aDocument,
|
||||||
// Important: this has to happen after the selection has been set up
|
// Important: this has to happen after the selection has been set up
|
||||||
#ifdef SHOW_CARET
|
#ifdef SHOW_CARET
|
||||||
// make the caret
|
// make the caret
|
||||||
nsresult err = NS_NewCaret(getter_AddRefs(mCaret));
|
mCaret = new nsCaret();
|
||||||
if (NS_SUCCEEDED(err))
|
|
||||||
{
|
|
||||||
mCaret->Init(this);
|
mCaret->Init(this);
|
||||||
mOriginalCaret = mCaret;
|
mOriginalCaret = mCaret;
|
||||||
}
|
|
||||||
|
|
||||||
//SetCaretEnabled(PR_TRUE); // make it show in browser windows
|
//SetCaretEnabled(PR_TRUE); // make it show in browser windows
|
||||||
#endif
|
#endif
|
||||||
|
|
Загрузка…
Ссылка в новой задаче