Bug 170486 - Canvas is tainted when painting a video with MediaStreamTrack
Summary: Canvas is tainted when painting a video with MediaStreamTrack
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-04 17:23 PDT by youenn fablet
Modified: 2017-04-04 21:48 PDT (History)
6 users (show)

See Also:


Attachments
Patch (12.59 KB, patch)
2017-04-04 17:26 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (12.54 KB, patch)
2017-04-04 18:05 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews106 for mac-elcapitan-wk2 (1.27 MB, application/zip)
2017-04-04 19:10 PDT, Build Bot
no flags Details
Patch for landing (12.73 KB, patch)
2017-04-04 20:35 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (12.46 KB, patch)
2017-04-04 21:07 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2017-04-04 17:23:57 PDT
This should only be the case if the track is isolated.
Comment 1 youenn fablet 2017-04-04 17:26:03 PDT
Created attachment 306233 [details]
Patch
Comment 2 youenn fablet 2017-04-04 18:05:27 PDT
Created attachment 306235 [details]
Patch
Comment 3 youenn fablet 2017-04-04 18:07:11 PDT
Hum, before the patch, we were only tainting canvas when using video.srcObject but not video.src.
There might be something to fix there.
Comment 4 Build Bot 2017-04-04 19:10:51 PDT
Comment on attachment 306235 [details]
Patch

Attachment 306235 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/3474869

New failing tests:
http/tests/media/media-stream/getusermedia-with-canvas.html
Comment 5 Build Bot 2017-04-04 19:10:52 PDT
Created attachment 306237 [details]
Archive of layout-test-results from ews106 for mac-elcapitan-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-elcapitan-wk2  Platform: Mac OS X 10.11.6
Comment 6 Eric Carlson 2017-04-04 19:39:11 PDT
Comment on attachment 306235 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=306235&action=review

> LayoutTests/http/tests/media/media-stream/resources/getUserMedia-helper.js:32
> +    evalAndLog('video.srcObject = mediaStream');

Looks like you changed the test but not the results:

> video.src = window.URL.createObjectURL(mediaStream)

URL.createObjectURL(mediastream) has been deprecated (see https://github.com/w3c/mediacapture-main/issues/404#issuecomment-271521028 and https://webkit.org/b/167518) so this form is better.
Comment 7 youenn fablet 2017-04-04 20:35:19 PDT
Created attachment 306245 [details]
Patch for landing
Comment 8 WebKit Commit Bot 2017-04-04 20:36:51 PDT
Comment on attachment 306245 [details]
Patch for landing

Rejecting attachment 306245 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-02', 'apply-attachment', '--no-update', '--non-interactive', 306245, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
ChangeLog
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file LayoutTests/ChangeLog.rej
patching file LayoutTests/http/tests/media/media-stream/getusermedia-with-canvas-expected.txt
patching file LayoutTests/http/tests/media/media-stream/getusermedia-with-canvas.html
patching file LayoutTests/http/tests/media/media-stream/resources/getUserMedia-helper.js

Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Full output: http://webkit-queues.webkit.org/results/3475333
Comment 9 youenn fablet 2017-04-04 20:37:23 PDT
Thanks for the review.

(In reply to Eric Carlson from comment #6)
> Comment on attachment 306235 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=306235&action=review
> 
> > LayoutTests/http/tests/media/media-stream/resources/getUserMedia-helper.js:32
> > +    evalAndLog('video.srcObject = mediaStream');
> 
> Looks like you changed the test but not the results:

Right!

> > video.src = window.URL.createObjectURL(mediaStream)
> 
> URL.createObjectURL(mediastream) has been deprecated (see
> https://github.com/w3c/mediacapture-main/issues/404#issuecomment-271521028
> and https://webkit.org/b/167518) so this form is better.

Is there something that prevents us to remove it?
Comment 10 youenn fablet 2017-04-04 21:07:20 PDT
Created attachment 306247 [details]
Patch for landing
Comment 11 Eric Carlson 2017-04-04 21:29:11 PDT
(In reply to youenn fablet from comment #9)
> Thanks for the review.
> 
> (In reply to Eric Carlson from comment #6)
> > Comment on attachment 306235 [details]
> 
> > > video.src = window.URL.createObjectURL(mediaStream)
> > 
> > URL.createObjectURL(mediastream) has been deprecated (see
> > https://github.com/w3c/mediacapture-main/issues/404#issuecomment-271521028
> > and https://webkit.org/b/167518) so this form is better.
> 
> Is there something that prevents us to remove it?

No.
Comment 12 youenn fablet 2017-04-04 21:31:20 PDT
(In reply to Eric Carlson from comment #11)
> > Is there something that prevents us to remove it?
> 
> No.

Patch available at https://webkit.org/b/167518
Comment 13 WebKit Commit Bot 2017-04-04 21:48:07 PDT
Comment on attachment 306247 [details]
Patch for landing

Clearing flags on attachment: 306247

Committed r214928: <http://trac.webkit.org/changeset/214928>
Comment 14 WebKit Commit Bot 2017-04-04 21:48:08 PDT
All reviewed patches have been landed.  Closing bug.