Closed Bug 1482018 Opened 2 years ago Closed 2 years ago

Split HTMLEditor::Indent() 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

(1 file)

No description provided.
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: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.