gecko-dev/editor
Masayuki Nakano e28c807e5a Bug 1533989 - Make InputEvent.data and InputEvent.dataTransfer not expose clipboard data if user disables clipboard events r=smaug
If user disables clipboard events, it means that they don't want to expose
clipboard data to web apps even if web apps cannot handle "paste" operation.
Therefore, they must not want to leak clipboard data with `InputEvent.data`
and `InputEvent.dataTransfer`.

This patch makes `InputEvent::GetData()` and `InputEvent::GetDataTransfer()`
returns empty string or new `DataTransfer` object which has only empty string
if:
- They are called by content JS.
- The event is a trusted event.
- `inputType` value is `insertFromPaste` or `insertFromPasteAsQuotation`.

The reason why we don't return null for both is, Input Events spec declares
`data` or `dataTransfer` shouldn't be null in the `inputType` values.  And
the reason why we don't return empty `DataTransfer` is, web apps may expect
at least one data is stored in non-null `dataTransfer` value.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 16:08:11 +00:00
..
composer Bug 1539356 - Mark EditorBase::InsertNodeTransaction() as MOZ_CAN_RUN_SCRIPT r=m_kato 2019-03-30 11:55:29 +00:00
libeditor Bug 1533989 - Make InputEvent.data and InputEvent.dataTransfer not expose clipboard data if user disables clipboard events r=smaug 2019-03-29 16:08:11 +00:00
reftests Bug 1513343 - Remove textarea binding and replace usages with html:textarea. r=bgrins,dao 2019-03-05 11:41:42 +00:00
spellchecker Bug 1533293 - part 3: Make editor and ContentEventHandler not use Selection::Extend() due to too slow r=m_kato 2019-03-26 10:09:47 +00:00
txmgr 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
AsyncSpellCheckTestHelper.jsm Bug 1489980 - Enable ESLint for editor/ - Manual fixes. r=masayuki 2018-09-13 07:59:47 +00:00
moz.build Bug 1491199 - Get rid of nsIEditorBlobListener. r=masayuki 2018-09-18 04:34:21 +00:00
nsIDocumentStateListener.idl
nsIEditActionListener.idl Bug 1489047 - Change almost all DOMString occurrences in XPIDL files to AString. r=nika 2018-09-06 18:02:43 +10:00
nsIEditor.idl Bug 1539356 - Mark EditorBase::InsertNodeTransaction() as MOZ_CAN_RUN_SCRIPT r=m_kato 2019-03-30 11:55:29 +00:00
nsIEditorMailSupport.idl Bug 1539356 - Mark EditorBase::InsertNodeTransaction() as MOZ_CAN_RUN_SCRIPT r=m_kato 2019-03-30 11:55:29 +00:00
nsIEditorObserver.idl Bug 1432528 - part 4: Remove nsIEditorObserver::BeforeEditAction() and nsIEditorObserver::CancelEditAction() because nobody implements them r=m_kato 2018-01-24 14:31:29 +09:00
nsIEditorSpellCheck.idl Bug 1533293 - part 3: Make editor and ContentEventHandler not use Selection::Extend() due to too slow r=m_kato 2019-03-26 10:09:47 +00:00
nsIEditorStyleSheets.idl Bug 1470361: Remove nsIEditorStyleSheets.addStyleSheet / removeStyleSheet / replaceStyleSheet. r=m_kato 2018-06-25 10:46:38 +02:00
nsIHTMLAbsPosEditor.idl Bug 1484136 - Create HTMLEditor::RefreshGrabberInternal() for internal use r=m_kato 2018-09-11 05:30:33 +00:00
nsIHTMLEditor.idl Bug 1539356 - Mark EditorBase::InsertNodeTransaction() as MOZ_CAN_RUN_SCRIPT r=m_kato 2019-03-30 11:55:29 +00:00
nsIHTMLInlineTableEditor.idl Bug 1485929 - Create HTMLEditor::RefreshInlineTableEditingUIInternal() for internal use r=m_kato 2018-09-11 12:10:54 +00:00
nsIHTMLObjectResizer.idl Bug 1485921 - Create HTMLEditor::RefreshResizersInternal() for internal use r=m_kato 2018-09-11 08:15:52 +00:00
nsIPlaintextEditor.idl Bug 1540062 - Get rid of nsIPlaintextEditor.setWrapColumn. r=masayuki 2019-03-29 09:44:36 +00:00
nsITableEditor.idl Bug 1533293 - part 3: Make editor and ContentEventHandler not use Selection::Extend() due to too slow r=m_kato 2019-03-26 10:09:47 +00:00
nsIURIRefObject.idl Bug 1489047 - Change almost all DOMString occurrences in XPIDL files to AString. r=nika 2018-09-06 18:02:43 +10:00