New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 778889 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug

Blocking:
issue 563816



Sign in to add a comment

OffscreenCanvas: Can't copy the controlled canvas to clipboard

Reported by acmesqua...@gmail.com, Oct 27 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.18 Safari/537.36

Steps to reproduce the problem:
1. Transfer control to an OffscreenCanvas
2. Draw and commit
3. 'Copy image' from the DOM canvas
4. Paste into GIMP or similar

What is the expected behavior?
The bitmap is pasted

What went wrong?
GIMP receives a rectangle of the correct size, but it's completely transparent.

Did this work before? No 

Does this work in other browsers? Yes

Chrome version: 63.0.3239.18  Channel: dev
OS Version: 
Flash Version:
 
offscreenCanvas_clipboard.js
268 bytes View Download

Comment 1 by ajha@chromium.org, Oct 27 2017

Cc: ajha@chromium.org
Labels: Needs-Feedback Needs-Triage-M63
Could you please attach any sample test page or hosted webpage for ease of reproduction to test and check this for regression.

Comment 2 by junov@chromium.org, Oct 27 2017

Blocking: 563816
Labels: -Needs-Feedback -Hotlist-Interop -Needs-Triage-M63
Owner: xlai@chromium.org
Status: Assigned (was: Unconfirmed)
Removing NeedsFeedback flag.  We have enough info to work with.
Let's make this a blocker for shipping OffscreenCanvas.

Olivia: Can you check this out? We already have access to the committed frame in HTMLCanvasElement. This is probably a simple fix. I bet whatever method that grabs a snapshot for the clipboard is just neglecting to look at PlaceholderFrame() before trying to get an image from the rendering context (which does not exist on a canvas that transferred control to offscreen).

Comment 3 by xlai@chromium.org, Oct 31 2017

Status: Started (was: Assigned)
Project Member

Comment 4 by bugdroid1@chromium.org, Nov 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9be9ef72462f3c714e76c24923f38c3da028e382

commit 9be9ef72462f3c714e76c24923f38c3da028e382
Author: xlai <xlai@chromium.org>
Date: Thu Nov 02 00:21:12 2017

Allow image copying of canvas that has been transferred control

Bug:  778889 
Change-Id: I34e5a47caef3a5f19b1114588566f19aaec8424c
Reviewed-on: https://chromium-review.googlesource.com/747384
Commit-Queue: Olivia Lai <xlai@chromium.org>
Reviewed-by: Justin Novosad <junov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#513335}
[add] https://crrev.com/9be9ef72462f3c714e76c24923f38c3da028e382/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-commit-copyImage.html
[modify] https://crrev.com/9be9ef72462f3c714e76c24923f38c3da028e382/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp

Comment 5 by xlai@chromium.org, Nov 2 2017

Status: Fixed (was: Started)

Sign in to add a comment