New issue
Advanced search Search tips

Issue 771388 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Allow capture of elements that have srcObject assigned

Project Member Reported by guidou@chromium.org, Oct 3 2017

Issue description

If the element has a MediaStream assigned as an srcObject, captureStream() will throw an exception because the cross-origin check fails.
However, this is incorrect because a MediaStream cannot be cross-origin as long as cross-origin capture is forbidden.

The reason the check fails is that the check uses the src, which is empty when the stream is assigned as an srcObject.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 4 2017

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

commit a443faa044b0e1472b36d35aaf425ae0ee6b2ac5
Author: Guido Urdaneta <guidou@chromium.org>
Date: Wed Oct 04 18:48:45 2017

Element capture: Do not check cross origin for elements with srcObject.

Elements with srcObject contain MediaStreams and they cannot be
cross origin since capture from cross-origin elements (with src)
is disabled.
The cross-origin check fails for mediaStreams since it uses the src,
which is empty when the stream has been assigned to the element as an
srcObject.

Bug:  771388 
Change-Id: I060ce54e37ba34814ac6186b0e098edfcc3d752e
Reviewed-on: https://chromium-review.googlesource.com/699434
Reviewed-by: Emircan Uysaler <emircan@chromium.org>
Commit-Queue: Guido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506465}
[modify] https://crrev.com/a443faa044b0e1472b36d35aaf425ae0ee6b2ac5/third_party/WebKit/Source/modules/mediacapturefromelement/HTMLMediaElementCapture.cpp

Status: Fixed (was: Assigned)
Status: Assigned (was: Fixed)
CL reverted. It caused  bug 772194 .
The CL requires the fix for  bug 771117  in order to avoid the bad cast to WMPI.
We can reland after closing  bug 771117 , or merge the CL into that fix.
Project Member

Comment 6 by bugdroid1@chromium.org, Oct 6 2017

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

commit b2294af33d807a684cc1ba48d7fafa4f431fca71
Author: Guido Urdaneta <guidou@chromium.org>
Date: Fri Oct 06 17:47:08 2017

Revert "Element capture: Do not check cross origin for elements with srcObject."

This reverts commit a443faa044b0e1472b36d35aaf425ae0ee6b2ac5.

Reason for revert:  crbug.com/772194 

Original change's description:
> Element capture: Do not check cross origin for elements with srcObject.
> 
> Elements with srcObject contain MediaStreams and they cannot be
> cross origin since capture from cross-origin elements (with src)
> is disabled.
> The cross-origin check fails for mediaStreams since it uses the src,
> which is empty when the stream has been assigned to the element as an
> srcObject.
> 
> Bug:  771388 
> Change-Id: I060ce54e37ba34814ac6186b0e098edfcc3d752e
> Reviewed-on: https://chromium-review.googlesource.com/699434
> Reviewed-by: Emircan Uysaler <emircan@chromium.org>
> Commit-Queue: Guido Urdaneta <guidou@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#506465}

TBR=emircan@chromium.org,guidou@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug:  771388 
Change-Id: I1af0843745c5624802d4b9c75c4a06d99742be20
Reviewed-on: https://chromium-review.googlesource.com/704936
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Commit-Queue: Guido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#507115}
[modify] https://crrev.com/b2294af33d807a684cc1ba48d7fafa4f431fca71/third_party/WebKit/Source/modules/mediacapturefromelement/HTMLMediaElementCapture.cpp

Project Member

Comment 7 by bugdroid1@chromium.org, Oct 7 2017

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

commit 113567d11fbef2f667155a7456fe8cb220844524
Author: Guido Urdaneta <guidou@chromium.org>
Date: Sat Oct 07 11:09:36 2017

Reland "Element capture: Do not check cross origin for elements with srcObject."

This is a reland of a443faa044b0e1472b36d35aaf425ae0ee6b2ac5
Original change's description:
> Element capture: Do not check cross origin for elements with srcObject.
> 
> Elements with srcObject contain MediaStreams and they cannot be
> cross origin since capture from cross-origin elements (with src)
> is disabled.
> The cross-origin check fails for mediaStreams since it uses the src,
> which is empty when the stream has been assigned to the element as an
> srcObject.
> 
> Bug:  771388 
> Change-Id: I060ce54e37ba34814ac6186b0e098edfcc3d752e
> Reviewed-on: https://chromium-review.googlesource.com/699434
> Reviewed-by: Emircan Uysaler <emircan@chromium.org>
> Commit-Queue: Guido Urdaneta <guidou@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#506465}

Now that https://crrev.com/c/699747 has landed, it is safe to reland this.

TBR=emircan@chromium.org

Bug:  771388 
Change-Id: I7ae8ec814985ce218b4d17c39d0c1d406c0a86b4
Reviewed-on: https://chromium-review.googlesource.com/706254
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Commit-Queue: Guido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#507292}
[modify] https://crrev.com/113567d11fbef2f667155a7456fe8cb220844524/third_party/WebKit/Source/modules/mediacapturefromelement/HTMLMediaElementCapture.cpp

Comment 8 by guidou@chromium.org, Oct 10 2017

Status: Fixed (was: Assigned)

Sign in to add a comment