зеркало из https://github.com/mozilla/gecko-dev.git
adding batch changes around editor BeginTransaction. bug 4593
This commit is contained in:
Родитель
9a83dd0a53
Коммит
0f03b6a5f0
|
@ -766,6 +766,11 @@ nsEditor::BeginTransaction()
|
|||
{
|
||||
mTxnMgr->BeginBatch();
|
||||
}
|
||||
nsCOMPtr<nsIDOMSelection>selection;
|
||||
nsresult selectionResult = GetSelection(getter_AddRefs(selection));
|
||||
if (NS_SUCCEEDED(selectionResult) && selection) {
|
||||
selection->StartBatchChanges();
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -783,6 +788,11 @@ nsEditor::EndTransaction()
|
|||
{
|
||||
mTxnMgr->EndBatch();
|
||||
}
|
||||
nsCOMPtr<nsIDOMSelection>selection;
|
||||
nsresult selectionResult = GetSelection(getter_AddRefs(selection));
|
||||
if (NS_SUCCEEDED(selectionResult) && selection) {
|
||||
selection->EndBatchChanges();
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -766,6 +766,11 @@ nsEditor::BeginTransaction()
|
|||
{
|
||||
mTxnMgr->BeginBatch();
|
||||
}
|
||||
nsCOMPtr<nsIDOMSelection>selection;
|
||||
nsresult selectionResult = GetSelection(getter_AddRefs(selection));
|
||||
if (NS_SUCCEEDED(selectionResult) && selection) {
|
||||
selection->StartBatchChanges();
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -783,6 +788,11 @@ nsEditor::EndTransaction()
|
|||
{
|
||||
mTxnMgr->EndBatch();
|
||||
}
|
||||
nsCOMPtr<nsIDOMSelection>selection;
|
||||
nsresult selectionResult = GetSelection(getter_AddRefs(selection));
|
||||
if (NS_SUCCEEDED(selectionResult) && selection) {
|
||||
selection->EndBatchChanges();
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче