Closed Bug 1679735 Opened 4 years ago Closed 4 years ago

Require recent user gesture for getDisplayMedia()

Categories

(Core :: WebRTC: Audio/Video, defect, P2)

defect

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: karlt, Assigned: karlt)

References

(Depends on 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(2 files)

"triggered by user activation" seems to have been the intention of "called from a user gesture handler".

The spec has since loosened this to "transient activation".

Previous behavior was to allow requests if the user has ever interacted with
the window. This patch changes from sticky activation to transient
activation.

WindowContext is used rather than Document for the
HasValidTransientUserGestureActivation() test because user activation is a
property of the Window/global.

The error reported when WindowContext is null is the same as that for missing
transient activation, which is keeping the existing behavior.
https://searchfox.org/mozilla-central/rev/66547980e8e8ca583473c74f207cae5bac1ed541/dom/base/Document.cpp#15806
i.e. a missing WindowContext is still treated as missing transient activation.

Depends on D98274

Pushed by ktomlinson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5e17b1112257
test getDisplayMedia() after user activation is consumed r=jib
https://hg.mozilla.org/integration/autoland/rev/1fcd9c941737
require recent user gesture for getDisplayMedia() r=jib

Backed out for failures on getdisplaymedia-user-activation-consumed.https.html

backout: https://hg.mozilla.org/integration/autoland/rev/b1b96cd1f5513abfce62062e8f905dd4491c896c

push: https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&revision=1fcd9c94173733aa56a49f0dbeff890bd9557b62

failure log: https://treeherder.mozilla.org/logviewer?job_id=324017237&repo=autoland&lineNumber=3609

[task 2020-12-09T07:27:15.566Z] 07:27:15 INFO - TEST-FAIL | /svg/struct/UnknownElement/interface.svg | Interface of unknown element - SVGUnknownElement is not defined
[task 2020-12-09T07:27:15.566Z] 07:27:15 INFO - @http://web-platform.test:8000/svg/struct/UnknownElement/interface.svg:16:5
[task 2020-12-09T07:27:15.566Z] 07:27:15 INFO - Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:2044:25
[task 2020-12-09T07:27:15.566Z] 07:27:15 INFO - test@http://web-platform.test:8000/resources/testharness.js:572:30
[task 2020-12-09T07:27:15.566Z] 07:27:15 INFO - @http://web-platform.test:8000/svg/struct/UnknownElement/interface.svg:14:5
[task 2020-12-09T07:27:15.566Z] 07:27:15 INFO - TEST-UNEXPECTED-FAIL | /_mozilla/screen-capture/getdisplaymedia-user-activation-consumed.https.html | Test getDisplayMedia() after user activation is consumed - promise_test: Unhandled rejection with value: object "TypeError: navigator.mediaDevices.getDisplayMedia is not a function"
[task 2020-12-09T07:27:15.675Z] 07:27:15 INFO - TEST-OK | /_mozilla/screen-capture/getdisplaymedia-user-activation-consumed.https.html | took 729ms

Flags: needinfo?(karlt)
Flags: needinfo?(karlt)
Pushed by ktomlinson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/227f7ace8545
test getDisplayMedia() after user activation is consumed r=jib
https://hg.mozilla.org/integration/autoland/rev/3faff9d75a5d
require recent user gesture for getDisplayMedia() r=jib
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
Regressions: 1704278
Depends on: 1557174
See Also: → 1705289
Regressed by: 1704278
No longer regressions: 1704278
Has Regression Range: --- → yes

Set release status flags based on info from the regressing bug 1704278

Sorry for the noise, I was debugging the bot and wrongly run it.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: