Hi Guys and Girls,

Not sure if this is the right place to ask, but here it goes:
I am using Webkit2Gtk+ in my RSS-Reader to display the articles.
But I have issues when the user is switching very fast between articles or the articles are very big/with lots of images or videos. Once a new article is selected I immediately cancel the loading of the current one with "stop_loading()". Then I wait until the "load_failed"-signal is triggered with the "webkit_network_error_cancelled" error. Only after that I start loading the new article. But still, sometimes after stopping the loading I receive "load_changed"-events after the successful cancel.
Here is a small part of a log that displays the problem:


[ DEBUG ] ArticleView: load article 91799
[ DEBUG ] ArticleView: load STARTED
[ DEBUG ] ArticleView: load COMMITTED
[ DEBUG ] ArticleView: load FINISHED
[ DEBUG ] contentPage: set headerbar
[ DEBUG ] ArticleView: load article 92595
[ DEBUG ] ArticleView: load STARTED
[ DEBUG ] ArticleView: load COMMITTED
[ DEBUG ] contentPage: set headerbar
[ DEBUG ] ArticleView: load article 92675
[ DEBUG ] ArticleView: load FINISHED
[ DEBUG ] contentPage: set headerbar
[ DEBUG ] ArticleView: load article 93127
[ DEBUG ] ArticleView: load STARTED
[ DEBUG ] ArticleView: load COMMITTED
[ DEBUG ] contentPage: set headerbar
[ DEBUG ] ArticleView: load article 91940
[ DEBUG ] ArticleView: load FINISHED

As you can see the first article (91799) is loading fine. The second one is (92595) is canceled before it is finished loading by the next request (92675) but the "WebKit.LoadEvent.FINISHED" is still reached afterwards. The same problem with article 93127 that should be canceled by 91940. Only difference is, article 93127 finishes loading after it should be already canceled and article 91940 never starts loading.
So the wrong article is now shown in the article-view of my application.
Sometimes not only the wrong article is shown but only a white blank page (but I could not reproduce this right now).

What I want the code to do is, load the requested article immediately and cancel the old load request. When a URL in the loaded article is clicked it should open in the default browser.

This is the WebkitGtk+ relevant part of my code: http://pastebin.com/v9QdE1FN Or if someone wants to have a look at all of it: http://bazaar.launchpad.net/~eviltwin1/feedreader/master/view/head:/src/Widgets/ArticleView.vala Here is also a bug report of someone else having the same issues with the application: https://bugs.launchpad.net/feedreader/+bug/1529872

Can anyone help me with this? :)

Thx in advance

Jan Lukas
_______________________________________________
webkit-gtk mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-gtk

Reply via email to