Skip to content

Commit

Permalink
Add itp for #47
Browse files Browse the repository at this point in the history
  • Loading branch information
jun7 committed Mar 19, 2021
1 parent 850d234 commit de8924a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions general.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ static Conf dconf[] = {
{"all" , "winheight" , "1000"},
{"all" , "zoom" , "1.000"},
{"all" , "ignoretlserr" , "false"},
{"all" , "itp" , "false"},
{"all" , "histviewsize" , "99"},
{"all" , "histimgs" , "99"},
{"all" , "histimgsize" , "222"},
Expand Down
12 changes: 12 additions & 0 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1048,10 +1048,16 @@ static void checkconf(const char *mp)
initconf(new);

if (ctx)
{
webkit_web_context_set_tls_errors_policy(ctx,
confbool("ignoretlserr") ?
WEBKIT_TLS_ERRORS_POLICY_IGNORE :
WEBKIT_TLS_ERRORS_POLICY_FAIL);
#if WEBKIT_MAJOR_VERSION > 2 || WEBKIT_MINOR_VERSION > 28
webkit_website_data_manager_set_itp_enabled(
webkit_web_context_get_website_data_manager(ctx), confbool("itp"));
#endif
}

if (!wins) return;

Expand Down Expand Up @@ -4663,6 +4669,12 @@ Win *newwin(const char *uri, Win *cbwin, Win *caller, int back)
if (confbool("ignoretlserr"))
webkit_web_context_set_tls_errors_policy(ctx,
WEBKIT_TLS_ERRORS_POLICY_IGNORE);

#if WEBKIT_MAJOR_VERSION > 2 || WEBKIT_MINOR_VERSION > 28
if (confbool("itp"))
webkit_website_data_manager_set_itp_enabled(
webkit_web_context_get_website_data_manager(ctx), true);
#endif
}
WebKitUserContentManager *cmgr = webkit_user_content_manager_new();
win->kito = cbwin ?
Expand Down

0 comments on commit de8924a

Please sign in to comment.