| Summary: | Add a quirk to allow an embedded Twitter video to play with one tapping | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Peng Liu <peng.liu6> | ||||||
| Component: | New Bugs | Assignee: | Peng Liu <peng.liu6> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | cdumez, changseok, eric.carlson, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, jer.noble, mjs, philipj, sergio, webkit-bug-importer, youennf | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 248199 | ||||||||
| Attachments: |
|
||||||||
|
Description
Peng Liu
2020-05-14 16:11:14 PDT
Created attachment 399426 [details]
Patch
Comment on attachment 399426 [details]
Patch
Do we have any way to add tests for quirk? It would be better to add a test if at all possible.
Comment on attachment 399426 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=399426&action=review > Source/WebCore/html/MediaElementSession.cpp:319 > + if (topDocument.hasHadUserInteraction() && document.quirks().shouldAutoplayForArbitraryUserGesture()) We should probably update MediaElementSession::updateMediaUsageIfChanged as well, since it is doing document.hasHadUserInteraction() && document.quirks().shouldAutoplayForArbitraryUserGesture() as well. Maybe we should add a test for that document/topDocument change where the iframe did not interact but the top document (or another iframe) did. That would require Internals to be able to set the document quirks shouldAutoplayForArbitraryUserGesture() value. Created attachment 399675 [details]
Revise the patch based on Youenn's comment
(In reply to Maciej Stachowiak from comment #3) > Comment on attachment 399426 [details] > Patch > > Do we have any way to add tests for quirk? It would be better to add a test > if at all possible. We don't have the support to test quirks for now. We may need a non-trivial patch to enable it. Filed a bug for it: <webkit.org/b/212047>. Comment on attachment 399426 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=399426&action=review >> Source/WebCore/html/MediaElementSession.cpp:319 >> + if (topDocument.hasHadUserInteraction() && document.quirks().shouldAutoplayForArbitraryUserGesture()) > > We should probably update MediaElementSession::updateMediaUsageIfChanged as well, since it is doing document.hasHadUserInteraction() && document.quirks().shouldAutoplayForArbitraryUserGesture() as well. > Fixed it after confirmed with Eric. > Maybe we should add a test for that document/topDocument change where the iframe did not interact but the top document (or another iframe) did. > That would require Internals to be able to set the document quirks shouldAutoplayForArbitraryUserGesture() value. Filed a bug to add the support to test quirks <webkit.org/b/212047>. Comment on attachment 399675 [details]
Revise the patch based on Youenn's comment
r=me
Committed r261839: <https://trac.webkit.org/changeset/261839> All reviewed patches have been landed. Closing bug and clearing flags on attachment 399675 [details]. |