Switch browsing history away from QWebHistoryInterface and add titles. #1350
Changes history items to be added when initialLayoutCompleted is fired as opposed to when navigation is initiated. Regarding #1345 this method saves the final url after redirects and doesn't save the url of the redirect.
There are some things I am unsure about:
Here is some comparisons with dwb and otter:
Otter (for the qtwebkit backend at least) calls handleHistory() at a few
dwb and QupZilla use load finished. They only save the final page on
This method, the old method, dwb and otter all save the requested url to
I added the call to setDefaultInterface back and that works. Though with the whole not saving redirects thing sites, like search engine result pages, that link via redirectors don't show their links as visited. Maybe it would be best to save both urls clicked on and pages visited. Bit more noise in the history file but that isn't an issue. Just need to control for duplicates...
Adds a title to the HistoryEntry class and includes it in the serialization stuff. Not currently set from anywhere. Not sure if anything more needs to be done to support non-ascii characters. Everything works fine for me with unicode chars in url and title but everything in my stack is utf-8.
Now adds a url to browser history once we have connected and got enough data to start rendering the page. The previous approach saved urls as soon as navigation was initiated, so upon encountering a redirect the final url wasn't saved. Using layout started rather than load finished means that pages whose contents manage to load minus one troublesome asset will still be saved.
This allows webkit to color links that are clicked on but never rendered as visited too. It also means if you get redirected from eg http://site.com to http://site.com/ you have essentially duplicates in your history. This makes the history completion a bit noisier. I suppose normalising paths before checking for duplicates might help. Also note that otter has an isTypedIn flag which might be used for dealing with this.