зеркало из https://github.com/mozilla/pjs.git
23169: Fix uninitialized variables, including one which was disallowing splitting lines by hitting return. r=jfrancis
This commit is contained in:
Родитель
95a9138fae
Коммит
016e5d6225
|
@ -1447,7 +1447,7 @@ nsEditor::EndComposition(void)
|
||||||
{
|
{
|
||||||
if (!mInIMEMode) return NS_OK; // nothing to do
|
if (!mInIMEMode) return NS_OK; // nothing to do
|
||||||
|
|
||||||
nsresult result;
|
nsresult result = NS_OK;
|
||||||
|
|
||||||
// commit the IME transaction..we can get at it via the transaction mgr.
|
// commit the IME transaction..we can get at it via the transaction mgr.
|
||||||
// Note that this means IME won't work without an undo stack!
|
// Note that this means IME won't work without an undo stack!
|
||||||
|
@ -2159,7 +2159,7 @@ nsEditor::SplitNodeImpl(nsIDOMNode * aExistingRightNode,
|
||||||
{
|
{
|
||||||
// get selection
|
// get selection
|
||||||
nsCOMPtr<nsIDOMSelection> selection;
|
nsCOMPtr<nsIDOMSelection> selection;
|
||||||
GetSelection(getter_AddRefs(selection));
|
result = GetSelection(getter_AddRefs(selection));
|
||||||
if (NS_FAILED(result)) return result;
|
if (NS_FAILED(result)) return result;
|
||||||
if (!selection) return NS_ERROR_NULL_POINTER;
|
if (!selection) return NS_ERROR_NULL_POINTER;
|
||||||
|
|
||||||
|
|
|
@ -1324,7 +1324,9 @@ NS_IMETHODIMP nsHTMLEditor::DeleteSelection(nsIEditor::EDirection aAction)
|
||||||
result = selCont->IntraLineMove(PR_TRUE, PR_TRUE);
|
result = selCont->IntraLineMove(PR_TRUE, PR_TRUE);
|
||||||
aAction = eNone;
|
aAction = eNone;
|
||||||
break;
|
break;
|
||||||
default: break; // avoid compiler warnings
|
default: // avoid several compiler warnings
|
||||||
|
result = NS_OK;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (NS_FAILED(result))
|
if (NS_FAILED(result))
|
||||||
{
|
{
|
||||||
|
@ -4601,7 +4603,7 @@ void nsHTMLEditor::ResetTextSelectionForRange(nsIDOMNode *aParent,
|
||||||
{
|
{
|
||||||
if (!aParent || !aSelection) { return; } // XXX: should return an error
|
if (!aParent || !aSelection) { return; } // XXX: should return an error
|
||||||
nsCOMPtr<nsIDOMNode> startNode, endNode;
|
nsCOMPtr<nsIDOMNode> startNode, endNode;
|
||||||
PRInt32 startOffset, endOffset;
|
PRInt32 startOffset=0, endOffset=0;
|
||||||
|
|
||||||
nsresult result;
|
nsresult result;
|
||||||
nsCOMPtr<nsIContentIterator> iter;
|
nsCOMPtr<nsIContentIterator> iter;
|
||||||
|
|
|
@ -1447,7 +1447,7 @@ nsEditor::EndComposition(void)
|
||||||
{
|
{
|
||||||
if (!mInIMEMode) return NS_OK; // nothing to do
|
if (!mInIMEMode) return NS_OK; // nothing to do
|
||||||
|
|
||||||
nsresult result;
|
nsresult result = NS_OK;
|
||||||
|
|
||||||
// commit the IME transaction..we can get at it via the transaction mgr.
|
// commit the IME transaction..we can get at it via the transaction mgr.
|
||||||
// Note that this means IME won't work without an undo stack!
|
// Note that this means IME won't work without an undo stack!
|
||||||
|
@ -2159,7 +2159,7 @@ nsEditor::SplitNodeImpl(nsIDOMNode * aExistingRightNode,
|
||||||
{
|
{
|
||||||
// get selection
|
// get selection
|
||||||
nsCOMPtr<nsIDOMSelection> selection;
|
nsCOMPtr<nsIDOMSelection> selection;
|
||||||
GetSelection(getter_AddRefs(selection));
|
result = GetSelection(getter_AddRefs(selection));
|
||||||
if (NS_FAILED(result)) return result;
|
if (NS_FAILED(result)) return result;
|
||||||
if (!selection) return NS_ERROR_NULL_POINTER;
|
if (!selection) return NS_ERROR_NULL_POINTER;
|
||||||
|
|
||||||
|
|
|
@ -1324,7 +1324,9 @@ NS_IMETHODIMP nsHTMLEditor::DeleteSelection(nsIEditor::EDirection aAction)
|
||||||
result = selCont->IntraLineMove(PR_TRUE, PR_TRUE);
|
result = selCont->IntraLineMove(PR_TRUE, PR_TRUE);
|
||||||
aAction = eNone;
|
aAction = eNone;
|
||||||
break;
|
break;
|
||||||
default: break; // avoid compiler warnings
|
default: // avoid several compiler warnings
|
||||||
|
result = NS_OK;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (NS_FAILED(result))
|
if (NS_FAILED(result))
|
||||||
{
|
{
|
||||||
|
@ -4601,7 +4603,7 @@ void nsHTMLEditor::ResetTextSelectionForRange(nsIDOMNode *aParent,
|
||||||
{
|
{
|
||||||
if (!aParent || !aSelection) { return; } // XXX: should return an error
|
if (!aParent || !aSelection) { return; } // XXX: should return an error
|
||||||
nsCOMPtr<nsIDOMNode> startNode, endNode;
|
nsCOMPtr<nsIDOMNode> startNode, endNode;
|
||||||
PRInt32 startOffset, endOffset;
|
PRInt32 startOffset=0, endOffset=0;
|
||||||
|
|
||||||
nsresult result;
|
nsresult result;
|
||||||
nsCOMPtr<nsIContentIterator> iter;
|
nsCOMPtr<nsIContentIterator> iter;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче