Split HTMLEditor::Indent() for internal use

RESOLVED FIXED in Firefox 63

Status

()

enhancement
RESOLVED FIXED
11 months ago
11 months ago

People

(Reporter: masayuki, Assigned: masayuki)

Tracking

Trunk
mozilla63
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox63 fixed)

Details

Attachments

(1 attachment)

nsIHTMLEditor::Indent() is used for handling Tab key in HandleKeyPressEvent()
and used for implementing indent/outdent commands.  Unfortunately, it takes
string argument to switch between indent or outdent.  So, it does not make
sense to use this in C++ code.

This patch creates IndentAsAction() and OutdentAsAction() as public methods
and the implementation is moved to IndentOrOutdentAsSubAction() which takes
EditSubAction to switch between indent and outdent.

Note that HandleKeyPressEvent() uses the new public methods.  However, this
is not problem for the future changes since HandleKeyPressEvent() is an
exception which may call other public methods.
Comment on attachment 8999562 [details]
Bug 1482018 - Create non-virtual methods of nsIHTMLEditor::Indent() equivalents

Makoto Kato [:m_kato] has approved the revision.
Attachment #8999562 - Flags: review+
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/f0819f9d226d
Create non-virtual methods of nsIHTMLEditor::Indent() equivalents r=m_kato
https://hg.mozilla.org/mozilla-central/rev/f0819f9d226d
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.