-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Videos autoplay with sound on cnn.com pages after refresh in Safari #15423
Videos autoplay with sound on cnn.com pages after refresh in Safari #15423
Conversation
EWS run on previous version of this PR (hash c3e08e5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM if the bots are happy.
if (auto* window = document->domWindow()) | ||
// https://html.spec.whatwg.org/multipage/interaction.html#user-activation-processing-model | ||
// When a user interaction causes firing of an activation triggering input event in a Document... | ||
// NOTE: Only activate the relevent DOMWindow when the gestureType is an ActivationTriggering one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: relevent
c3e08e5
to
51232c5
Compare
EWS run on previous version of this PR (hash 51232c5) |
51232c5
to
97acabf
Compare
EWS run on previous version of this PR (hash 97acabf) |
97acabf
to
06433aa
Compare
EWS run on previous version of this PR (hash 06433aa) |
06433aa
to
28177ab
Compare
EWS run on previous version of this PR (hash 28177ab) |
28177ab
to
186d761
Compare
EWS run on previous version of this PR (hash 186d761) |
186d761
to
e012322
Compare
EWS run on current version of this PR (hash e012322) |
https://bugs.webkit.org/show_bug.cgi?id=258696 rdar://110343800 Reviewed by Chris Dumez. The HTML specification defines a very narrow set of gesture events which will cause activation. WebKit currently triggers activation for all uses of UserGestureIndicator, which leads to things like "LeftCmd Up" after a Cmd-R to trigger playback during a reload. Add a set of helper methods `userGestureTypeForPlatformEvent()` to return the correct UserGestureType for a particular PlatformEvent. Update UserGestureIndicator to only set the activation timestamp of the window when passed a UserGestureType::ActivationTriggering. Make UserGestureType::ActivationTriggering the default to handle the currently large set of call sites that expect a user gesture to be triggered from a programmatic call. * LayoutTests/TestExpectations: * LayoutTests/imported/w3c/web-platform-tests/html/user-activation/activation-trigger-keyboard-enter-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/user-activation/activation-trigger-keyboard-escape-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/user-activation/activation-trigger-mouse-left-expected.txt: * Source/WebCore/dom/UserGestureIndicator.cpp: * Source/WebCore/dom/UserGestureIndicator.h: * Source/WebCore/page/EventHandler.cpp: (WebCore::userGestureTypeForPlatformEvent): (WebCore::EventHandler::handleMousePressEvent): (WebCore::EventHandler::handleMouseDoubleClickEvent): (WebCore::EventHandler::handleMouseReleaseEvent): (WebCore::EventHandler::internalKeyEvent): (WebCore::EventHandler::handleTouchEvent): Canonical link: https://commits.webkit.org/265688@main
e012322
to
f4cdea7
Compare
Committed 265688@main (f4cdea7): https://commits.webkit.org/265688@main Reviewed commits have been landed. Closing PR #15423 and removing active labels. |
f4cdea7
e012322