Closed Bug 1482007 Opened 7 years ago Closed 7 years ago

Create a helper class to guarantee that nsIEditor::EndTransaction() is called after nsIEditor::BeginTransaction() call

Categories

(Core :: DOM: Editor, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(2 files)

No description provided.
This patch also creates non-virtual methods, EditorBase::BeginTransactionInternal(), EditorBase::EndTransactionInternal(), TransactionManager::BeginBatchInternal() and TransactionManager::EndBatchInternal(). Although, this could be replaced with API to use PlaceholderTransaction, we should investigate it when we have much time.
This patch also removes LOCK_DOC() and UNLOCK_DOC() from TextServiceDocument.cpp since they looks like we cannot use early-return style without call of UNLOCK_DOC() even after removing EndTransaction() calls. However, they are defined as empty. So, they do nothing even since first landing. Therefore, there is no reason to keep them.
Comment on attachment 8998751 [details] Bug 1482007 - part 1: Create a helper class to guarantee to call nsIEditor::EndTransaction() after nsIEditor::BeginTransaction() call Makoto Kato [:m_kato] has approved the revision.
Attachment #8998751 - Flags: review+
Comment on attachment 8998753 [details] Bug 1482007 - part 2: Make all callers of EditorBase::BeginTransaction() use AutoTransactionBatch Makoto Kato [:m_kato] has approved the revision.
Attachment #8998753 - Flags: review+
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/3392988c0894 part 1: Create a helper class to guarantee to call nsIEditor::EndTransaction() after nsIEditor::BeginTransaction() call r=m_kato
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/305478da57df part 2: Make all callers of EditorBase::BeginTransaction() use AutoTransactionBatch r=m_kato
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: