Bug 91478

Summary: [GTK] No main resource in WebView when page has been loaded from history cache
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: gustavo, mrobinson, philn, webkit.review.bot, xan.lopez
Priority: P2 Keywords: Gtk
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Bug Depends on: 91495    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Updated patch gustavo: review+

Carlos Garcia Campos
Reported 2012-07-17 02:16:14 PDT
We are assuming that a resource loaded for the main frame that is provisionally loaded is the main resource of the web view. However that's not true for pages loaded from history cache, so when you go back/forward webkit_web_view_get_main_resource() always returns NULL.
Attachments
Patch (9.46 KB, patch)
2012-07-17 02:30 PDT, Carlos Garcia Campos
no flags
Updated patch (3.95 KB, patch)
2012-07-17 05:18 PDT, Carlos Garcia Campos
gustavo: review+
Carlos Garcia Campos
Comment 1 2012-07-17 02:30:39 PDT
WebKit Review Bot
Comment 2 2012-07-17 02:32:51 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Xan Lopez
Comment 3 2012-07-17 03:13:24 PDT
Comment on attachment 152722 [details] Patch OK, I'm going to make the obvious naive question. Why is WK lying to us when the page is loaded from the history cache? It does not make sense to try to fix that? (Also, mixing typo fixes with the bug fix, noooo)
Carlos Garcia Campos
Comment 4 2012-07-17 03:19:20 PDT
(In reply to comment #3) > (From update of attachment 152722 [details]) > OK, I'm going to make the obvious naive question. Why is WK lying to us when the page is loaded from the history cache? It does not make sense to try to fix that? I don't think WK is lying, it's just that pages loaded from the history cache are not provisionally loaded, but go directly to the committed state. I'm not loader expert, though. > (Also, mixing typo fixes with the bug fix, noooo) Oooooook, I'll split the patch :-)
Carlos Garcia Campos
Comment 5 2012-07-17 05:18:55 PDT
Created attachment 152741 [details] Updated patch Split the patch as suggested by Xan.
Carlos Garcia Campos
Comment 6 2012-07-17 07:47:13 PDT
Build issue is because it depends on bug #91495
Carlos Garcia Campos
Comment 7 2012-07-18 06:27:30 PDT
Note You need to log in before you can comment on or make changes to this bug.