Bug 215851

Summary: Webkit incorrectly setting visibilityState to "prerender" when opening link in new tab
Product: WebKit Reporter: Lucas <luc.amaral.silva>
Component: New BugsAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, berto, cdumez, cgarcia, darin, esprehn+autocc, ews-watchlist, ggaren, gustavo, kangil.han, kondapallykalyan, sam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 13   
Hardware: All   
OS: All   
See Also: https://bugs.webkit.org/show_bug.cgi?id=218789
Attachments:
Description Flags
Patch
none
Patch none

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].