gecko-dev/editor/libeditor
Masayuki Nakano 9405d61cb8 Bug 1546577 - Make overloads of CanCut(), CanCopy(), CanDelete() and CanPaste() which return bool instead of nsresult r=m_kato
`CanCut()`, `CanCopy()` and `CanPaste()` return error only when the editor has
already been destroyed or not been initialized yet, or when failed to access
clipboard when the document is not HTML/XHTML.

`CanDelete()` returns error only when the editor has already been destroyed or
not been initialized yet.

So, these error result won't be exposed to the web in most cases and such
exception shouldn't stop any content script because Chrome basically does not
throw exception in such situation as far as I know.

Therefore, there should be overloads of them to return `bool` result directly
for making their callers simpler.

Differential Revision: https://phabricator.services.mozilla.com/D28608

--HG--
extra : moz-landing-system : lando
2019-04-25 07:14:39 +00:00
..
crashtests Bug 1525481 - part 2: Make `EditorBase::DoSplitNode()` return error if split nodes are moved/removed unexpectedly r=m_kato 2019-02-25 08:29:38 +00:00
tests Backed out changeset 2ef93e029730 (bug 1535792) for ParseError: could not parse: (os == 'android') || ((debug && (os == 'linux') && (bits == 32)). On a CLOSED TREE 2019-04-23 10:59:21 +03:00
CSSEditUtils.cpp Bug 1539356 - Mark EditorBase::InsertNodeTransaction() as MOZ_CAN_RUN_SCRIPT r=m_kato 2019-03-30 11:55:29 +00:00
CSSEditUtils.h Bug 1539356 - Mark EditorBase::InsertNodeTransaction() as MOZ_CAN_RUN_SCRIPT r=m_kato 2019-03-30 11:55:29 +00:00
ChangeAttributeTransaction.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ChangeAttributeTransaction.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ChangeStyleTransaction.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ChangeStyleTransaction.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
CompositionTransaction.cpp Bug 1534561 - Make editor use PresShell directly rather than nsIPresShell r=m_kato 2019-03-15 05:01:10 +00:00
CompositionTransaction.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
CreateElementTransaction.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
CreateElementTransaction.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
DeleteNodeTransaction.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
DeleteNodeTransaction.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
DeleteRangeTransaction.cpp Bug 181137 - part 8: Make ContentIteratorBase and its subclasses non-refcountable r=smaug 2019-01-11 01:52:26 +00:00
DeleteRangeTransaction.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
DeleteTextTransaction.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
DeleteTextTransaction.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
EditAction.h Bug 1532527 - Support "insertFromPasteAsQuotation" inputType value r=smaug 2019-03-05 14:35:43 +00:00
EditActionListener.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
EditAggregateTransaction.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
EditAggregateTransaction.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
EditTransactionBase.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
EditTransactionBase.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
EditorBase.cpp Bug 1546577 - Make overloads of CanCut(), CanCopy(), CanDelete() and CanPaste() which return bool instead of nsresult r=m_kato 2019-04-25 07:14:39 +00:00
EditorBase.h Bug 1543315 - part 9: Mark nsIPresShell::FlushPendingNotifications() as MOZ_CAN_RUN_SCRIPT r=smaug 2019-04-13 12:43:57 +00:00
EditorCommands.cpp Bug 1546577 - Make overloads of CanCut(), CanCopy(), CanDelete() and CanPaste() which return bool instead of nsresult r=m_kato 2019-04-25 07:14:39 +00:00
EditorCommands.h Bug 1543966 - part 1: Make "editing commands" and "editor commands" singleton classes r=m_kato 2019-04-15 07:49:46 +00:00
EditorController.cpp Bug 1543966 - part 1: Make "editing commands" and "editor commands" singleton classes r=m_kato 2019-04-15 07:49:46 +00:00
EditorController.h Bug 1543966 - part 1: Make "editing commands" and "editor commands" singleton classes r=m_kato 2019-04-15 07:49:46 +00:00
EditorDOMPoint.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
EditorEventListener.cpp Bug 1534395 - Rename TabParent to BrowserParent. r=nika 2019-04-09 16:38:15 -05:00
EditorEventListener.h Bug 1539356 - Mark EditorBase::InsertNodeTransaction() as MOZ_CAN_RUN_SCRIPT r=m_kato 2019-03-30 11:55:29 +00:00
EditorUtils.cpp Bug 1519636 - Reformat everything to the Google coding style r=Ehsan 2019-01-16 08:50:07 +00:00
EditorUtils.h Bug 181137 - part 8: Make ContentIteratorBase and its subclasses non-refcountable r=smaug 2019-01-11 01:52:26 +00:00
HTMLAbsPositionEditor.cpp Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-04-12 13:14:25 +00:00
HTMLAnonymousNodeEditor.cpp Bug 1535788 - Make the Document own the StyleSet. r=heycam 2019-04-03 07:02:00 +00:00
HTMLEditRules.cpp Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-04-12 13:14:25 +00:00
HTMLEditRules.h Bug 1530649 - Improve composition string handling which ends with whitespaces r=m_kato 2019-04-09 05:28:38 +00:00
HTMLEditUtils.cpp Bug 1539110 - Make HTMLEditor::RemoveStyleInside() and HTMLEditor::SplitStyleAbovePoint() check tag names with whitelist r=m_kato 2019-04-12 01:17:50 +00:00
HTMLEditUtils.h Bug 1539110 - Make HTMLEditor::RemoveStyleInside() and HTMLEditor::SplitStyleAbovePoint() check tag names with whitelist r=m_kato 2019-04-12 01:17:50 +00:00
HTMLEditor.cpp Bug 1541952 - Move ApplicableStylesChanged() to Document. r=heycam 2019-04-06 19:25:25 +00:00
HTMLEditor.h Bug 1546577 - Make overloads of CanCut(), CanCopy(), CanDelete() and CanPaste() which return bool instead of nsresult r=m_kato 2019-04-25 07:14:39 +00:00
HTMLEditorCommands.cpp Bug 1546577 - Make overloads of CanCut(), CanCopy(), CanDelete() and CanPaste() which return bool instead of nsresult r=m_kato 2019-04-25 07:14:39 +00:00
HTMLEditorCommands.h Bug 1543966 - part 2: Make "HTML editor commands" and "document state commands" singleton classes r=m_kato 2019-04-15 07:29:17 +00:00
HTMLEditorController.cpp Bug 1543966 - part 2: Make "HTML editor commands" and "document state commands" singleton classes r=m_kato 2019-04-15 07:29:17 +00:00
HTMLEditorController.h Bug 1543966 - part 2: Make "HTML editor commands" and "document state commands" singleton classes r=m_kato 2019-04-15 07:29:17 +00:00
HTMLEditorDataTransfer.cpp Bug 1546577 - Make overloads of CanCut(), CanCopy(), CanDelete() and CanPaste() which return bool instead of nsresult r=m_kato 2019-04-25 07:14:39 +00:00
HTMLEditorDocumentCommands.cpp Bug 1543966 - part 2: Make "HTML editor commands" and "document state commands" singleton classes r=m_kato 2019-04-15 07:29:17 +00:00
HTMLEditorEventListener.cpp Bug 1539356 - Mark EditorBase::InsertNodeTransaction() as MOZ_CAN_RUN_SCRIPT r=m_kato 2019-03-30 11:55:29 +00:00
HTMLEditorEventListener.h Bug 1539356 - Mark EditorBase::InsertNodeTransaction() as MOZ_CAN_RUN_SCRIPT r=m_kato 2019-03-30 11:55:29 +00:00
HTMLEditorObjectResizer.cpp Bug 1539356 - Mark EditorBase::InsertNodeTransaction() as MOZ_CAN_RUN_SCRIPT r=m_kato 2019-03-30 11:55:29 +00:00
HTMLInlineTableEditor.cpp Bug 1534561 - Make editor use PresShell directly rather than nsIPresShell r=m_kato 2019-03-15 05:01:10 +00:00
HTMLStyleEditor.cpp Bug 1539110 - Make HTMLEditor::RemoveStyleInside() and HTMLEditor::SplitStyleAbovePoint() check tag names with whitelist r=m_kato 2019-04-12 01:17:50 +00:00
HTMLTableEditor.cpp Bug 1543315 - part 9: Mark nsIPresShell::FlushPendingNotifications() as MOZ_CAN_RUN_SCRIPT r=smaug 2019-04-13 12:43:57 +00:00
HTMLURIRefObject.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
HTMLURIRefObject.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
InsertNodeTransaction.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
InsertNodeTransaction.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
InsertTextTransaction.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
InsertTextTransaction.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
InternetCiter.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
InternetCiter.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
JoinNodeTransaction.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
JoinNodeTransaction.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ManualNAC.h Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
PlaceholderTransaction.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
PlaceholderTransaction.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
SelectionState.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
SelectionState.h Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-04-12 13:14:25 +00:00
SplitNodeTransaction.cpp Bug 1543315 - part 9: Mark nsIPresShell::FlushPendingNotifications() as MOZ_CAN_RUN_SCRIPT r=smaug 2019-04-13 12:43:57 +00:00
SplitNodeTransaction.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
TextEditRules.cpp Bug 1530649 - Improve composition string handling which ends with whitespaces r=m_kato 2019-04-09 05:28:38 +00:00
TextEditRules.h Bug 1539356 - Mark EditorBase::InsertNodeTransaction() as MOZ_CAN_RUN_SCRIPT r=m_kato 2019-03-30 11:55:29 +00:00
TextEditRulesBidi.cpp Bug 1534561 - Make editor use PresShell directly rather than nsIPresShell r=m_kato 2019-03-15 05:01:10 +00:00
TextEditUtils.cpp Bug 1539356 - Mark EditorBase::InsertNodeTransaction() as MOZ_CAN_RUN_SCRIPT r=m_kato 2019-03-30 11:55:29 +00:00
TextEditUtils.h Bug 1539356 - Mark EditorBase::InsertNodeTransaction() as MOZ_CAN_RUN_SCRIPT r=m_kato 2019-03-30 11:55:29 +00:00
TextEditor.cpp Bug 1546577 - Make overloads of CanCut(), CanCopy(), CanDelete() and CanPaste() which return bool instead of nsresult r=m_kato 2019-04-25 07:14:39 +00:00
TextEditor.h Bug 1546577 - Make overloads of CanCut(), CanCopy(), CanDelete() and CanPaste() which return bool instead of nsresult r=m_kato 2019-04-25 07:14:39 +00:00
TextEditorDataTransfer.cpp Bug 1546577 - Make overloads of CanCut(), CanCopy(), CanDelete() and CanPaste() which return bool instead of nsresult r=m_kato 2019-04-25 07:14:39 +00:00
TypeInState.cpp Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
TypeInState.h Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
WSRunObject.cpp Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-04-12 13:14:25 +00:00
WSRunObject.h Bug 1530649 - Improve composition string handling which ends with whitespaces r=m_kato 2019-04-09 05:28:38 +00:00
moz.build Bug 1485890 - Remove dumpContentTree, debugDumpContent and debugUnitTests from nsIEditor. r=masayuki 2018-10-29 07:23:49 +00:00
nsIAbsorbingTransaction.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00