After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 695446 - [WK2] Missing call to webkit_uri_request_set_uri in ephy_web_view_load_request
[WK2] Missing call to webkit_uri_request_set_uri in ephy_web_view_load_request
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Backend
git master
Other Linux
: Normal normal
: ---
Assigned To: Xan Lopez
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-03-08 15:39 UTC by Manuel Rego Casasnovas
Modified: 2013-03-11 18:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (912 bytes, patch)
2013-03-08 15:40 UTC, Manuel Rego Casasnovas
committed Details | Review
Patch using webkit_web_view_load_request (1.19 KB, patch)
2013-03-09 18:45 UTC, Manuel Rego Casasnovas
committed Details | Review

Description Manuel Rego Casasnovas 2013-03-08 15:39:07 UTC
This request is used later in ephy_shell_new_tab_full to check if the new tab is empty or not and put the focus on the location entry or not.
Comment 1 Manuel Rego Casasnovas 2013-03-08 15:40:11 UTC
Created attachment 238375 [details] [review]
Patch
Comment 2 Xan Lopez 2013-03-08 16:19:48 UTC
Review of attachment 238375 [details] [review]:

Great.
Comment 3 Xan Lopez 2013-03-08 16:25:01 UTC
Pushed to master.
Comment 4 Carlos Garcia Campos 2013-03-09 09:38:55 UTC
Review of attachment 238375 [details] [review]:

::: embed/ephy-web-view.c
@@ +2865,3 @@
   effective_url = ephy_web_view_normalize_or_autosearch_url (view, url);
 
+  webkit_uri_request_set_uri (request, effective_url);

Changing the uri request and then loading it with webkit_web_view_load_uri() is useless, we used it because of the lack of set_uri, but not that you are changing it, you should use webkit_web_view_load_request() instead.
Comment 5 Xan Lopez 2013-03-09 10:00:56 UTC
(In reply to comment #4)
> Review of attachment 238375 [details] [review]:
> 
> ::: embed/ephy-web-view.c
> @@ +2865,3 @@
>    effective_url = ephy_web_view_normalize_or_autosearch_url (view, url);
> 
> +  webkit_uri_request_set_uri (request, effective_url);
> 
> Changing the uri request and then loading it with webkit_web_view_load_uri() is
> useless, we used it because of the lack of set_uri, but not that you are
> changing it, you should use webkit_web_view_load_request() instead.

The idea was that other listeners of the load process would get the right URI if they poke the request, so it does really matter that muchr how we do the load in this particular place.
Comment 6 Carlos Garcia Campos 2013-03-09 16:52:40 UTC
If we eventually have support for changing the headers of a uri request, and you call ephy_web_view_load_request() with a modified request, it won't work, so I guess it's safer to use webkit_web_view_load_request().
Comment 7 Manuel Rego Casasnovas 2013-03-09 18:45:58 UTC
Created attachment 238465 [details] [review]
Patch using webkit_web_view_load_request

As explained by Carlos it seems better to use webkit_web_view_load_request() in order to allow ephy_web_view_load_request() to be called with a modified request.
Comment 8 Xan Lopez 2013-03-09 20:46:43 UTC
Review of attachment 238465 [details] [review]:

Yep.