Bug 91478 - [GTK] No main resource in WebView when page has been loaded from history cache
Summary: [GTK] No main resource in WebView when page has been loaded from history cache
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on: 91495
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-17 02:16 PDT by Carlos Garcia Campos
Modified: 2012-07-18 06:27 PDT (History)
5 users (show)

See Also:


Attachments
Patch (9.46 KB, patch)
2012-07-17 02:30 PDT, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff
Updated patch (3.95 KB, patch)
2012-07-17 05:18 PDT, Carlos Garcia Campos
gustavo: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 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.
Comment 1 Carlos Garcia Campos 2012-07-17 02:30:39 PDT
Created attachment 152722 [details]
Patch
Comment 2 WebKit Review Bot 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
Comment 3 Xan Lopez 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)
Comment 4 Carlos Garcia Campos 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 :-)
Comment 5 Carlos Garcia Campos 2012-07-17 05:18:55 PDT
Created attachment 152741 [details]
Updated patch

Split the patch as suggested by Xan.
Comment 6 Carlos Garcia Campos 2012-07-17 07:47:13 PDT
Build issue is because it depends on bug #91495
Comment 7 Carlos Garcia Campos 2012-07-18 06:27:30 PDT
Committed r122960: <http://trac.webkit.org/changeset/122960>