mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
e28c807e5a
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 |
||
---|---|---|
.. | ||
composer | ||
libeditor | ||
reftests | ||
spellchecker | ||
txmgr | ||
AsyncSpellCheckTestHelper.jsm | ||
moz.build | ||
nsIDocumentStateListener.idl | ||
nsIEditActionListener.idl | ||
nsIEditor.idl | ||
nsIEditorMailSupport.idl | ||
nsIEditorObserver.idl | ||
nsIEditorSpellCheck.idl | ||
nsIEditorStyleSheets.idl | ||
nsIHTMLAbsPosEditor.idl | ||
nsIHTMLEditor.idl | ||
nsIHTMLInlineTableEditor.idl | ||
nsIHTMLObjectResizer.idl | ||
nsIPlaintextEditor.idl | ||
nsITableEditor.idl | ||
nsIURIRefObject.idl |