New issue
Advanced search Search tips

Issue 776049 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , iOS , Chrome , Mac , Fuchsia
Pri: 3
Type: Bug

Blocking:
issue 772432



Sign in to add a comment

LocalFrame's user gesture entry points should move to Frame

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

Issue description

Almost everything LocalFrame::CreateUserGesture() and LocalFrame::NotifyUserActivation() does to frame hierarchy is specific to Frame.  There is one exception which misled my previous refactoring to add these LocalFrame entry points: we have LocalFrameClients listening to user gesture notifications (and no RemoteFrameClients).
https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/frame/LocalFrame.cpp?rcl=015b1d87acd07f08391c528a553f8753336bfe1e&l=1151

Though it's not clear to me why RemoteFrameClients don't care about it (Mounir, any idea?), we should move the entry point to Frame to make it modular.
 

Comment 1 by mustaq@chromium.org, Oct 18 2017

Labels: Hotlist-CodeHealth

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

Blocking: 772432
Project Member

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

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

commit 7b3d579f00d83dd6403cf8cb2883e1658a1cabcb
Author: Mustaq Ahmed <mustaq@google.com>
Date: Mon Oct 23 16:43:05 2017

Move user activation entry-points to Frame.

This CL moves user activation entrypoints from LocalFrame to Frame
because the activation states are maintained in Frame.  The
corresponding ref-fixing is done mostly automatically:
  grep -R --files-with-matches 'LocalFrame::CreateUserGesture' |\
  while read f; do\
    mv $f $f.bak;\
    cat $f.bak |\
    sed 's|LocalFrame::CreateUserGesture|Frame::NotifyUserActivation|'\
        > $f;\
    rm $f.bak;\
  done

The CL also renames Frame::HasReceivedUserGesture to HasBeenActivated
in a similarly way, and removes an old test (have a new version in dom/).

This is a code-cleanup CL w/o any functional change, to ease adding
Simple User Activation as an alternate for all user APIs of
UserGestureIndicator (upcoming CL).

Bug:  776049 
Change-Id: I670805bf5f14f2d4839a8713b8ce08a7a00adee5
Reviewed-on: https://chromium-review.googlesource.com/716842
Commit-Queue: Mustaq Ahmed <mustaq@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Reviewed-by: Rick Byers <rbyers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510818}
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/dom/Document.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/dom/Element.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/dom/UserGestureIndicatorTest.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/exported/WebFrame.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/exported/WebFrameTest.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/exported/WebInputMethodControllerImpl.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/exported/WebPluginContainerImpl.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/exported/WebScopedUserGesture.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/exported/WebUserGestureIndicator.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/exported/WebUserGestureTokenTest.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/exported/WebViewImpl.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/exported/WebViewTest.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/frame/Frame.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/frame/Frame.h
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/frame/FrameTest.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/frame/LocalFrame.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/frame/LocalFrame.h
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/frame/SuspendableScriptExecutor.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/frame/WebFrameWidgetBase.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/frame/WebFrameWidgetImpl.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/html/media/AutoplayPolicy.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/html/media/HTMLMediaElementEventListenersTest.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/html/media/HTMLVideoElementPersistentTest.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/html/media/MediaDocument.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/input/EventHandler.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/input/GestureManager.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/input/KeyboardEventManager.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/input/PointerEventManager.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/inspector/DevToolsHost.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/core/page/DragController.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/modules/media_controls/MediaControlsOrientationLockDelegateTest.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/modules/media_controls/MediaControlsRotateToFullscreenDelegate.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/modules/media_controls/MediaControlsRotateToFullscreenDelegateTest.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/modules/mediasession/MediaSession.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/modules/notifications/Notification.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/modules/remoteplayback/RemotePlaybackTest.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/modules/vibration/NavigatorVibration.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/modules/vr/NavigatorVR.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/modules/vr/latest/VR.cpp
[modify] https://crrev.com/7b3d579f00d83dd6403cf8cb2883e1658a1cabcb/third_party/WebKit/Source/modules/webaudio/BaseAudioContextTest.cpp
[delete] https://crrev.com/fa487d2858558b5b9e7c910ae309341279240a57/third_party/WebKit/Source/platform/UserGestureIndicatorTest.cpp

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

Status: Fixed (was: Assigned)
Labels: UserActivation

Sign in to add a comment