Closed Bug 1482012 Opened 7 years ago Closed 7 years ago

Split HTMLEditor::Paste() for internal use

Categories

(Core :: DOM: Editor, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(2 files)

HTMLEditor::Paste() is an override of nsIEditor. So, it's virtual and public. We should use protected method for internal use and should make it non-virtual if possible. This patch creates PasteInternal() which is a protected non-virtual method.
User may paste a lot with pressing Accel+V for a while (i.e., with auto repeat). So, calling nsIEditor::Paste() may be in a hot path and we can now make non-virtual public method with AsHTMLEditor().
Comment on attachment 8998759 [details] Bug 1482012 - part 1: Create HTMLEditor::PasteInternal() for internal use Makoto Kato [:m_kato] has approved the revision.
Attachment #8998759 - Flags: review+
Comment on attachment 8998760 [details] Bug 1482012 - part 2: Create TextEditor::PasteAsAction() as non-virtual method for outer C++ code Makoto Kato [:m_kato] has approved the revision.
Attachment #8998760 - Flags: review+
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/b11bd5b080a2 part 1: Create HTMLEditor::PasteInternal() for internal use r=m_kato
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/a415ada9fdae part 2: Create TextEditor::PasteAsAction() as non-virtual method for outer C++ code 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: