Paste non-file-based images in clipboard as img tag
This patch converts a non-file-based image in clipboard to an <img> tag with data URL when pasting to an editing host. The generated markup matches |URLToImageMarkup| and the one Firefox generates for the same case. In addition to the unittests, manually tested by taking screenshots to clipboard by pressing Alt+PrtScrn key on Windows and confirmed: * Pastable to `contenteditable`. * Pastable to `-webkit-user-modify: read-write`. * Not pastable to `<input>`, `<textarea>`, nor to `-webkit-user-modify: read-write-plaintext-only`. Bug: 1008927 Change-Id: I19c17591567ad150575ed15af7743e819eaeb67e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2086463 Commit-Queue: Yoshifumi Inoue <yosin@chromium.org> Reviewed-by:Yoshifumi Inoue <yosin@chromium.org> Cr-Commit-Position: refs/heads/master@{#750463}
Showing
Please register or sign in to comment