From b8fbb465b2dd76b7fd27582fe9d376d870f404e0 Mon Sep 17 00:00:00 2001 From: Gustavo Noronha Silva Date: Fri, 29 May 2009 12:29:38 -0300 Subject: Fix missing HTTP information when opening links in new tabs Bug #120341 This changeset reworks ephy_shell_new_tab_full (and its callers) to use a WebKitNetworkRequest instead of an URL when handling openning links in new tabs. This gains us the advantage of feeding the new WebView with the same WebKitNetworkRequest WebKit would use to navigate to the new address. --- src/ephy-session.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/ephy-session.c') diff --git a/src/ephy-session.c b/src/ephy-session.c index 4dabe3f46..d4e38b988 100644 --- a/src/ephy-session.c +++ b/src/ephy-session.c @@ -641,6 +641,7 @@ session_command_open_uris (EphySession *session, { const char *url = uris[i]; EphyNewTabFlags page_flags; + WebKitNetworkRequest *request; if (url[0] == '\0') { @@ -651,13 +652,15 @@ session_command_open_uris (EphySession *session, page_flags = EPHY_NEW_TAB_OPEN_PAGE; } + request = webkit_network_request_new (url); embed = ephy_shell_new_tab_full (shell, window, NULL /* parent tab */, - url, + request, flags | page_flags, EPHY_EMBED_CHROME_ALL, FALSE /* is popup? */, user_time); + g_object_unref (request); window = EPHY_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (embed))); } @@ -698,7 +701,7 @@ session_command_dispatch (EphySession *session) { ephy_shell_new_tab_full (ephy_shell_get_default (), NULL /* window */, NULL /* tab */, - NULL /* URL */, + NULL /* NetworkRequest */, EPHY_NEW_TAB_IN_NEW_WINDOW | EPHY_NEW_TAB_HOME_PAGE, EPHY_EMBED_CHROME_ALL, -- cgit v1.2.3