gecko-dev/editor/libeditor
Masayuki Nakano 129b58687c Bug 1588745 - part 6: Post processing of setting value with TextEditor should be done before dispatching "input" event r=Ehsan
Currently, "input" event is fired when the `AutoScriptBlocker` in `SetValue()`
is deleted.  So, for keeping same behavior, the post processing after calling
`TextEditor` methods should be done before editor dispatches "input" event.

Fortunately, `TextInputListener::OnEditActionHandled()` is a good chance to
do that.  Therefore, this patch makes it notify `TextControlState` and
`AutoTextControlHandlingState`.

Note that ideally, each method of `TextEditor` should return
`NS_ERROR_OUT_OF_MEMORY` coming from
`AutoTextControlHandlingState::OnEditActionHandled()`.  However, it requires
a lot of changes in editor classes, and the case is really rare since editor
does not use fallible allocation.  Therefore, it must be okay to crash in
editor if `OnEditActionHandled()` returns `NS_ERROR_OUT_OF_MEMORY`.

Depends on D51395

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

--HG--
extra : moz-landing-system : lando
2019-11-03 02:50:00 +00:00
..
crashtests Bug 1474978 - Add crashtest. r=masayuki 2019-09-23 10:37:40 +00:00
tests Bug 1591297 - Fix/remove a couple sanitizer tests now that we don't parse -moz-binding. r=hsivonen 2019-10-29 08:32:06 +00:00
CSSEditUtils.cpp Bug 1585156 - Remove useless inclusions of nsIDOMWindow.h and nsIDOMWindowUtils.h r=smaug 2019-09-30 22:06:47 +00:00
CSSEditUtils.h
ChangeAttributeTransaction.cpp
ChangeAttributeTransaction.h
ChangeStyleTransaction.cpp
ChangeStyleTransaction.h
CompositionTransaction.cpp Bug 1548389 - part 0: Wrap modifying text node in editor with particular methods r=m_kato 2019-07-22 03:53:29 +00:00
CompositionTransaction.h
CreateElementTransaction.cpp
CreateElementTransaction.h
DeleteNodeTransaction.cpp Bug 1548389 - part 1: Implement API to get/set unmask-range of password editor r=m_kato 2019-07-22 03:53:36 +00:00
DeleteNodeTransaction.h
DeleteRangeTransaction.cpp Bug 1548389 - part 0: Wrap modifying text node in editor with particular methods r=m_kato 2019-07-22 03:53:29 +00:00
DeleteRangeTransaction.h
DeleteTextTransaction.cpp Bug 1591490 - Use the NS_IS_SURROGATE_PAIR macro everywhere. r=Ehsan 2019-10-27 05:05:51 +00:00
DeleteTextTransaction.h Bug 1548389 - part 0: Wrap modifying text node in editor with particular methods r=m_kato 2019-07-22 03:53:29 +00:00
EditAction.h Bug 1574852 - part 56: Merge `HTMLEditRules::WillMakeList()` and `HTMLEditRules::WillMakeDefinitionList()` and make `HTMLEditor` call it directly r=m_kato 2019-09-03 09:32:17 +00:00
EditActionListener.h
EditAggregateTransaction.cpp
EditAggregateTransaction.h
EditTransactionBase.cpp
EditTransactionBase.h
EditorBase.cpp Bug 1588745 - part 6: Post processing of setting value with TextEditor should be done before dispatching "input" event r=Ehsan 2019-11-03 02:50:00 +00:00
EditorBase.h Bug 1540029 - part 10: Get rid of `TextEditRules` and `HTMLEditRules` r=m_kato 2019-09-18 08:40:08 +00:00
EditorCommands.cpp Bug 1540029 - part 2: Get rid of `TextEditRules::DocumentIsEmpty()` and `HTMLEditRules::DocumentIsEmpty()` r=m_kato 2019-09-17 06:58:06 +00:00
EditorCommands.h
EditorController.cpp
EditorController.h
EditorDOMPoint.h Bug 1587312 - Fix typo of finding non-anonymous content. r=masayuki 2019-10-09 05:42:42 +00:00
EditorEventListener.cpp Bug 1565584: move `nsIContentUtils::ContentIsDescendantOf` to `nsINode::IsInclusiveDescendantOf`. r=smaug 2019-07-15 10:02:21 +02:00
EditorEventListener.h
EditorUtils.cpp Bug 1574852 - part 60: Move `HTMLEditRules::MoveNodeSmart()` and `HTMLEditRules::MoveContents()` to `HTMLEditor` r=m_kato 2019-09-04 03:32:26 +00:00
EditorUtils.h Bug 1566795 - part 2: Clean up `HTMLEditor::SplitAboveRange()` r=m_kato 2019-10-07 01:11:31 +00:00
HTMLAbsPositionEditor.cpp Bug 1566795 - part 3: Clean up `HTMLEditor::RemoveStyleInside()` r=m_kato 2019-10-07 03:33:11 +00:00
HTMLAnonymousNodeEditor.cpp Bug 1585156 - Remove useless inclusions of nsIDOMWindow.h and nsIDOMWindowUtils.h r=smaug 2019-09-30 22:06:47 +00:00
HTMLEditSubActionHandler.cpp Bug 1587716: change `RangeBoundaryBase`'s offset argument to `uint32_t`. r=smaug 2019-10-23 08:22:36 +00:00
HTMLEditUtils.cpp Bug 1581034 - part 2: Get rid of `TextEditUtils::IsBreak()` and `TextEditUtils` itself r=m_kato 2019-09-18 12:37:14 +00:00
HTMLEditUtils.h Bug 1574852 - part 68: Make `HTMLEditRules::GetDefinitionListItemTypes()` to a stack class r=m_kato 2019-09-06 04:32:36 +00:00
HTMLEditor.cpp Bug 1587141 part 2 - Make execCommand("indent") ignore whitespace when looking for sibling list element. r=masayuki 2019-10-14 17:11:00 +00:00
HTMLEditor.h Bug 1587141 part 1 - Share some common code between Handle[CSS|HTML]IndentAtSelectionInternal (idempotent patch). r=masayuki 2019-10-15 04:36:26 +00:00
HTMLEditorCommands.cpp Bug 1566795 - part 4: Make `HTMLEditor` not check `IsCSSEnabled()` at removing inline style r=m_kato 2019-10-08 09:24:19 +00:00
HTMLEditorController.cpp
HTMLEditorController.h
HTMLEditorDataTransfer.cpp Bug 1582215 - Make `HTMLEditor::DoInsertHTMLWithContext()` compute new insertion point before removing unnecessary `<li>` elements r=m_kato 2019-10-17 09:17:14 +00:00
HTMLEditorDocumentCommands.cpp
HTMLEditorEventListener.cpp
HTMLEditorEventListener.h
HTMLEditorObjectResizer.cpp
HTMLInlineTableEditor.cpp
HTMLStyleEditor.cpp Bug 1580491 - Use Element::HasNonEmptyAttr in various places; r=bzbarsky 2019-11-01 15:24:25 +00:00
HTMLTableEditor.cpp Bug 1587716: change `RangeBoundaryBase`'s offset argument to `uint32_t`. r=smaug 2019-10-23 08:22:36 +00:00
InsertNodeTransaction.cpp Bug 1548389 - part 1: Implement API to get/set unmask-range of password editor r=m_kato 2019-07-22 03:53:36 +00:00
InsertNodeTransaction.h
InsertTextTransaction.cpp Bug 1548389 - part 0: Wrap modifying text node in editor with particular methods r=m_kato 2019-07-22 03:53:29 +00:00
InsertTextTransaction.h
InternetCiter.cpp
InternetCiter.h
JoinNodeTransaction.cpp Bug 1548389 - part 0: Wrap modifying text node in editor with particular methods r=m_kato 2019-07-22 03:53:29 +00:00
JoinNodeTransaction.h
ManualNAC.h
PlaceholderTransaction.cpp
PlaceholderTransaction.h
SelectionState.cpp
SelectionState.h Bug 1574852 - part 67-5: Rewrite `HTMLEditRules::HandleDeleteNonCollapsedSelection()` with `EditorDOMPoint` r=m_kato 2019-09-06 00:59:32 +00:00
SplitNodeTransaction.cpp Bug 1548389 - part 0: Wrap modifying text node in editor with particular methods r=m_kato 2019-07-22 03:53:29 +00:00
SplitNodeTransaction.h
TextEditSubActionHandler.cpp Bug 1591490 - Use the NS_IS_SURROGATE_PAIR macro everywhere. r=Ehsan 2019-10-27 05:05:51 +00:00
TextEditor.cpp Bug 1587716: change `RangeBoundaryBase`'s offset argument to `uint32_t`. r=smaug 2019-10-23 08:22:36 +00:00
TextEditor.h Bug 1540029 - part 11: Get rid of `AutoEditInitRulesTrigger` r=m_kato 2019-09-18 10:14:40 +00:00
TextEditorDataTransfer.cpp Bug 1574852 - part 106-1: Move `TextEditRules::WillDeleteSelection()` and `TextEditRules::DeleteSelectionWithTransaction()` to `TextEditor` and make `HTMLEditor::HandleDeleteSelection()` override the former r=m_kato 2019-09-13 02:49:43 +00:00
TypeInState.cpp Bug 1572685 - part 8: Move `HTMLEditRules::mCachedStyles` to `TopLevelEditSubAction` r=m_kato 2019-08-20 01:51:36 +00:00
TypeInState.h Bug 1540029 - part 10: Get rid of `TextEditRules` and `HTMLEditRules` r=m_kato 2019-09-18 08:40:08 +00:00
WSRunObject.cpp Bug 1587716: change `RangeBoundaryBase`'s offset argument to `uint32_t`. r=smaug 2019-10-23 08:22:36 +00:00
WSRunObject.h Bug 1540029 - part 10: Get rid of `TextEditRules` and `HTMLEditRules` r=m_kato 2019-09-18 08:40:08 +00:00
moz.build Bug 1581034 - part 2: Get rid of `TextEditUtils::IsBreak()` and `TextEditUtils` itself r=m_kato 2019-09-18 12:37:14 +00:00
nsIAbsorbingTransaction.h