New issue
Advanced search Search tips

Issue 772432 link

Starred by 6 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug


Sign in to add a comment

Implement simple user activation behind a flag

Project Member Reported by mustaq@chromium.org, Oct 6 2017

Issue description

Here is the design doc for Simple User Activation:
https://docs.google.com/document/d/1erpl1yqJlc1pH0QvVVmi1s3WzqQLsEXTLLh6VuYp228/edit?usp=sharing

There are a few open questions like if we need both timeouts and consumptions, and if this works reasonably for post messages etc.

We need to start with some lab tests to answer these questions.

In this bug we will track only the impl progress.
 
Blocking: 696617

Comment 2 by mustaq@chromium.org, Oct 19 2017

Blockedon: 776049
Project Member

Comment 3 by bugdroid1@chromium.org, Oct 20 2017

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

commit c646c0a69815d1e82fe60c41514f24aacd401882
Author: Mustaq Ahmed <mustaq@google.com>
Date: Fri Oct 20 20:08:30 2017

Added UserActivationState to replace Frame's sticky state.

Also added a content_features entry to switch between the existing (UGI
based) model and the new (user activation based) model for the transient
activation.  We will gradually hook it up for all user APIs in follow-up
CLs.

This CL doesn't change any behavior when the new content feature is
disabled.

Bug:  772432 
Change-Id: I653fa783667be2c999b762286798ca38bd8c3c09
Reviewed-on: https://chromium-review.googlesource.com/705058
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Rick Byers <rbyers@chromium.org>
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Commit-Queue: Mustaq Ahmed <mustaq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510537}
[modify] https://crrev.com/c646c0a69815d1e82fe60c41514f24aacd401882/chrome/browser/about_flags.cc
[modify] https://crrev.com/c646c0a69815d1e82fe60c41514f24aacd401882/chrome/browser/flag_descriptions.cc
[modify] https://crrev.com/c646c0a69815d1e82fe60c41514f24aacd401882/chrome/browser/flag_descriptions.h
[modify] https://crrev.com/c646c0a69815d1e82fe60c41514f24aacd401882/content/child/runtime_features.cc
[modify] https://crrev.com/c646c0a69815d1e82fe60c41514f24aacd401882/content/public/common/content_features.cc
[modify] https://crrev.com/c646c0a69815d1e82fe60c41514f24aacd401882/content/public/common/content_features.h
[modify] https://crrev.com/c646c0a69815d1e82fe60c41514f24aacd401882/third_party/WebKit/Source/core/exported/LocalFrameClientImpl.cpp
[modify] https://crrev.com/c646c0a69815d1e82fe60c41514f24aacd401882/third_party/WebKit/Source/core/frame/BUILD.gn
[modify] https://crrev.com/c646c0a69815d1e82fe60c41514f24aacd401882/third_party/WebKit/Source/core/frame/Frame.cpp
[modify] https://crrev.com/c646c0a69815d1e82fe60c41514f24aacd401882/third_party/WebKit/Source/core/frame/Frame.h
[modify] https://crrev.com/c646c0a69815d1e82fe60c41514f24aacd401882/third_party/WebKit/Source/core/frame/LocalFrame.cpp
[modify] https://crrev.com/c646c0a69815d1e82fe60c41514f24aacd401882/third_party/WebKit/Source/core/frame/LocalFrame.h
[add] https://crrev.com/c646c0a69815d1e82fe60c41514f24aacd401882/third_party/WebKit/Source/core/frame/UserActivationState.cpp
[add] https://crrev.com/c646c0a69815d1e82fe60c41514f24aacd401882/third_party/WebKit/Source/core/frame/UserActivationState.h
[modify] https://crrev.com/c646c0a69815d1e82fe60c41514f24aacd401882/third_party/WebKit/Source/platform/exported/WebRuntimeFeatures.cpp
[modify] https://crrev.com/c646c0a69815d1e82fe60c41514f24aacd401882/third_party/WebKit/Source/platform/runtime_enabled_features.json5
[modify] https://crrev.com/c646c0a69815d1e82fe60c41514f24aacd401882/third_party/WebKit/public/platform/WebRuntimeFeatures.h
[modify] https://crrev.com/c646c0a69815d1e82fe60c41514f24aacd401882/tools/metrics/histograms/enums.xml

Comment 4 by mustaq@chromium.org, Oct 27 2017

Blockedon: 779103
Project Member

Comment 5 by bugdroid1@chromium.org, Oct 27 2017

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

commit 21471a3267702e3a851b688fa4fbb2e6f9ec7733
Author: Mustaq Ahmed <mustaq@google.com>
Date: Fri Oct 27 16:28:21 2017

Replaced UGI-state calls with corresponding Frame functions in Blink.

This CL replaces the calls to UGI::ProcessingUserGesture(),
ProcessingUserGestureThreadSafe() and ConsumeUserGesture() with
the corresponding entry-points in Frame to allow switching to User
Activation v2 model.

The changes here are within Blink only, don't modify WebUGI calls.

Bug:  772432 
Change-Id: I1a6b46a121a71b7719fd45d02143a1bb9cb43063
Reviewed-on: https://chromium-review.googlesource.com/737435
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Commit-Queue: Mustaq Ahmed <mustaq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512200}
[modify] https://crrev.com/21471a3267702e3a851b688fa4fbb2e6f9ec7733/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
[modify] https://crrev.com/21471a3267702e3a851b688fa4fbb2e6f9ec7733/third_party/WebKit/Source/core/frame/DOMTimer.cpp
[modify] https://crrev.com/21471a3267702e3a851b688fa4fbb2e6f9ec7733/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
[modify] https://crrev.com/21471a3267702e3a851b688fa4fbb2e6f9ec7733/third_party/WebKit/Source/core/frame/LocalFrame.cpp
[modify] https://crrev.com/21471a3267702e3a851b688fa4fbb2e6f9ec7733/third_party/WebKit/Source/core/frame/RemoteFrame.cpp
[modify] https://crrev.com/21471a3267702e3a851b688fa4fbb2e6f9ec7733/third_party/WebKit/Source/core/fullscreen/Fullscreen.cpp
[modify] https://crrev.com/21471a3267702e3a851b688fa4fbb2e6f9ec7733/third_party/WebKit/Source/core/html/forms/ChooserOnlyTemporalInputTypeView.cpp
[modify] https://crrev.com/21471a3267702e3a851b688fa4fbb2e6f9ec7733/third_party/WebKit/Source/core/html/forms/ColorInputType.cpp
[modify] https://crrev.com/21471a3267702e3a851b688fa4fbb2e6f9ec7733/third_party/WebKit/Source/core/html/forms/FileInputType.cpp
[modify] https://crrev.com/21471a3267702e3a851b688fa4fbb2e6f9ec7733/third_party/WebKit/Source/core/html/media/AutoplayPolicy.cpp
[modify] https://crrev.com/21471a3267702e3a851b688fa4fbb2e6f9ec7733/third_party/WebKit/Source/core/loader/FrameLoader.cpp
[modify] https://crrev.com/21471a3267702e3a851b688fa4fbb2e6f9ec7733/third_party/WebKit/Source/core/loader/NavigationScheduler.cpp
[modify] https://crrev.com/21471a3267702e3a851b688fa4fbb2e6f9ec7733/third_party/WebKit/Source/core/loader/ScheduledNavigation.cpp
[modify] https://crrev.com/21471a3267702e3a851b688fa4fbb2e6f9ec7733/third_party/WebKit/Source/core/page/CreateWindow.cpp
[modify] https://crrev.com/21471a3267702e3a851b688fa4fbb2e6f9ec7733/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp
[modify] https://crrev.com/21471a3267702e3a851b688fa4fbb2e6f9ec7733/third_party/WebKit/Source/modules/app_banner/BeforeInstallPromptEvent.cpp
[modify] https://crrev.com/21471a3267702e3a851b688fa4fbb2e6f9ec7733/third_party/WebKit/Source/modules/bluetooth/Bluetooth.cpp
[modify] https://crrev.com/21471a3267702e3a851b688fa4fbb2e6f9ec7733/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
[modify] https://crrev.com/21471a3267702e3a851b688fa4fbb2e6f9ec7733/third_party/WebKit/Source/modules/notifications/Notification.cpp
[modify] https://crrev.com/21471a3267702e3a851b688fa4fbb2e6f9ec7733/third_party/WebKit/Source/modules/notifications/NotificationManager.cpp
[modify] https://crrev.com/21471a3267702e3a851b688fa4fbb2e6f9ec7733/third_party/WebKit/Source/modules/permissions/Permissions.cpp
[modify] https://crrev.com/21471a3267702e3a851b688fa4fbb2e6f9ec7733/third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp
[modify] https://crrev.com/21471a3267702e3a851b688fa4fbb2e6f9ec7733/third_party/WebKit/Source/modules/push_messaging/PushManager.cpp
[modify] https://crrev.com/21471a3267702e3a851b688fa4fbb2e6f9ec7733/third_party/WebKit/Source/modules/quota/StorageManager.cpp
[modify] https://crrev.com/21471a3267702e3a851b688fa4fbb2e6f9ec7733/third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.cpp
[modify] https://crrev.com/21471a3267702e3a851b688fa4fbb2e6f9ec7733/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
[modify] https://crrev.com/21471a3267702e3a851b688fa4fbb2e6f9ec7733/third_party/WebKit/Source/modules/vr/latest/VRDevice.cpp
[modify] https://crrev.com/21471a3267702e3a851b688fa4fbb2e6f9ec7733/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp
[modify] https://crrev.com/21471a3267702e3a851b688fa4fbb2e6f9ec7733/third_party/WebKit/Source/modules/webmidi/MIDIAccessInitializer.cpp
[modify] https://crrev.com/21471a3267702e3a851b688fa4fbb2e6f9ec7733/third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp
[modify] https://crrev.com/21471a3267702e3a851b688fa4fbb2e6f9ec7733/third_party/WebKit/Source/modules/webusb/USB.cpp

Labels: UserActivation
For records: here is the commit message of my last CL in which I pasted a wrong bug number!

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

commit 07793973ebc6a0bc657eee9436d0c72b99583e46
Author: Mustaq Ahmed <mustaq@google.com>
Date: Thu Nov 02 19:18:56 2017

Remove unused 'user_gesture' bit from content::StorageQuotaParams.

This user code was removed here: crrev.com/1676203002

Bug:   747401  *wrong, should be this bug*
Change-Id: I8fb70c2ff681622d61503be8815484fef36c28d7
Reviewed-on: https://chromium-review.googlesource.com/749309
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Mustaq Ahmed <mustaq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#513578}
[modify] https://crrev.com/07793973ebc6a0bc657eee9436d0c72b99583e46/content/common/quota_messages.h
[modify] https://crrev.com/07793973ebc6a0bc657eee9436d0c72b99583e46/content/public/common/storage_quota_params.h
[modify] https://crrev.com/07793973ebc6a0bc657eee9436d0c72b99583e46/content/renderer/quota_dispatcher.cc

Project Member

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

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

commit e473e43552bf7aa8b547e11888da2410ba19491d
Author: Mustaq Ahmed <mustaq@google.com>
Date: Sat Nov 04 01:04:25 2017

Added UserActivationV2 support to WebUserGestureIndicator.

Also fixed most of the callers. We have two remaining groups
(extensions/renderer, content/renderer) with 6 refs in total
that still rely on IsProcessingUserGesture(nullptr).  We will
add plumbing for those in a followup CL.

Bug:  772432 
Change-Id: I660587b602722d0164ea9448440ea165e4ef6230
Reviewed-on: https://chromium-review.googlesource.com/747401
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org>
Reviewed-by: Rick Byers <rbyers@chromium.org>
Commit-Queue: Mustaq Ahmed <mustaq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#513999}
[modify] https://crrev.com/e473e43552bf7aa8b547e11888da2410ba19491d/chrome/renderer/extensions/webstore_bindings.cc
[modify] https://crrev.com/e473e43552bf7aa8b547e11888da2410ba19491d/components/autofill/content/renderer/autofill_agent.cc
[modify] https://crrev.com/e473e43552bf7aa8b547e11888da2410ba19491d/components/autofill/content/renderer/page_click_tracker.cc
[modify] https://crrev.com/e473e43552bf7aa8b547e11888da2410ba19491d/components/autofill/content/renderer/password_autofill_agent.cc
[modify] https://crrev.com/e473e43552bf7aa8b547e11888da2410ba19491d/content/renderer/accessibility/render_accessibility_impl.cc
[modify] https://crrev.com/e473e43552bf7aa8b547e11888da2410ba19491d/content/renderer/accessibility/render_accessibility_impl.h
[modify] https://crrev.com/e473e43552bf7aa8b547e11888da2410ba19491d/content/renderer/pepper/pepper_plugin_instance_impl.cc
[modify] https://crrev.com/e473e43552bf7aa8b547e11888da2410ba19491d/content/renderer/render_frame_impl.cc
[modify] https://crrev.com/e473e43552bf7aa8b547e11888da2410ba19491d/content/renderer/render_view_impl.cc
[modify] https://crrev.com/e473e43552bf7aa8b547e11888da2410ba19491d/content/renderer/render_widget_mouse_lock_dispatcher.cc
[modify] https://crrev.com/e473e43552bf7aa8b547e11888da2410ba19491d/content/renderer/web_ui_extension.cc
[modify] https://crrev.com/e473e43552bf7aa8b547e11888da2410ba19491d/content/shell/test_runner/test_plugin.cc
[modify] https://crrev.com/e473e43552bf7aa8b547e11888da2410ba19491d/content/shell/test_runner/test_plugin.h
[modify] https://crrev.com/e473e43552bf7aa8b547e11888da2410ba19491d/content/shell/test_runner/web_frame_test_client.cc
[modify] https://crrev.com/e473e43552bf7aa8b547e11888da2410ba19491d/extensions/renderer/request_sender.cc
[modify] https://crrev.com/e473e43552bf7aa8b547e11888da2410ba19491d/extensions/renderer/user_gestures_native_handler.cc
[modify] https://crrev.com/e473e43552bf7aa8b547e11888da2410ba19491d/media/blink/webmediaplayer_impl.cc
[modify] https://crrev.com/e473e43552bf7aa8b547e11888da2410ba19491d/third_party/WebKit/Source/core/exported/WebUserGestureIndicator.cpp
[modify] https://crrev.com/e473e43552bf7aa8b547e11888da2410ba19491d/third_party/WebKit/Source/core/exported/WebUserGestureTokenTest.cpp
[modify] https://crrev.com/e473e43552bf7aa8b547e11888da2410ba19491d/third_party/WebKit/Source/core/page/ChromeClientImpl.cpp
[modify] https://crrev.com/e473e43552bf7aa8b547e11888da2410ba19491d/third_party/WebKit/public/web/WebUserGestureIndicator.h

Project Member

Comment 9 by bugdroid1@chromium.org, Nov 8 2017

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

commit 7704bc2dc9ea723ae2723c897e0d55632ecb209a
Author: Mustaq Ahmed <mustaq@google.com>
Date: Wed Nov 08 16:41:35 2017

Update UserMediaClientImpl to use frame info for user gestures.

Bug:  772432 
Change-Id: I4aa6473e599023235ddac551d00161ac87b8e899
Reviewed-on: https://chromium-review.googlesource.com/757045
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Commit-Queue: Mustaq Ahmed <mustaq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#514855}
[modify] https://crrev.com/7704bc2dc9ea723ae2723c897e0d55632ecb209a/content/renderer/media/user_media_client_impl.cc

Project Member

Comment 10 by bugdroid1@chromium.org, Nov 30 2017

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

commit 32c563f028c1dc9f1249b17d88841ab4ee2f28fc
Author: Mustaq Ahmed <mustaq@google.com>
Date: Thu Nov 30 19:56:10 2017

User Activation v2 doesn't need DOMTimer token forwarding

This CL fixes the DOMTimer.cpp changes made in:
https://chromium-review.googlesource.com/737435

Bug:  772432 
Change-Id: I1e990d1ac595c99249996372fcdd93530eb43f41
Reviewed-on: https://chromium-review.googlesource.com/800730
Commit-Queue: Mustaq Ahmed <mustaq@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520651}
[modify] https://crrev.com/32c563f028c1dc9f1249b17d88841ab4ee2f28fc/third_party/WebKit/Source/core/frame/DOMTimer.cpp

Project Member

Comment 11 by bugdroid1@chromium.org, Jan 12 2018

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

commit e07873b65983cf07f53e7b22dfc8a0a1b3aac586
Author: Mustaq Ahmed <mustaq@google.com>
Date: Fri Jan 12 20:56:33 2018

Remove postmessage token propagation for UserActivation v2.

The new simpler model doesn't need API specific activation state
handling.

Bug:  772432 
Change-Id: I80df9528445feeda309fbec4d19f7a2063bb966c
Reviewed-on: https://chromium-review.googlesource.com/860992
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Mustaq Ahmed <mustaq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#529058}
[modify] https://crrev.com/e07873b65983cf07f53e7b22dfc8a0a1b3aac586/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp

Blockedon: 784999
Blockedon: 803203
Project Member

Comment 14 by bugdroid1@chromium.org, Jan 22 2018

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

commit c9b974a938128e900cc97563b089821742b88eaa
Author: Mustaq Ahmed <mustaq@google.com>
Date: Mon Jan 22 19:43:44 2018

Update media layout tests that rely on stack-allocated activation

These tests assume (current) UserGestureToken like behavior that
the user activation state is gone outside of the triggering event
loop.  UserActivationV2 would change it, fixing the tests
accordingly.

Bug:  772432 
Change-Id: I2bac89bb9043bb7545fd6e6860fb6b83dd74bb0c
Reviewed-on: https://chromium-review.googlesource.com/868573
Reviewed-by: Rick Byers <rbyers@chromium.org>
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Commit-Queue: Mustaq Ahmed <mustaq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530954}
[modify] https://crrev.com/c9b974a938128e900cc97563b089821742b88eaa/content/shell/test_runner/event_sender.cc
[modify] https://crrev.com/c9b974a938128e900cc97563b089821742b88eaa/content/shell/test_runner/event_sender.h
[modify] https://crrev.com/c9b974a938128e900cc97563b089821742b88eaa/third_party/WebKit/LayoutTests/media/autoplay-muted.html
[modify] https://crrev.com/c9b974a938128e900cc97563b089821742b88eaa/third_party/WebKit/LayoutTests/media/media-play-promise.html

Project Member

Comment 15 by bugdroid1@chromium.org, Jan 30 2018

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

commit 9a7a3991e35998df423168d6f550974d41944f72
Author: Mustaq Ahmed <mustaq@google.com>
Date: Tue Jan 30 20:10:22 2018

Remove user activation check for autofill provisional save.

The check is needed to avoid password prompt when a user clicks
a link instead of submitting a filled form.  The original condition
was a weak signal to detect click-on-link, and fails with
UserActivationV2 which changes the scope of a user activation.

For records, only one test relied on the original activation check
is PasswordManagerBrowserTestBase.NoPromptIfLinkClicked .

Bug:  803193 ,  772432 
Change-Id: I33545d9550f7bd125ff8eb739c998ee1f1a48c52
Reviewed-on: https://chromium-review.googlesource.com/884368
Commit-Queue: Mustaq Ahmed <mustaq@chromium.org>
Reviewed-by: Vasilii Sukhanov <vasilii@chromium.org>
Reviewed-by: Roger McFarlane <rogerm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533004}
[modify] https://crrev.com/9a7a3991e35998df423168d6f550974d41944f72/components/autofill/content/renderer/form_tracker.cc

Blockedon: -803203
Blocking: 802294 780556
Status: Fixed (was: Started)
Removing the code-health bug about v1 from this v2 implementation bug.

The main implementation is done.
- We are now adding OOPIF support through  Issue 780556 .
- We have been fixing/marking regressions through  Issue 802294  for a while already.

Sign in to add a comment