gecko-dev/modules
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
..
brotli Bug 1512504 - Remove support for MSVC. r=froydnj 2019-02-14 21:45:27 +00:00
fdlibm Bug 1380031: Ensure Math.exp(1) returns Math.E. r=arai 2019-03-25 09:15:27 +00:00
freetype2 Bug 1458905 - Update to FreeType 2.9.1. r=jfkthame 2018-05-08 11:48:29 -04:00
libjar Bug 1415265 - Remove now unnecessary .eslintrc.js files or entries. r=mossop 2019-03-28 09:38:14 +00:00
libmar Bug 1415265 - Remove now unnecessary .eslintrc.js files or entries. r=mossop 2019-03-28 09:38:14 +00:00
libpref 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
woff2
xz-embedded Bug 1477048 - part 1 - remove `'86' in CONFIG['OS_TEST']` stanzas from moz.build files; r=gps 2018-07-24 16:08:56 -04:00
zlib No bug - add a comment explaining why zlib's sources can't be unified. DONTBUILD 2019-01-18 22:03:40 -05:00
moz.build