There's no need to call geturi() again in loadchanged
Also call the variable “uri” instead of “title” which was ambiguous regarding what it is.
This commit is contained in:
parent
4a1876eb80
commit
5e2216c414
1 changed files with 7 additions and 7 deletions
14
surf.c
14
surf.c
|
@ -1375,23 +1375,23 @@ loadfailedtls(WebKitWebView *v, gchar *uri, GTlsCertificate *cert,
|
||||||
void
|
void
|
||||||
loadchanged(WebKitWebView *v, WebKitLoadEvent e, Client *c)
|
loadchanged(WebKitWebView *v, WebKitLoadEvent e, Client *c)
|
||||||
{
|
{
|
||||||
const char *title = geturi(c);
|
const char *uri = geturi(c);
|
||||||
|
|
||||||
switch (e) {
|
switch (e) {
|
||||||
case WEBKIT_LOAD_STARTED:
|
case WEBKIT_LOAD_STARTED:
|
||||||
setatom(c, AtomUri, title);
|
setatom(c, AtomUri, uri);
|
||||||
c->title = title;
|
c->title = uri;
|
||||||
c->https = c->insecure = 0;
|
c->https = c->insecure = 0;
|
||||||
seturiparameters(c, geturi(c));
|
seturiparameters(c, uri);
|
||||||
if (c->errorpage)
|
if (c->errorpage)
|
||||||
c->errorpage = 0;
|
c->errorpage = 0;
|
||||||
else
|
else
|
||||||
g_clear_object(&c->failedcert);
|
g_clear_object(&c->failedcert);
|
||||||
break;
|
break;
|
||||||
case WEBKIT_LOAD_REDIRECTED:
|
case WEBKIT_LOAD_REDIRECTED:
|
||||||
setatom(c, AtomUri, title);
|
setatom(c, AtomUri, uri);
|
||||||
c->title = title;
|
c->title = uri;
|
||||||
seturiparameters(c, geturi(c));
|
seturiparameters(c, uri);
|
||||||
break;
|
break;
|
||||||
case WEBKIT_LOAD_COMMITTED:
|
case WEBKIT_LOAD_COMMITTED:
|
||||||
c->https = webkit_web_view_get_tls_info(c->view, &c->cert,
|
c->https = webkit_web_view_get_tls_info(c->view, &c->cert,
|
||||||
|
|
Loading…
Reference in a new issue