Inject hinting script only in top frame #349.
authorDaniel Carl <danielcarl@gmx.de>
Sat, 6 May 2017 22:39:00 +0000 (00:39 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Sat, 6 May 2017 23:32:04 +0000 (01:32 +0200)
We can not address sub frame scripts at the time and the hinting script
is able to process also frames, when this is allowed according to the
same origin policy. So there is no need to inject the script into
multiple frames.

src/main.c

index cace512..89988bf 100644 (file)
@@ -1682,7 +1682,7 @@ static WebKitWebView *webview_new(Client *c, WebKitWebView *webview)
 
     /* Inject the global hints script. */
     script = webkit_user_script_new(HINTS,
-            WEBKIT_USER_CONTENT_INJECT_ALL_FRAMES,
+            WEBKIT_USER_CONTENT_INJECT_TOP_FRAME,
             WEBKIT_USER_SCRIPT_INJECT_AT_DOCUMENT_END, NULL, NULL);
     webkit_user_content_manager_add_script(ucm, script);
     webkit_user_script_unref(script);