Bug 215851 - Webkit incorrectly setting visibilityState to "prerender" when opening link in new tab
Summary: Webkit incorrectly setting visibilityState to "prerender" when opening link i...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: Safari 13
Hardware: All All
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-08-26 07:58 PDT by Lucas
Modified: 2020-11-10 22:16 PST (History)
14 users (show)

See Also:


Attachments
Patch (16.51 KB, patch)
2020-11-10 14:43 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (18.07 KB, patch)
2020-11-10 15:36 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas 2020-08-26 07:58:23 PDT
Safari (and other webkit based browsers such as Epiphany) currently mark pages opened in a new tab as visibilityState = "prerender", when they should be "hidden" instead. 

Steps to reproduce:
1) Open https://output.jsbin.com/yibobad
2) Right click on the link, and open it in a new tab
3) Wait for the new tab to load, then navigate to it
4) The page should say "hidden", but instead it says "prerender"


"prerender" visibility state has been deprecated and removed from the w3c page visibility spec (http://go/mdn/API/Document/visibilityState, https://github.com/w3c/page-visibility/issues/42). Therefore marking new tabs as "prerender" is unexpected.
Comment 1 Radar WebKit Bug Importer 2020-08-26 11:17:26 PDT
<rdar://problem/67817100>
Comment 2 Chris Dumez 2020-11-10 14:43:58 PST
Created attachment 413743 [details]
Patch
Comment 3 EWS Watchlist 2020-11-10 14:44:34 PST
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See https://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 4 Geoffrey Garen 2020-11-10 15:33:27 PST
Comment on attachment 413743 [details]
Patch

r=me
Comment 5 Chris Dumez 2020-11-10 15:36:22 PST
Created attachment 413749 [details]
Patch
Comment 6 EWS 2020-11-10 16:54:17 PST
Committed r269665: <https://trac.webkit.org/changeset/269665>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 413749 [details].