ephy-web-view: Always update the internal address when WebKitWebView:uri changes

Desktop / GNOME / Epiphany - Carlos Garcia Campos [igalia.com] - 5 December 2016 08:15 UTC

We are currently changing it manually, and only when WebKitWebView:uri changes if the page is loaded. This was needed with older versions of WebKit that didn't emit notify::uri for the pending API request URL. With current WebKit, as soon as you call webkit_view_load_*() you get a notify::uri with the pending API request URL. So, we can now update our address everytime WebKitWebView:uri changes to ensure out address is updated as soon as possible even before the provisional load event. This allows us to do things like

ephy_web_view_load_url(); ephy_web_view_get_is_blank();

When the load is committed the URI is considered final, and it never changes except for navigation to the same document. So, this patch also renames ephy_web_view_location_changed() as ephy_web_view_set_committed_location(), which is more accurate name, to properly update our internal address when we know is final.

9da559f ephy-web-view: Always update the internal address when WebKitWebView:uri changes
embed/ephy-web-view.c | 29 +++++------------------------
1 file changed, 5 insertions(+), 24 deletions(-)

Upstream: git.gnome.org


  • Share