{"action":"created","comment":{"url":"https://api.github.com/repos/servo/servo/pulls/comments/72761508","id":72761508,"diff_hunk":"@@ -215,6 +241,56 @@ function queryScript(url, callback) {\n   document.body.appendChild(script);\n }\n \n+function queryCssLink(url, callback, referrer_policy) {\n+  var x = document.createElement('script');\n+  x.src = '/common/utils.js';\n+  x.onerror = function() { console.log('whoops') };\n+  x.onload = function() { doQuery() };\n+  document.getElementsByTagName(\"head\")[0].appendChild(x);\n+\n+  function doQuery() {\n+    var id = token();\n+    var link = document.createElement(\"link\");\n+\n+    if (referrer_policy) {\n+      for (var attr in referrer_policy) {\n+        // TODO crashed when you assigned value to rel attribute\n+        if (attr === \"rel\") {\n+          link.relList.add(\"noreferrer\");\n+        } else {\n+          link[attr] = referrer_policy[attr];\n+        }\n+      }\n+    }\n+\n+    link.href = url + \"&id=\" + id;\n+    link.relList.add(\"stylesheet\");\n+\n+    // XXX Should be removed after \"onload\" event can be fired\n+    var timeout_func = setTimeout(function timeout() {\n+      var xhr = new XMLHttpRequest();\n+      xhr.open('GET', '/_mozilla/mozilla/referrer-policy/generic/subresource/stash.py?id=' + id, false);\n+      xhr.onreadystatechange = function(e) {\n+        if (this.readyState == 4 && this.status == 200) {","path":"tests/wpt/mozilla/tests/mozilla/referrer-policy/generic/common.js","position":null,"original_position":84,"commit_id":"a5615e3b8cc9b4ab335a175a6f01896973394c29","original_commit_id":"62577a379f3c3ae350ead80cff46419ee6189b55","user":{"login":"TheKK","id":5238484,"avatar_url":"https://avatars.githubusercontent.com/u/5238484?v=3","gravatar_id":"","url":"https://api.github.com/users/TheKK","html_url":"https://github.com/TheKK","followers_url":"https://api.github.com/users/TheKK/followers","following_url":"https://api.github.com/users/TheKK/following{/other_user}","gists_url":"https://api.github.com/users/TheKK/gists{/gist_id}","starred_url":"https://api.github.com/users/TheKK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheKK/subscriptions","organizations_url":"https://api.github.com/users/TheKK/orgs","repos_url":"https://api.github.com/users/TheKK/repos","events_url":"https://api.github.com/users/TheKK/events{/privacy}","received_events_url":"https://api.github.com/users/TheKK/received_events","type":"User","site_admin":false},"body":"fixed!","created_at":"2016-07-29T09:00:29Z","updated_at":"2016-07-29T09:00:29Z","html_url":"https://github.com/servo/servo/pull/12493#discussion_r72761508","pull_request_url":"https://api.github.com/repos/servo/servo/pulls/12493","_links":{"self":{"href":"https://api.github.com/repos/servo/servo/pulls/comments/72761508"},"html":{"href":"https://github.com/servo/servo/pull/12493#discussion_r72761508"},"pull_request":{"href":"https://api.github.com/repos/servo/servo/pulls/12493"}}},"pull_request":{"url":"https://api.github.com/repos/servo/servo/pulls/12493","id":77808856,"html_url":"https://github.com/servo/servo/pull/12493","diff_url":"https://github.com/servo/servo/pull/12493.diff","patch_url":"https://github.com/servo/servo/pull/12493.patch","issue_url":"https://api.github.com/repos/servo/servo/issues/12493","number":12493,"state":"open","locked":false,"title":"Implement referrer policy delivery via noreferrer link relation","user":{"login":"TheKK","id":5238484,"avatar_url":"https://avatars.githubusercontent.com/u/5238484?v=3","gravatar_id":"","url":"https://api.github.com/users/TheKK","html_url":"https://github.com/TheKK","followers_url":"https://api.github.com/users/TheKK/followers","following_url":"https://api.github.com/users/TheKK/following{/other_user}","gists_url":"https://api.github.com/users/TheKK/gists{/gist_id}","starred_url":"https://api.github.com/users/TheKK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheKK/subscriptions","organizations_url":"https://api.github.com/users/TheKK/orgs","repos_url":"https://api.github.com/users/TheKK/repos","events_url":"https://api.github.com/users/TheKK/events{/privacy}","received_events_url":"https://api.github.com/users/TheKK/received_events","type":"User","site_admin":false},"body":"According to https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-delivery, there's `<a>`, `<link>` and `<area>` could apply this delivery method. This PR contains changes for `<a>` and `<link>` **but** not `<area>`, since HTMLAreaElement is barely implemented.\r\n\r\nWe should file another issue for it.\r\n\r\n---\r\n- [X] `./mach build -d` does not report any errors\r\n- [X] `./mach test-tidy` does not report any errors\r\n- [X] These changes fix #11862\r\n- [X] There are tests for these changes\r\n\r\n<!-- Reviewable:start -->\r\n---\r\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/servo/servo/12493)\r\n<!-- Reviewable:end -->\r\n","created_at":"2016-07-18T13:35:39Z","updated_at":"2016-07-29T09:00:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c303255255e653fbc41e65c09dfe97afe03b0520","assignee":{"login":"jdm","id":27658,"avatar_url":"https://avatars.githubusercontent.com/u/27658?v=3","gravatar_id":"","url":"https://api.github.com/users/jdm","html_url":"https://github.com/jdm","followers_url":"https://api.github.com/users/jdm/followers","following_url":"https://api.github.com/users/jdm/following{/other_user}","gists_url":"https://api.github.com/users/jdm/gists{/gist_id}","starred_url":"https://api.github.com/users/jdm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdm/subscriptions","organizations_url":"https://api.github.com/users/jdm/orgs","repos_url":"https://api.github.com/users/jdm/repos","events_url":"https://api.github.com/users/jdm/events{/privacy}","received_events_url":"https://api.github.com/users/jdm/received_events","type":"User","site_admin":false},"assignees":[{"login":"jdm","id":27658,"avatar_url":"https://avatars.githubusercontent.com/u/27658?v=3","gravatar_id":"","url":"https://api.github.com/users/jdm","html_url":"https://github.com/jdm","followers_url":"https://api.github.com/users/jdm/followers","following_url":"https://api.github.com/users/jdm/following{/other_user}","gists_url":"https://api.github.com/users/jdm/gists{/gist_id}","starred_url":"https://api.github.com/users/jdm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdm/subscriptions","organizations_url":"https://api.github.com/users/jdm/orgs","repos_url":"https://api.github.com/users/jdm/repos","events_url":"https://api.github.com/users/jdm/events{/privacy}","received_events_url":"https://api.github.com/users/jdm/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/servo/servo/pulls/12493/commits","review_comments_url":"https://api.github.com/repos/servo/servo/pulls/12493/comments","review_comment_url":"https://api.github.com/repos/servo/servo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/servo/servo/issues/12493/comments","statuses_url":"https://api.github.com/repos/servo/servo/statuses/a5615e3b8cc9b4ab335a175a6f01896973394c29","head":{"label":"TheKK:referrer_policy_dliver_via_rel","ref":"referrer_policy_dliver_via_rel","sha":"a5615e3b8cc9b4ab335a175a6f01896973394c29","user":{"login":"TheKK","id":5238484,"avatar_url":"https://avatars.githubusercontent.com/u/5238484?v=3","gravatar_id":"","url":"https://api.github.com/users/TheKK","html_url":"https://github.com/TheKK","followers_url":"https://api.github.com/users/TheKK/followers","following_url":"https://api.github.com/users/TheKK/following{/other_user}","gists_url":"https://api.github.com/users/TheKK/gists{/gist_id}","starred_url":"https://api.github.com/users/TheKK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheKK/subscriptions","organizations_url":"https://api.github.com/users/TheKK/orgs","repos_url":"https://api.github.com/users/TheKK/repos","events_url":"https://api.github.com/users/TheKK/events{/privacy}","received_events_url":"https://api.github.com/users/TheKK/received_events","type":"User","site_admin":false},"repo":{"id":48875117,"name":"servo","full_name":"TheKK/servo","owner":{"login":"TheKK","id":5238484,"avatar_url":"https://avatars.githubusercontent.com/u/5238484?v=3","gravatar_id":"","url":"https://api.github.com/users/TheKK","html_url":"https://github.com/TheKK","followers_url":"https://api.github.com/users/TheKK/followers","following_url":"https://api.github.com/users/TheKK/following{/other_user}","gists_url":"https://api.github.com/users/TheKK/gists{/gist_id}","starred_url":"https://api.github.com/users/TheKK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheKK/subscriptions","organizations_url":"https://api.github.com/users/TheKK/orgs","repos_url":"https://api.github.com/users/TheKK/repos","events_url":"https://api.github.com/users/TheKK/events{/privacy}","received_events_url":"https://api.github.com/users/TheKK/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TheKK/servo","description":"The Servo Browser Engine","fork":true,"url":"https://api.github.com/repos/TheKK/servo","forks_url":"https://api.github.com/repos/TheKK/servo/forks","keys_url":"https://api.github.com/repos/TheKK/servo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TheKK/servo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TheKK/servo/teams","hooks_url":"https://api.github.com/repos/TheKK/servo/hooks","issue_events_url":"https://api.github.com/repos/TheKK/servo/issues/events{/number}","events_url":"https://api.github.com/repos/TheKK/servo/events","assignees_url":"https://api.github.com/repos/TheKK/servo/assignees{/user}","branches_url":"https://api.github.com/repos/TheKK/servo/branches{/branch}","tags_url":"https://api.github.com/repos/TheKK/servo/tags","blobs_url":"https://api.github.com/repos/TheKK/servo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TheKK/servo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TheKK/servo/git/refs{/sha}","trees_url":"https://api.github.com/repos/TheKK/servo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TheKK/servo/statuses/{sha}","languages_url":"https://api.github.com/repos/TheKK/servo/languages","stargazers_url":"https://api.github.com/repos/TheKK/servo/stargazers","contributors_url":"https://api.github.com/repos/TheKK/servo/contributors","subscribers_url":"https://api.github.com/repos/TheKK/servo/subscribers","subscription_url":"https://api.github.com/repos/TheKK/servo/subscription","commits_url":"https://api.github.com/repos/TheKK/servo/commits{/sha}","git_commits_url":"https://api.github.com/repos/TheKK/servo/git/commits{/sha}","comments_url":"https://api.github.com/repos/TheKK/servo/comments{/number}","issue_comment_url":"https://api.github.com/repos/TheKK/servo/issues/comments{/number}","contents_url":"https://api.github.com/repos/TheKK/servo/contents/{+path}","compare_url":"https://api.github.com/repos/TheKK/servo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TheKK/servo/merges","archive_url":"https://api.github.com/repos/TheKK/servo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TheKK/servo/downloads","issues_url":"https://api.github.com/repos/TheKK/servo/issues{/number}","pulls_url":"https://api.github.com/repos/TheKK/servo/pulls{/number}","milestones_url":"https://api.github.com/repos/TheKK/servo/milestones{/number}","notifications_url":"https://api.github.com/repos/TheKK/servo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TheKK/servo/labels{/name}","releases_url":"https://api.github.com/repos/TheKK/servo/releases{/id}","deployments_url":"https://api.github.com/repos/TheKK/servo/deployments","created_at":"2016-01-01T10:17:04Z","updated_at":"2016-01-01T00:37:31Z","pushed_at":"2016-07-29T08:58:32Z","git_url":"git://github.com/TheKK/servo.git","ssh_url":"git@github.com:TheKK/servo.git","clone_url":"https://github.com/TheKK/servo.git","svn_url":"https://github.com/TheKK/servo","homepage":"http://servo.org/","size":195402,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"servo:master","ref":"master","sha":"df1b00d43db615244e8e4bcf8296ed51b64249ea","user":{"login":"servo","id":2566135,"avatar_url":"https://avatars.githubusercontent.com/u/2566135?v=3","gravatar_id":"","url":"https://api.github.com/users/servo","html_url":"https://github.com/servo","followers_url":"https://api.github.com/users/servo/followers","following_url":"https://api.github.com/users/servo/following{/other_user}","gists_url":"https://api.github.com/users/servo/gists{/gist_id}","starred_url":"https://api.github.com/users/servo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/servo/subscriptions","organizations_url":"https://api.github.com/users/servo/orgs","repos_url":"https://api.github.com/users/servo/repos","events_url":"https://api.github.com/users/servo/events{/privacy}","received_events_url":"https://api.github.com/users/servo/received_events","type":"Organization","site_admin":false},"repo":{"id":3390243,"name":"servo","full_name":"servo/servo","owner":{"login":"servo","id":2566135,"avatar_url":"https://avatars.githubusercontent.com/u/2566135?v=3","gravatar_id":"","url":"https://api.github.com/users/servo","html_url":"https://github.com/servo","followers_url":"https://api.github.com/users/servo/followers","following_url":"https://api.github.com/users/servo/following{/other_user}","gists_url":"https://api.github.com/users/servo/gists{/gist_id}","starred_url":"https://api.github.com/users/servo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/servo/subscriptions","organizations_url":"https://api.github.com/users/servo/orgs","repos_url":"https://api.github.com/users/servo/repos","events_url":"https://api.github.com/users/servo/events{/privacy}","received_events_url":"https://api.github.com/users/servo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/servo/servo","description":"The Servo Browser Engine","fork":false,"url":"https://api.github.com/repos/servo/servo","forks_url":"https://api.github.com/repos/servo/servo/forks","keys_url":"https://api.github.com/repos/servo/servo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/servo/servo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/servo/servo/teams","hooks_url":"https://api.github.com/repos/servo/servo/hooks","issue_events_url":"https://api.github.com/repos/servo/servo/issues/events{/number}","events_url":"https://api.github.com/repos/servo/servo/events","assignees_url":"https://api.github.com/repos/servo/servo/assignees{/user}","branches_url":"https://api.github.com/repos/servo/servo/branches{/branch}","tags_url":"https://api.github.com/repos/servo/servo/tags","blobs_url":"https://api.github.com/repos/servo/servo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/servo/servo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/servo/servo/git/refs{/sha}","trees_url":"https://api.github.com/repos/servo/servo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/servo/servo/statuses/{sha}","languages_url":"https://api.github.com/repos/servo/servo/languages","stargazers_url":"https://api.github.com/repos/servo/servo/stargazers","contributors_url":"https://api.github.com/repos/servo/servo/contributors","subscribers_url":"https://api.github.com/repos/servo/servo/subscribers","subscription_url":"https://api.github.com/repos/servo/servo/subscription","commits_url":"https://api.github.com/repos/servo/servo/commits{/sha}","git_commits_url":"https://api.github.com/repos/servo/servo/git/commits{/sha}","comments_url":"https://api.github.com/repos/servo/servo/comments{/number}","issue_comment_url":"https://api.github.com/repos/servo/servo/issues/comments{/number}","contents_url":"https://api.github.com/repos/servo/servo/contents/{+path}","compare_url":"https://api.github.com/repos/servo/servo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/servo/servo/merges","archive_url":"https://api.github.com/repos/servo/servo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/servo/servo/downloads","issues_url":"https://api.github.com/repos/servo/servo/issues{/number}","pulls_url":"https://api.github.com/repos/servo/servo/pulls{/number}","milestones_url":"https://api.github.com/repos/servo/servo/milestones{/number}","notifications_url":"https://api.github.com/repos/servo/servo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/servo/servo/labels{/name}","releases_url":"https://api.github.com/repos/servo/servo/releases{/id}","deployments_url":"https://api.github.com/repos/servo/servo/deployments","created_at":"2012-02-08T19:07:25Z","updated_at":"2016-07-29T05:14:52Z","pushed_at":"2016-07-29T08:58:33Z","git_url":"git://github.com/servo/servo.git","ssh_url":"git@github.com:servo/servo.git","clone_url":"https://github.com/servo/servo.git","svn_url":"https://github.com/servo/servo","homepage":"https://servo.org/","size":272304,"stargazers_count":7634,"watchers_count":7634,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1222,"mirror_url":null,"open_issues_count":1639,"forks":1222,"open_issues":1639,"watchers":7634,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/servo/servo/pulls/12493"},"html":{"href":"https://github.com/servo/servo/pull/12493"},"issue":{"href":"https://api.github.com/repos/servo/servo/issues/12493"},"comments":{"href":"https://api.github.com/repos/servo/servo/issues/12493/comments"},"review_comments":{"href":"https://api.github.com/repos/servo/servo/pulls/12493/comments"},"review_comment":{"href":"https://api.github.com/repos/servo/servo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/servo/servo/pulls/12493/commits"},"statuses":{"href":"https://api.github.com/repos/servo/servo/statuses/a5615e3b8cc9b4ab335a175a6f01896973394c29"}}}}
{"actor":{"display_login":"TheKK"}}