Bug 216917 - Change the order of firing pagehide and visibility change steps
Summary: Change the order of firing pagehide and visibility change steps
Status: RESOLVED LATER
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-09-24 00:42 PDT by Rakina Zata Amni
Modified: 2020-10-01 02:23 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rakina Zata Amni 2020-09-24 00:42:29 PDT
The spec recently swapped the order of firing pagehide & updating visibility - previously we fire pagehide first then update visibility state. Now we should update visibility state first and then fire pagehide.

See https://github.com/whatwg/html/pull/5928 for details.
Comment 1 Chris Dumez 2020-09-25 18:27:19 PDT
Ahah funny. I have just implemented this in WebKit via Bug 151234 and purposefully did not use the ordering from the spec because it did not match the order in Firefox and Chrome. We even filed a bug against the spec and uploaded a PR:
https://github.com/whatwg/html/pull/5928

Oh well. Let's wait and see what other browsers do. If Chrome and Firefox actually implement this, we will follow. But for now, our behavior is the safest one.
Comment 2 Radar WebKit Bug Importer 2020-10-01 00:43:14 PDT
<rdar://problem/69826032>
Comment 3 Rakina Zata Amni 2020-10-01 02:23:30 PDT
Closing this for now until we get more data, per https://github.com/whatwg/html/pull/5949#pullrequestreview-500156401 :)