gecko-dev/editor/libeditor
Masayuki Nakano 5c47cf2ccf Bug 1461708 - part 8: Make EventStateManager handle middle click paste as a default action of mouseup event r=smaug
This patch makes EventStateManager handle middle click paste as a default
action.

Unfortunately, we cannot remove the call of HandleMiddleClickPaste() in
EditorEventListener because it's important to consume middle click event
before any elements in the editor.  For example, if clicked HTMLEditor has
non-editable <a href> element, middle click event needs to be handled by the
editor rather than contentAreaUtils which handles click events of <a href>
elements.  The cause of this kind of issues is, any click event handlers
which handle non-primary button events still listen to "click" events.
Therefore, this patch makes HandleMiddleClickPaste() do nothing if the mouseup
event is fired on an editor.

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

--HG--
extra : moz-landing-system : lando
2018-10-10 12:06:17 +00:00
..
crashtests Bug 1451503 Move most reftest resources from chrome: to resource: r=kmag 2018-09-06 16:01:39 -07:00
tests Bug 1461708 - part 7: Make EventStateManager::HandleMiddleClickPaste() dispatch ePaste event by itself r=smaug 2018-10-10 12:05:39 +00:00
ChangeAttributeTransaction.cpp
ChangeAttributeTransaction.h
ChangeStyleTransaction.cpp Bug 1408301: Remove getPropertyCSSValue. r=bz 2018-05-12 11:23:47 +02:00
ChangeStyleTransaction.h
CompositionTransaction.cpp Bug 1463287: Add QueryInterface helper macro for concrete class types. r=bz 2018-05-21 16:33:18 -07:00
CompositionTransaction.h
CreateElementTransaction.cpp Bug 1480055 - part 2: Rename EditorBase::GetShouldTxnSetSelection() to EditorBase::AllowsTransactionsToChangeSelection() r=m_kato 2018-08-01 20:53:57 +09:00
CreateElementTransaction.h Bug 1447213 - Change editor methods which take |const EditorRawDOMPoint&| but called with EditorDOMPoint.AsRaw() to template methods r=m_kato 2018-03-20 14:05:47 +09:00
CSSEditUtils.cpp Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj. 2018-08-14 14:43:42 +03:00
CSSEditUtils.h Bug 1408301: Remove getPropertyCSSValue. r=bz 2018-05-12 11:23:47 +02:00
DeleteNodeTransaction.cpp Bug 1480663 - Make EditorBase::IsModifiableNode() non-virtual r=m_kato 2018-08-03 11:10:46 +00:00
DeleteNodeTransaction.h
DeleteRangeTransaction.cpp Bug 1480055 - part 2: Rename EditorBase::GetShouldTxnSetSelection() to EditorBase::AllowsTransactionsToChangeSelection() r=m_kato 2018-08-01 20:53:57 +09:00
DeleteRangeTransaction.h
DeleteTextTransaction.cpp Bug 1480663 - Make EditorBase::IsModifiableNode() non-virtual r=m_kato 2018-08-03 11:10:46 +00:00
DeleteTextTransaction.h Bug 1446533 part 2. Rename nsGenericDOMDataNode.{h,cpp} to CharacterData. r=mystor 2018-03-19 15:18:07 -04:00
EditAction.h Bug 1463985 - part 27: Replace EditSubAction::ignore with EditSubAction::eReplaceHeadWithHTMLSource and EditSubAction::eCreateBogusNode r=m_kato 2018-05-29 00:06:24 +09:00
EditActionListener.h
EditAggregateTransaction.cpp
EditAggregateTransaction.h
EditorBase.cpp Bug 1461708 - part 7: Make EventStateManager::HandleMiddleClickPaste() dispatch ePaste event by itself r=smaug 2018-10-10 12:05:39 +00:00
EditorBase.h Bug 1487301 - Part 1. FindSelectionRoot should return Element. r=masayuki 2018-09-20 18:53:35 +09:00
EditorCommands.cpp Bug 1461708 - part 7: Make EventStateManager::HandleMiddleClickPaste() dispatch ePaste event by itself r=smaug 2018-10-10 12:05:39 +00:00
EditorCommands.h
EditorController.cpp
EditorController.h Bug 1489790 - Part 8: Remove the XPCOM component registration for @mozilla.org/editor/editorcontroller;1; r=baku 2018-09-11 09:58:33 -04:00
EditorDOMPoint.h Bug 1465478: Introduce Element::FromNode. r=smaug 2018-05-31 02:46:10 +02:00
EditorEventListener.cpp Bug 1461708 - part 8: Make EventStateManager handle middle click paste as a default action of mouseup event r=smaug 2018-10-10 12:06:17 +00:00
EditorEventListener.h Bug 1461708 - part 6: Make EditorEventListener::MouseClick() use WidgetMouseEvent instead of dom::MouseEvent r=m_kato 2018-10-10 12:05:21 +00:00
EditorUtils.cpp Bug 1451972 - Remove more nsIDOMDocument usages from editor. r=masayuki 2018-04-06 14:53:05 +09:00
EditorUtils.h Bug 1482007 - part 1: Create a helper class to guarantee to call nsIEditor::EndTransaction() after nsIEditor::BeginTransaction() call r=m_kato 2018-08-09 11:45:41 +00:00
EditTransactionBase.cpp
EditTransactionBase.h
HTMLAbsPositionEditor.cpp Bug 1494622 - Remove nsDOMCSSRGBColor. r=xidorn 2018-09-27 16:11:42 +02:00
HTMLAnonymousNodeEditor.cpp Bug 1485929 - Create HTMLEditor::RefreshInlineTableEditingUIInternal() for internal use r=m_kato 2018-09-11 12:10:54 +00:00
HTMLEditor.cpp Bug 1487301 - Part 1. FindSelectionRoot should return Element. r=masayuki 2018-09-20 18:53:35 +09:00
HTMLEditor.h Bug 1461708 - part 7: Make EventStateManager::HandleMiddleClickPaste() dispatch ePaste event by itself r=smaug 2018-10-10 12:05:39 +00:00
HTMLEditorCommands.cpp Bug 1485934 - Get rid of nsIHTMLEditor.getFontColorState() r=m_kato 2018-08-27 06:52:35 +00:00
HTMLEditorCommands.h Bug 1468708 - Part 6. Move HTMLEditorCommands and HTMLEditorController to libeditor. r=masayuki 2018-06-13 14:49:06 -07:00
HTMLEditorController.cpp Bug 1449564 - part 2: Make absolute positioned element editor disabled in default and make it possible to enable it with new command r=m_kato 2018-04-04 22:27:49 +09:00
HTMLEditorController.h Bug 1489790 - Part 10: Remove the XPCOM component registration for @mozilla.org/editor/editordocstatecontroller;1; r=baku 2018-09-11 09:58:33 -04:00
HTMLEditorDataTransfer.cpp Bug 1461708 - part 7: Make EventStateManager::HandleMiddleClickPaste() dispatch ePaste event by itself r=smaug 2018-10-10 12:05:39 +00:00
HTMLEditorDocumentCommands.cpp Bug 1485935 - Use NS_IMETHODIMP for implementation of HTMLEditor::GetIsCSSEnabled() r=m_kato 2018-08-28 09:46:53 +00:00
HTMLEditorEventListener.cpp Bug 1461708 - part 6: Make EditorEventListener::MouseClick() use WidgetMouseEvent instead of dom::MouseEvent r=m_kato 2018-10-10 12:05:21 +00:00
HTMLEditorEventListener.h Bug 1461708 - part 6: Make EditorEventListener::MouseClick() use WidgetMouseEvent instead of dom::MouseEvent r=m_kato 2018-10-10 12:05:21 +00:00
HTMLEditorObjectResizer.cpp Bug 1485921 - Create HTMLEditor::RefreshResizersInternal() for internal use r=m_kato 2018-09-11 08:15:52 +00:00
HTMLEditorObjectResizerUtils.h
HTMLEditRules.cpp Bug 1487301 - Part 2. Set ancestor limitter if no set yet. r=masayuki 2018-09-20 19:03:24 +09:00
HTMLEditRules.h Bug 1471115 - Remove unused methods in nsIHTMLEditor. r=masayuki 2018-06-26 04:29:36 +00:00
HTMLEditUtils.cpp Bug 1463981 part 3. Remove nsIDOMNode usage in editor. r=masayuki 2018-05-24 13:18:34 -04:00
HTMLEditUtils.h Bug 1463981 part 3. Remove nsIDOMNode usage in editor. r=masayuki 2018-05-24 13:18:34 -04:00
HTMLInlineTableEditor.cpp Bug 1484116 - part 1: Create HTMLEditor::InsertTableColumnsWithTransaction() for internal use of nsITableEditor::InsertTableColumn() r=m_kato 2018-09-20 09:15:08 +00:00
HTMLStyleEditor.cpp Bug 1485935 - Use NS_IMETHODIMP for implementation of HTMLEditor::GetIsCSSEnabled() r=m_kato 2018-08-28 09:46:53 +00:00
HTMLTableEditor.cpp Bug 1484111 - part 1: Create HTMLEditor::InsertTableCellsWithTransaction() for internal use of nsITableEditor::InsertTableCell() r=m_kato 2018-09-20 11:44:35 +00:00
HTMLURIRefObject.cpp Bug 1463981 part 2. Remove use of nsIDOMNode in editor xpidl. r=masayuki 2018-05-24 13:18:34 -04:00
HTMLURIRefObject.h Bug 1463981 part 2. Remove use of nsIDOMNode in editor xpidl. r=masayuki 2018-05-24 13:18:34 -04:00
InsertNodeTransaction.cpp Bug 1480055 - part 2: Rename EditorBase::GetShouldTxnSetSelection() to EditorBase::AllowsTransactionsToChangeSelection() r=m_kato 2018-08-01 20:53:57 +09:00
InsertNodeTransaction.h Bug 1447213 - Change editor methods which take |const EditorRawDOMPoint&| but called with EditorDOMPoint.AsRaw() to template methods r=m_kato 2018-03-20 14:05:47 +09:00
InsertTextTransaction.cpp Bug 1480055 - part 2: Rename EditorBase::GetShouldTxnSetSelection() to EditorBase::AllowsTransactionsToChangeSelection() r=m_kato 2018-08-01 20:53:57 +09:00
InsertTextTransaction.h
InternetCiter.cpp Bug 1264876 - Remove StripCites() from nsIEditorMailSupport r=m_kato 2018-07-19 16:55:31 +09:00
InternetCiter.h Bug 1264876 - Remove StripCites() from nsIEditorMailSupport r=m_kato 2018-07-19 16:55:31 +09:00
JoinNodeTransaction.cpp Bug 1480663 - Make EditorBase::IsModifiableNode() non-virtual r=m_kato 2018-08-03 11:10:46 +00:00
JoinNodeTransaction.h
ManualNAC.h
moz.build Bug 1489812 - Part 2: Remove @mozilla.org/editor-utils;1; r=masayuki 2018-09-10 08:42:27 -04:00
nsIAbsorbingTransaction.h
PlaceholderTransaction.cpp Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj 2018-06-17 22:43:11 -07:00
PlaceholderTransaction.h Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj 2018-06-01 10:45:27 +02:00
SelectionState.cpp Bug 358033 - Part 1. Restore direction of Selection. r=masayuki 2018-07-23 02:44:42 +00:00
SelectionState.h Bug 358033 - Part 1. Restore direction of Selection. r=masayuki 2018-07-23 02:44:42 +00:00
SplitNodeTransaction.cpp Bug 1480055 - part 2: Rename EditorBase::GetShouldTxnSetSelection() to EditorBase::AllowsTransactionsToChangeSelection() r=m_kato 2018-08-01 20:53:57 +09:00
SplitNodeTransaction.h Bug 1447213 - Change editor methods which take |const EditorRawDOMPoint&| but called with EditorDOMPoint.AsRaw() to template methods r=m_kato 2018-03-20 14:05:47 +09:00
TextEditor.cpp Bug 1461708 - part 7: Make EventStateManager::HandleMiddleClickPaste() dispatch ePaste event by itself r=smaug 2018-10-10 12:05:39 +00:00
TextEditor.h Bug 1461708 - part 7: Make EventStateManager::HandleMiddleClickPaste() dispatch ePaste event by itself r=smaug 2018-10-10 12:05:39 +00:00
TextEditorDataTransfer.cpp Bug 1461708 - part 7: Make EventStateManager::HandleMiddleClickPaste() dispatch ePaste event by itself r=smaug 2018-10-10 12:05:39 +00:00
TextEditorTest.cpp Bug 1493737 - Fix many trivial calls to do_QueryInterface r=smaug 2018-10-01 21:38:01 +00:00
TextEditorTest.h
TextEditRules.cpp Bug 1480663 - Make EditorBase::IsModifiableNode() non-virtual r=m_kato 2018-08-03 11:10:46 +00:00
TextEditRules.h Bug 1484612 - Remove EditSubActionInfo.bOrdered due to unused. r=masayuki 2018-08-20 12:23:56 +00:00
TextEditRulesBidi.cpp Bug 1457083 - part 6: Get rid of unnecessary Selection argument from all protected/private methods of TextEditRules and HTMLEditRules r=m_kato 2018-05-10 15:03:21 +09:00
TextEditUtils.cpp Bug 1449147 - Clean up more nsIDOMNode usages in editor. r=masayuki 2018-03-27 20:19:35 +09:00
TextEditUtils.h Bug 1449147 - Clean up more nsIDOMNode usages in editor. r=masayuki 2018-03-27 20:19:35 +09:00
TypeInState.cpp Bug 1387143 part 22. Remove nsISelection isCollapsed/collapsed bits. r=mats 2018-05-08 13:52:39 -04:00
TypeInState.h Bug 1445569 - part 4: Get rid of EditorBase::GetStartNodeAndOffset() and EditorBase::GetEndNodeAndOffset() r=m_kato 2018-03-15 21:25:41 +09:00
WSRunObject.cpp Bug 1483434 - Allow nullptr parameter for PriorVisibleNode and NextVisibleNode. r=masayuki 2018-08-14 18:26:46 +09:00
WSRunObject.h Bug 1483434 - Allow nullptr parameter for PriorVisibleNode and NextVisibleNode. r=masayuki 2018-08-14 18:26:46 +09:00