mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 13:57:32 +00:00

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. Differential Revision: https://phabricator.services.mozilla.com/D3202 --HG-- extra : moz-landing-system : lando