Igalia / wolvic

A fast and secure browser for standalone virtual-reality and augmented-reality headsets.
https://wolvic.org
Mozilla Public License 2.0
813 stars 105 forks source link

Synthesize FCP for cached pages #1217

Closed svillar closed 9 months ago

svillar commented 9 months ago

Our current code relies on the first-contentful-paint event to among other things show the currently active window. That event is neither emitted for pages loaded from back/forward cache nor for pages completely cached by the HTTP cache.

This means that whenever we start Wolvic with a page that is fully cached (like for example our start page) then Wolvic will show a transparent window even if the page is properly completelly loaded from disk.

svillar commented 9 months ago

This is an alternative to #1207

svillar commented 9 months ago

Whoops, withdraw my approval. It's still not working for tab bitmaps, also it still shows an empty page when I switch tabs.

Good catch, I was triggering the event just for the Widget. We should trigger it on the session and the widget will get it later.

As a nice side effect of investigating it, I'm adding an extra commit to prevent some code from running when it should not.

Meanwhile, #1207 should fix all these issues, let me know if you find others. com.igalia.wolvic-20240201-192430.mp4

Yeah, I still consider #1207 the way to go. However we need an analysis of the current use cases and a proper design before switching paradigms on how we do it.

svillar commented 9 months ago

Thanks for the extensive testing!