El lun, 04-01-2016 a las 20:09 +0100, JeanLuc escribió: > 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.
This is the default behavior of all load methods, if there's an ongoing load it's silently cancelled and the new one is started. So, I don't think you need to manually cancel the current load and wait to be notified, just load the new contents. > 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.launc > hpad.net/~eviltwin1/feedreader/master/view/head:/src/Widgets/ArticleV > iew.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 -- Carlos Garcia Campos http://pgp.rediris.es:11371/pks/lookup?op=get&search=0xF3D322D0EC4582C3
signature.asc
Description: This is a digitally signed message part
_______________________________________________ webkit-gtk mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-gtk
