Bug 164105 - didFinishDocumentLoadForFrame never called when document is restored from page cache
Summary: didFinishDocumentLoadForFrame never called when document is restored from pag...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: Other
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-27 20:23 PDT by Michael Catanzaro
Modified: 2016-10-31 00:31 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2016-10-27 20:23:00 PDT
WebKitWebPage:document-loaded is never called for documents restored from the page cache. It causes a weird glitch in the Epiphany about:overview. Open the overview, navigate to another page, navigate back, then middle-click or Ctrl+click on an overview thumbnail. All the overview thumbnails get duplicated. It happens because Epiphany is expecting the document-loaded signal to be called when the page is loaded and gets very confused when this doesn't occur.

I think it should probably be emitted as it's quite a trap for applications otherwise, but if this is the desired behavior then it really needs to be documented.
Comment 1 Michael Catanzaro 2016-10-27 20:39:08 PDT
Or maybe it would be an even bigger trap for document-loaded to be emitted multiple times for the same document. Then we should just... *document* this. ;)
Comment 2 Carlos Garcia Campos 2016-10-30 02:06:00 PDT
I don't think this is GTK+ specific bug, we just emit document-loaded when didFinishDocumentLoadForFrame callback is called.
Comment 3 Michael Catanzaro 2016-10-30 08:13:22 PDT
(In reply to comment #1)
> Or maybe it would be an even bigger trap for document-loaded to be emitted
> multiple times for the same document. Then we should just... *document*
> this. ;)

I've been thinking about this. There really needs to be some way to find out when a WebKitWebPage has loaded a new page, and document-loaded is surely the right way to do that.