[Clipboard API] Clipboard Web Custom Formats implementation. #34117
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch addresses the changes proposed by the EditingWG[1] and
agreed upon by all browser vendors. We are removing the
unsanitized
option, and instead, adding custom format support for MIME types that
have "web " prefix in them.
Added few wpt tests to test these changes.
Below is a summary of the changes in this CL:
unsanitized
option from read/write methods.read/write fails.
text/html, text/plain, image/png and web custom formats.
well-known formats and the other for the web custom format. If the
author doesn't specify the web format explicitly, then they don't
get access to it. This means, we won't write web custom formats
for well-known types implicitly if authors have not indicated that
during the write call via a "web " prefix (e.g. "web text/html").
Same applies for reading web custom formats for well-known types-
if there aren't any formats in the web custom format map, then we
won't return any web custom formats i.e. text/html won't be
automatically converted into "web text/html".
Spec: w3c/clipboard-apis#175
Explainer: https://github.com/w3c/editing/blob/gh-pages/docs/clipboard-pickling/explainer.md
i2p: https://groups.google.com/a/chromium.org/g/blink-dev/c/Lo7WBM_v_LY/m/LncCKkXeAwAJ
i2s: https://groups.google.com/a/chromium.org/g/blink-dev/c/k2rgX-4Cigc/m/P0RijrpzBAAJ?utm_medium=email&utm_source=footer&pli=1
Bug: 106449
Change-Id: I86aae6a662089efeede2a01ac87cb698e9646df5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3650952
Commit-Queue: Anupam Snigdha <[email protected]>
Reviewed-by: Alexander Timin <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Reviewed-by: Austin Sullivan <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1011078}