Commented out all calls to HACKForceRedraw(). We now call it from

nsEditor::EndTransaction().
This commit is contained in:
kin%netscape.com 1999-05-17 13:31:56 +00:00
Родитель bc8ba48be5
Коммит f8cbcb8a7f
5 изменённых файлов: 57 добавлений и 35 удалений

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

@ -749,21 +749,25 @@ NS_IMETHODIMP
nsEditor::BeginTransaction()
{
NS_PRECONDITION(mUpdateCount>=0, "bad state");
nsCOMPtr<nsIDOMSelection>selection;
nsresult selectionResult = GetSelection(getter_AddRefs(selection));
if (NS_SUCCEEDED(selectionResult) && selection) {
selection->StartBatchChanges();
}
if (nsnull!=mViewManager)
{
if (0==mUpdateCount)
mViewManager->DisableRefresh();
mUpdateCount++;
}
if ((nsITransactionManager *)nsnull!=mTxnMgr.get())
{
mTxnMgr->BeginBatch();
}
nsCOMPtr<nsIDOMSelection>selection;
nsresult selectionResult = GetSelection(getter_AddRefs(selection));
if (NS_SUCCEEDED(selectionResult) && selection) {
selection->StartBatchChanges();
}
return NS_OK;
}
@ -771,21 +775,28 @@ NS_IMETHODIMP
nsEditor::EndTransaction()
{
NS_PRECONDITION(mUpdateCount>0, "bad state");
if (nsnull!=mViewManager)
{
mUpdateCount--;
if (0==mUpdateCount)
mViewManager->EnableRefresh();
}
if ((nsITransactionManager *)nsnull!=mTxnMgr.get())
{
mTxnMgr->EndBatch();
}
if (nsnull!=mViewManager)
{
mUpdateCount--;
if (0==mUpdateCount)
{
mViewManager->EnableRefresh();
HACKForceRedraw();
}
}
nsCOMPtr<nsIDOMSelection>selection;
nsresult selectionResult = GetSelection(getter_AddRefs(selection));
if (NS_SUCCEEDED(selectionResult) && selection) {
selection->EndBatchChanges();
}
return NS_OK;
}
@ -1320,7 +1331,7 @@ NS_IMETHODIMP nsEditor::DeleteText(nsIDOMCharacterData *aElement,
nsresult result = CreateTxnForDeleteText(aElement, aOffset, aLength, &txn);
if (NS_SUCCEEDED(result)) {
result = Do(txn);
HACKForceRedraw();
// HACKForceRedraw();
}
return result;
}
@ -3022,7 +3033,7 @@ nsEditor::SetPreeditText(const nsString& aStringToInsert)
mIMESelectionRange->SetEnd(node, offset);
EndTransaction();
HACKForceRedraw();
// HACKForceRedraw();
return result;
}

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

@ -229,7 +229,7 @@ NS_IMETHODIMP nsHTMLEditor::InsertBreak()
// of an error in Gecko which is not rendering the
// document after a change via the DOM - gpk 2/13/99
// BEGIN HACK!!!
HACKForceRedraw();
// HACKForceRedraw();
// END HACK
return result;
@ -258,7 +258,7 @@ NS_IMETHODIMP nsHTMLEditor::SetParagraphFormat(const nsString& aParagraphFormat)
// of an error in Gecko which is not rendering the
// document after a change via the DOM - gpk 2/13/99
// BEGIN HACK!!!
HACKForceRedraw();
// HACKForceRedraw();
// END HACK
return result;
@ -1846,7 +1846,7 @@ nsHTMLEditor::InsertElement(nsIDOMElement* aElement, PRBool aDeleteSelection, ns
// of an error in Gecko which is not rendering the
// document after a change via the DOM - gpk 2/13/99
// BEGIN HACK!!!
HACKForceRedraw();
// HACKForceRedraw();
// END HACK
return result;

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

@ -451,7 +451,7 @@ NS_IMETHODIMP nsTextEditor::SetTextProperty(nsIAtom *aProperty,
}
if (gNoisy) {DebugDumpContent(); } // DEBUG
//HACK TO DRAW CHANGES
HACKForceRedraw();
// HACKForceRedraw();
//END HACK
return result;
}
@ -796,7 +796,7 @@ NS_IMETHODIMP nsTextEditor::DeleteSelection(nsIEditor::ECollapsedSelectionAction
// of an error in Gecko which is not rendering the
// document after a change via the DOM - gpk 2/13/99
// BEGIN HACK!!!
HACKForceRedraw();
// HACKForceRedraw();
// END HACK
return result;
@ -830,7 +830,7 @@ NS_IMETHODIMP nsTextEditor::InsertText(const nsString& aStringToInsert)
placeholderTxn->SetAbsorb(PR_FALSE); // this ends the merging of txns into placeholderTxn
// BEGIN HACK!!!
HACKForceRedraw();
// HACKForceRedraw();
// END HACK
return result;
}

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

@ -749,21 +749,25 @@ NS_IMETHODIMP
nsEditor::BeginTransaction()
{
NS_PRECONDITION(mUpdateCount>=0, "bad state");
nsCOMPtr<nsIDOMSelection>selection;
nsresult selectionResult = GetSelection(getter_AddRefs(selection));
if (NS_SUCCEEDED(selectionResult) && selection) {
selection->StartBatchChanges();
}
if (nsnull!=mViewManager)
{
if (0==mUpdateCount)
mViewManager->DisableRefresh();
mUpdateCount++;
}
if ((nsITransactionManager *)nsnull!=mTxnMgr.get())
{
mTxnMgr->BeginBatch();
}
nsCOMPtr<nsIDOMSelection>selection;
nsresult selectionResult = GetSelection(getter_AddRefs(selection));
if (NS_SUCCEEDED(selectionResult) && selection) {
selection->StartBatchChanges();
}
return NS_OK;
}
@ -771,21 +775,28 @@ NS_IMETHODIMP
nsEditor::EndTransaction()
{
NS_PRECONDITION(mUpdateCount>0, "bad state");
if (nsnull!=mViewManager)
{
mUpdateCount--;
if (0==mUpdateCount)
mViewManager->EnableRefresh();
}
if ((nsITransactionManager *)nsnull!=mTxnMgr.get())
{
mTxnMgr->EndBatch();
}
if (nsnull!=mViewManager)
{
mUpdateCount--;
if (0==mUpdateCount)
{
mViewManager->EnableRefresh();
HACKForceRedraw();
}
}
nsCOMPtr<nsIDOMSelection>selection;
nsresult selectionResult = GetSelection(getter_AddRefs(selection));
if (NS_SUCCEEDED(selectionResult) && selection) {
selection->EndBatchChanges();
}
return NS_OK;
}
@ -1320,7 +1331,7 @@ NS_IMETHODIMP nsEditor::DeleteText(nsIDOMCharacterData *aElement,
nsresult result = CreateTxnForDeleteText(aElement, aOffset, aLength, &txn);
if (NS_SUCCEEDED(result)) {
result = Do(txn);
HACKForceRedraw();
// HACKForceRedraw();
}
return result;
}
@ -3022,7 +3033,7 @@ nsEditor::SetPreeditText(const nsString& aStringToInsert)
mIMESelectionRange->SetEnd(node, offset);
EndTransaction();
HACKForceRedraw();
// HACKForceRedraw();
return result;
}

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

@ -229,7 +229,7 @@ NS_IMETHODIMP nsHTMLEditor::InsertBreak()
// of an error in Gecko which is not rendering the
// document after a change via the DOM - gpk 2/13/99
// BEGIN HACK!!!
HACKForceRedraw();
// HACKForceRedraw();
// END HACK
return result;
@ -258,7 +258,7 @@ NS_IMETHODIMP nsHTMLEditor::SetParagraphFormat(const nsString& aParagraphFormat)
// of an error in Gecko which is not rendering the
// document after a change via the DOM - gpk 2/13/99
// BEGIN HACK!!!
HACKForceRedraw();
// HACKForceRedraw();
// END HACK
return result;
@ -1846,7 +1846,7 @@ nsHTMLEditor::InsertElement(nsIDOMElement* aElement, PRBool aDeleteSelection, ns
// of an error in Gecko which is not rendering the
// document after a change via the DOM - gpk 2/13/99
// BEGIN HACK!!!
HACKForceRedraw();
// HACKForceRedraw();
// END HACK
return result;