Bug 216917

Summary: Change the order of firing pagehide and visibility change steps
Product: WebKit Reporter: Rakina Zata Amni <rakina>
Component: DOMAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: cdumez, mike, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   

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:

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
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 :)