Bug 193765 - webkitpresentationmodechanged is fired twice when exiting picture in picture
Summary: webkitpresentationmodechanged is fired twice when exiting picture in picture
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari 12
Hardware: Mac macOS 10.14
: P2 Normal
Assignee: Peng Liu
URL: https://codepen.io/anon/pen/Noqmvx
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-01-24 02:45 PST by Oded
Modified: 2019-08-27 08:23 PDT (History)
6 users (show)

See Also:


Attachments
A WIP patch (2.22 KB, patch)
2019-08-21 18:09 PDT, Peng Liu
no flags Details | Formatted Diff | Diff
A patch to fix it (6.00 KB, patch)
2019-08-23 11:28 PDT, Peng Liu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oded 2019-01-24 02:45:11 PST
go to: https://codepen.io/anon/pen/Noqmvx (on safari)

1. start playing the video.
2. click on the picture in picture icon.
3. click on the 'x' (close) button in the picture in picture window.

There will be 3 events of 'webkitpresentationmodechanged':
1. one for entering PiP.
2. two for exiting PiP.

I would expect to have 1 event for the exit.
Comment 1 Radar WebKit Bug Importer 2019-01-24 13:39:43 PST
<rdar://problem/47527002>
Comment 2 Peng Liu 2019-08-21 18:09:32 PDT
Created attachment 376959 [details]
A WIP patch
Comment 3 EWS Watchlist 2019-08-21 18:12:24 PDT
Attachment 376959 [details] did not pass style-queue:


ERROR: Source/WebCore/ChangeLog:9:  You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible.  [changelog/nonewtests] [5]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Peng Liu 2019-08-23 11:28:06 PDT
Created attachment 377137 [details]
A patch to fix it
Comment 5 WebKit Commit Bot 2019-08-27 08:23:52 PDT
Comment on attachment 377137 [details]
A patch to fix it

Clearing flags on attachment: 377137

Committed r249141: <https://trac.webkit.org/changeset/249141>
Comment 6 WebKit Commit Bot 2019-08-27 08:23:54 PDT
All reviewed patches have been landed.  Closing bug.