{"action":"created","comment":{"url":"https://api.github.com/repos/servo/servo/pulls/comments/41836172","id":41836172,"diff_hunk":"@@ -1206,12 +1206,44 @@ impl DocumentMethods for Document {\n \n     // https://dom.spec.whatwg.org/#dom-document-characterset\n     fn CharacterSet(&self) -> DOMString {\n-        self.encoding_name.borrow().clone()\n+        match (*(self.encoding_name.borrow())).as_ref() {\n+            \"utf-8\"         =>  \"UTF-8\",\n+            \"ibm866\"        =>  \"IBM866\",\n+            \"iso-8859-2\"    =>  \"ISO-8859-2\",\n+            \"iso-8859-3\"    =>  \"ISO-8859-3\",\n+            \"iso-8859-4\"    =>  \"ISO-8859-4\",\n+            \"iso-8859-5\"    =>  \"ISO-8859-5\",\n+            \"iso-8859-6\"    =>  \"ISO-8859-6\",\n+            \"iso-8859-7\"    =>  \"ISO-8859-7\",\n+            \"iso-8859-8\"    =>  \"ISO-8859-8\",\n+            \"iso-8859-8-i\"  =>  \"ISO-8859-8-I\",\n+            \"iso-8859-10\"   =>  \"ISO-8859-10\",\n+            \"iso-8859-13\"   =>  \"ISO-8859-13\",\n+            \"iso-8859-14\"   =>  \"ISO-8859-14\",\n+            \"iso-8859-15\"   =>  \"ISO-8859-15\",\n+            \"iso-8859-16\"   =>  \"ISO-8859-16\",\n+            \"koi8-r\"        =>  \"KOI8-R\",\n+            \"koi8-u\"        =>  \"KOI8-U\",\n+            \"gbk\"           =>  \"GBK\",\n+            \"big5\"          =>  \"Big5\",\n+            \"euc-jp\"        =>  \"EUC-JP\",\n+            \"iso-2022-jp\"   =>  \"ISO-2022-JP\",\n+            \"shift_jis\"     =>  \"Shift_JIS\",\n+            \"euc-kr\"        =>  \"EUC-KR\",\n+            \"utf-16be\"      =>  \"UTF-16BE\",\n+            \"utf-16le\"      =>  \"UTF-16LE\",\n+            name            =>  name\n+        }.to_owned()\n+    }\n+\n+    //https://dom.spec.whatwg.org/#dom-document-charset\n+    fn Charset(&self) -> DOMString {\n+        self.CharacterSet()","path":"components/script/dom/document.rs","position":37,"original_position":37,"commit_id":"33619cdfae308c8c2ba6001704c3ce9735b869b9","original_commit_id":"33619cdfae308c8c2ba6001704c3ce9735b869b9","user":{"login":"vectorijk","id":3419881,"avatar_url":"https://avatars.githubusercontent.com/u/3419881?v=3","gravatar_id":"","url":"https://api.github.com/users/vectorijk","html_url":"https://github.com/vectorijk","followers_url":"https://api.github.com/users/vectorijk/followers","following_url":"https://api.github.com/users/vectorijk/following{/other_user}","gists_url":"https://api.github.com/users/vectorijk/gists{/gist_id}","starred_url":"https://api.github.com/users/vectorijk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vectorijk/subscriptions","organizations_url":"https://api.github.com/users/vectorijk/orgs","repos_url":"https://api.github.com/users/vectorijk/repos","events_url":"https://api.github.com/users/vectorijk/events{/privacy}","received_events_url":"https://api.github.com/users/vectorijk/received_events","type":"User","site_admin":false},"body":"@Ms2ger Based on your saying, do you mean just doing this case conversion?\r\n```rust\r\nfn Charse(&self) -> DOMString {\r\n    (*(self.encoding_name.borrow())).to_uppercase().to_owned()\r\n}\r\n```","created_at":"2015-10-13T07:51:49Z","updated_at":"2015-10-13T07:51:49Z","html_url":"https://github.com/servo/servo/pull/7966#discussion_r41836172","pull_request_url":"https://api.github.com/repos/servo/servo/pulls/7966","_links":{"self":{"href":"https://api.github.com/repos/servo/servo/pulls/comments/41836172"},"html":{"href":"https://github.com/servo/servo/pull/7966#discussion_r41836172"},"pull_request":{"href":"https://api.github.com/repos/servo/servo/pulls/7966"}}},"pull_request":{"url":"https://api.github.com/repos/servo/servo/pulls/7966","id":47359264,"html_url":"https://github.com/servo/servo/pull/7966","diff_url":"https://github.com/servo/servo/pull/7966.diff","patch_url":"https://github.com/servo/servo/pull/7966.patch","issue_url":"https://api.github.com/repos/servo/servo/issues/7966","number":7966,"state":"open","locked":false,"title":"[FIX #7718] [DOM] Document charset","user":{"login":"vectorijk","id":3419881,"avatar_url":"https://avatars.githubusercontent.com/u/3419881?v=3","gravatar_id":"","url":"https://api.github.com/users/vectorijk","html_url":"https://github.com/vectorijk","followers_url":"https://api.github.com/users/vectorijk/followers","following_url":"https://api.github.com/users/vectorijk/following{/other_user}","gists_url":"https://api.github.com/users/vectorijk/gists{/gist_id}","starred_url":"https://api.github.com/users/vectorijk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vectorijk/subscriptions","organizations_url":"https://api.github.com/users/vectorijk/orgs","repos_url":"https://api.github.com/users/vectorijk/repos","events_url":"https://api.github.com/users/vectorijk/events{/privacy}","received_events_url":"https://api.github.com/users/vectorijk/received_events","type":"User","site_admin":false},"body":"Some updates to web platform tests.\n\n<!-- Reviewable:start -->\n[<img src=\"https://reviewable.io/review_button.png\" height=40 alt=\"Review on Reviewable\"/>](https://reviewable.io/reviews/servo/servo/7966)\n<!-- Reviewable:end -->\n","created_at":"2015-10-11T03:32:15Z","updated_at":"2015-10-13T07:51:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"617044321ddf2b9485d098c16eed4a8d32246b0f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/servo/servo/pulls/7966/commits","review_comments_url":"https://api.github.com/repos/servo/servo/pulls/7966/comments","review_comment_url":"https://api.github.com/repos/servo/servo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/servo/servo/issues/7966/comments","statuses_url":"https://api.github.com/repos/servo/servo/statuses/33619cdfae308c8c2ba6001704c3ce9735b869b9","head":{"label":"vectorijk:document-charset","ref":"document-charset","sha":"33619cdfae308c8c2ba6001704c3ce9735b869b9","user":{"login":"vectorijk","id":3419881,"avatar_url":"https://avatars.githubusercontent.com/u/3419881?v=3","gravatar_id":"","url":"https://api.github.com/users/vectorijk","html_url":"https://github.com/vectorijk","followers_url":"https://api.github.com/users/vectorijk/followers","following_url":"https://api.github.com/users/vectorijk/following{/other_user}","gists_url":"https://api.github.com/users/vectorijk/gists{/gist_id}","starred_url":"https://api.github.com/users/vectorijk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vectorijk/subscriptions","organizations_url":"https://api.github.com/users/vectorijk/orgs","repos_url":"https://api.github.com/users/vectorijk/repos","events_url":"https://api.github.com/users/vectorijk/events{/privacy}","received_events_url":"https://api.github.com/users/vectorijk/received_events","type":"User","site_admin":false},"repo":{"id":36252179,"name":"servo","full_name":"vectorijk/servo","owner":{"login":"vectorijk","id":3419881,"avatar_url":"https://avatars.githubusercontent.com/u/3419881?v=3","gravatar_id":"","url":"https://api.github.com/users/vectorijk","html_url":"https://github.com/vectorijk","followers_url":"https://api.github.com/users/vectorijk/followers","following_url":"https://api.github.com/users/vectorijk/following{/other_user}","gists_url":"https://api.github.com/users/vectorijk/gists{/gist_id}","starred_url":"https://api.github.com/users/vectorijk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vectorijk/subscriptions","organizations_url":"https://api.github.com/users/vectorijk/orgs","repos_url":"https://api.github.com/users/vectorijk/repos","events_url":"https://api.github.com/users/vectorijk/events{/privacy}","received_events_url":"https://api.github.com/users/vectorijk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vectorijk/servo","description":"The Servo Browser Engine","fork":true,"url":"https://api.github.com/repos/vectorijk/servo","forks_url":"https://api.github.com/repos/vectorijk/servo/forks","keys_url":"https://api.github.com/repos/vectorijk/servo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vectorijk/servo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vectorijk/servo/teams","hooks_url":"https://api.github.com/repos/vectorijk/servo/hooks","issue_events_url":"https://api.github.com/repos/vectorijk/servo/issues/events{/number}","events_url":"https://api.github.com/repos/vectorijk/servo/events","assignees_url":"https://api.github.com/repos/vectorijk/servo/assignees{/user}","branches_url":"https://api.github.com/repos/vectorijk/servo/branches{/branch}","tags_url":"https://api.github.com/repos/vectorijk/servo/tags","blobs_url":"https://api.github.com/repos/vectorijk/servo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vectorijk/servo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vectorijk/servo/git/refs{/sha}","trees_url":"https://api.github.com/repos/vectorijk/servo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vectorijk/servo/statuses/{sha}","languages_url":"https://api.github.com/repos/vectorijk/servo/languages","stargazers_url":"https://api.github.com/repos/vectorijk/servo/stargazers","contributors_url":"https://api.github.com/repos/vectorijk/servo/contributors","subscribers_url":"https://api.github.com/repos/vectorijk/servo/subscribers","subscription_url":"https://api.github.com/repos/vectorijk/servo/subscription","commits_url":"https://api.github.com/repos/vectorijk/servo/commits{/sha}","git_commits_url":"https://api.github.com/repos/vectorijk/servo/git/commits{/sha}","comments_url":"https://api.github.com/repos/vectorijk/servo/comments{/number}","issue_comment_url":"https://api.github.com/repos/vectorijk/servo/issues/comments{/number}","contents_url":"https://api.github.com/repos/vectorijk/servo/contents/{+path}","compare_url":"https://api.github.com/repos/vectorijk/servo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vectorijk/servo/merges","archive_url":"https://api.github.com/repos/vectorijk/servo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vectorijk/servo/downloads","issues_url":"https://api.github.com/repos/vectorijk/servo/issues{/number}","pulls_url":"https://api.github.com/repos/vectorijk/servo/pulls{/number}","milestones_url":"https://api.github.com/repos/vectorijk/servo/milestones{/number}","notifications_url":"https://api.github.com/repos/vectorijk/servo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vectorijk/servo/labels{/name}","releases_url":"https://api.github.com/repos/vectorijk/servo/releases{/id}","created_at":"2015-05-25T20:09:10Z","updated_at":"2015-10-05T11:26:50Z","pushed_at":"2015-10-11T08:53:47Z","git_url":"git://github.com/vectorijk/servo.git","ssh_url":"git@github.com:vectorijk/servo.git","clone_url":"https://github.com/vectorijk/servo.git","svn_url":"https://github.com/vectorijk/servo","homepage":"","size":147365,"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":"02d889494580d2b387a42d3a94360e40dce96282","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}","created_at":"2012-02-08T19:07:25Z","updated_at":"2015-10-13T07:03:19Z","pushed_at":"2015-10-13T04:06:39Z","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":"","size":338460,"stargazers_count":4990,"watchers_count":4990,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":797,"mirror_url":null,"open_issues_count":1142,"forks":797,"open_issues":1142,"watchers":4990,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/servo/servo/pulls/7966"},"html":{"href":"https://github.com/servo/servo/pull/7966"},"issue":{"href":"https://api.github.com/repos/servo/servo/issues/7966"},"comments":{"href":"https://api.github.com/repos/servo/servo/issues/7966/comments"},"review_comments":{"href":"https://api.github.com/repos/servo/servo/pulls/7966/comments"},"review_comment":{"href":"https://api.github.com/repos/servo/servo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/servo/servo/pulls/7966/commits"},"statuses":{"href":"https://api.github.com/repos/servo/servo/statuses/33619cdfae308c8c2ba6001704c3ce9735b869b9"}}}}