New issue
Advanced search Search tips

Issue 728334 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature


Sign in to add a comment

Enable explicitly passing UserGesture state to a sub-frame

Project Member Reported by rbyers@chromium.org, May 31 2017

Issue description

Some sensitive operations (like playing audio) require a user gesture to be in progress (or have occurred) on the frame. But sometimes a frame is hidden and so cannot receive a user gesture itself.

For example, see the rdio use case at the top of  issue 178297 .

Many of these cases can be addressed with postMessage today ( issue 355658 ), but that's not standardized or easily discoverable.

We should design some sort of API to allow a frame to explicitly pass it's gesture privilege down to a particular sub-frame without the user having to interact with that sub-frame explicitly.

Probably blocked on the generic gesture simplification/standardization work in issue 696617.

 

Comment 1 by rbyers@chromium.org, May 31 2017

Components: Blink>FeaturePolicy

Comment 2 by bokan@chromium.org, Jun 1 2017

Status: Assigned (was: Untriaged)
Since the parent issue is restricted I will also comment on a very simple use case that is related. I'm currently working on a website that has videos to play using the vimeo player.

Because it is quite heavy and we don't want to overload the data connection of mobiles, the player are not loaded by default. We display an image with a play button on it. When the user click, we replace it with the vimeo iframe and want to play the video as soon as it is loaded.

The user's click triggered everything so we do respect the purpose of the limitation but it does not work because we lost our gesture privilege waiting for the frame to be ready. This is quite bothersome. It would be awesome if an iframe appended to the DOM with a gesture privilege could keep the gesture privilege as a whole or something like that.
Cc: mlamouri@chromium.org
I agree that playing the video in the iframe should be allowed in this case. I believe all this needs is passing the gesture info down to a dynamically added subframe.

Hi raynaudquentin@: do you have a minimal repro?

Labels: UserActivation
Blockedon: -696617
Blocking: 696617 867599
Labels: -Pri-3 Pri-2
Looks like UAv2 needs this solution before shipping, to allow sites to override UAv2's frame hierarchy.  See  Issue 867599 .
Blockedon: 897829
Blockedon: 696617
Blocking: -696617
We can't fix this before shipping UAv2 (Issue 696617) because subframe visibility is undefined in the current model (works only in same-process frames).
Project Member

Comment 9 by bugdroid1@chromium.org, Dec 8

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

commit a5dfa60b3ab28bde867a6a411c5c4fd0e28f1bc1
Author: Mustaq Ahmed <mustaq@google.com>
Date: Sat Dec 08 00:30:14 2018

Allow user activation propagation to same-origin frames.

This is an intermediate measure to mitigate UAv2 regressions for apps that
require same-origin visibility.  It temporarily makes Chrome's
implementation of UAv2 a bit closer to the old (v1) model, thus gives us
time to work on an iframe attribute to declaratively allow user activation
propagation to subframes (crbug.com/728334).  We will remove this
intermediate measure once the iframe attribute is ready.

Bug:  867599 , 728334
Change-Id: I67557a873177edf20ef809b2a976a740f32ed1d7
Reviewed-on: https://chromium-review.googlesource.com/c/1366761
Commit-Queue: Mustaq Ahmed <mustaq@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#614883}
[modify] https://crrev.com/a5dfa60b3ab28bde867a6a411c5c4fd0e28f1bc1/content/browser/frame_host/frame_tree_node.cc
[modify] https://crrev.com/a5dfa60b3ab28bde867a6a411c5c4fd0e28f1bc1/content/public/common/content_features.cc
[modify] https://crrev.com/a5dfa60b3ab28bde867a6a411c5c4fd0e28f1bc1/content/public/common/content_features.h
[modify] https://crrev.com/a5dfa60b3ab28bde867a6a411c5c4fd0e28f1bc1/third_party/blink/web_tests/fast/dom/Window/window-postmessage-user-gesture-expected.txt
[modify] https://crrev.com/a5dfa60b3ab28bde867a6a411c5c4fd0e28f1bc1/third_party/blink/web_tests/fast/dom/Window/window-postmessage-user-gesture.html
[modify] https://crrev.com/a5dfa60b3ab28bde867a6a411c5c4fd0e28f1bc1/third_party/blink/web_tests/fast/events/open-window-from-another-frame-expected.txt
[modify] https://crrev.com/a5dfa60b3ab28bde867a6a411c5c4fd0e28f1bc1/third_party/blink/web_tests/fast/events/open-window-from-another-frame.html
[modify] https://crrev.com/a5dfa60b3ab28bde867a6a411c5c4fd0e28f1bc1/third_party/blink/web_tests/fast/events/resources/open-window-from-another-frame-otherFrame.html
[modify] https://crrev.com/a5dfa60b3ab28bde867a6a411c5c4fd0e28f1bc1/third_party/blink/web_tests/virtual/user-activation-v2/fast/dom/Window/window-postmessage-user-gesture-expected.txt
[modify] https://crrev.com/a5dfa60b3ab28bde867a6a411c5c4fd0e28f1bc1/third_party/blink/web_tests/virtual/user-activation-v2/fast/events/open-window-from-another-frame-expected.txt

Blockedon: 867599
Blocking: -867599
Blockedon: 919461
We have got another case that needs activation delegation to subframes for an ideal fix.

Blocking: 922725

Comment 14 by mustaq@chromium.org, Jan 17 (5 days ago)

Blockedon: 923160
Project Member

Comment 15 by bugdroid1@chromium.org, Jan 18 (5 days ago)

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

commit 638e15167f366f1808c9122577ab881d18b25331
Author: Mustaq Ahmed <mustaq@google.com>
Date: Fri Jan 18 00:47:15 2019

Add renderer update for same-origin user activation visibility.

This CL fixes missing renderer-side update for corresponding brower-side
change (https://crrev.com/c/1366761).  This is part of an intermediate
measure to mitigate UAv2 regressions for apps that require same-origin
visibility.  We will eventually remove this through an iframe attribute
to declaratively allow user activation propagation to subframes
(crbug.com/728334).

Bug: 728334,  919461 
Change-Id: I2a1af7cf4f27f9dc402dfbf2c8e1c1b609fc1e65
TBR: avi@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/1410143
Commit-Queue: Mustaq Ahmed <mustaq@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Becca Hughes <beccahughes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623933}
[modify] https://crrev.com/638e15167f366f1808c9122577ab881d18b25331/chrome/browser/extensions/content_capabilities_browsertest.cc
[modify] https://crrev.com/638e15167f366f1808c9122577ab881d18b25331/content/child/runtime_features.cc
[modify] https://crrev.com/638e15167f366f1808c9122577ab881d18b25331/third_party/blink/public/platform/web_runtime_features.h
[modify] https://crrev.com/638e15167f366f1808c9122577ab881d18b25331/third_party/blink/renderer/core/frame/frame.cc
[modify] https://crrev.com/638e15167f366f1808c9122577ab881d18b25331/third_party/blink/renderer/platform/exported/web_runtime_features.cc
[modify] https://crrev.com/638e15167f366f1808c9122577ab881d18b25331/third_party/blink/renderer/platform/runtime_enabled_features.json5
[modify] https://crrev.com/638e15167f366f1808c9122577ab881d18b25331/third_party/blink/web_tests/TestExpectations

Project Member

Comment 16 by bugdroid1@chromium.org, Jan 21 (2 days ago)

Labels: merge-merged-3626
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b278e0a7674e87b095c551103a87a75acfa9f78b

commit b278e0a7674e87b095c551103a87a75acfa9f78b
Author: Mustaq Ahmed <mustaq@google.com>
Date: Mon Jan 21 19:15:18 2019

Add renderer update for same-origin user activation visibility.

This CL fixes missing renderer-side update for corresponding brower-side
change (https://crrev.com/c/1366761).  This is part of an intermediate
measure to mitigate UAv2 regressions for apps that require same-origin
visibility.  We will eventually remove this through an iframe attribute
to declaratively allow user activation propagation to subframes
(crbug.com/728334).

Bug: 728334,  919461 
Change-Id: I2a1af7cf4f27f9dc402dfbf2c8e1c1b609fc1e65
TBR: avi@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/1410143
Commit-Queue: Mustaq Ahmed <mustaq@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Becca Hughes <beccahughes@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#623933}(cherry picked from commit 638e15167f366f1808c9122577ab881d18b25331)
Reviewed-on: https://chromium-review.googlesource.com/c/1426002
Reviewed-by: Mustaq Ahmed <mustaq@chromium.org>
Cr-Commit-Position: refs/branch-heads/3626@{#744}
Cr-Branched-From: d897fb137fbaaa9355c0c93124cc048824eb1e65-refs/heads/master@{#612437}
[modify] https://crrev.com/b278e0a7674e87b095c551103a87a75acfa9f78b/chrome/browser/extensions/content_capabilities_browsertest.cc
[modify] https://crrev.com/b278e0a7674e87b095c551103a87a75acfa9f78b/content/child/runtime_features.cc
[modify] https://crrev.com/b278e0a7674e87b095c551103a87a75acfa9f78b/third_party/blink/public/platform/web_runtime_features.h
[modify] https://crrev.com/b278e0a7674e87b095c551103a87a75acfa9f78b/third_party/blink/renderer/core/frame/frame.cc
[modify] https://crrev.com/b278e0a7674e87b095c551103a87a75acfa9f78b/third_party/blink/renderer/platform/exported/web_runtime_features.cc
[modify] https://crrev.com/b278e0a7674e87b095c551103a87a75acfa9f78b/third_party/blink/renderer/platform/runtime_enabled_features.json5
[modify] https://crrev.com/b278e0a7674e87b095c551103a87a75acfa9f78b/third_party/blink/web_tests/TestExpectations

Project Member

Comment 17 by cr-audit...@appspot.gserviceaccount.com, Jan 21 (2 days ago)

Labels: Merge-Merged-72-3626
The following revision refers to this bug: 
https://chromium.googlesource.com/chromium/src.git/+/b278e0a7674e87b095c551103a87a75acfa9f78b

Commit: b278e0a7674e87b095c551103a87a75acfa9f78b
Author: mustaq@google.com
Commiter: mustaq@chromium.org
Date: 2019-01-21 19:15:18 +0000 UTC

Add renderer update for same-origin user activation visibility.

This CL fixes missing renderer-side update for corresponding brower-side
change (https://crrev.com/c/1366761).  This is part of an intermediate
measure to mitigate UAv2 regressions for apps that require same-origin
visibility.  We will eventually remove this through an iframe attribute
to declaratively allow user activation propagation to subframes
(crbug.com/728334).

Bug: 728334,  919461 
Change-Id: I2a1af7cf4f27f9dc402dfbf2c8e1c1b609fc1e65
TBR: avi@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/1410143
Commit-Queue: Mustaq Ahmed <mustaq@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Becca Hughes <beccahughes@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#623933}(cherry picked from commit 638e15167f366f1808c9122577ab881d18b25331)
Reviewed-on: https://chromium-review.googlesource.com/c/1426002
Reviewed-by: Mustaq Ahmed <mustaq@chromium.org>
Cr-Commit-Position: refs/branch-heads/3626@{#744}
Cr-Branched-From: d897fb137fbaaa9355c0c93124cc048824eb1e65-refs/heads/master@{#612437}

Comment 18 Deleted

Sign in to add a comment