{"action":"created","comment":{"url":"https://api.github.com/repos/servo/servo/pulls/comments/105874657","pull_request_review_id":26772039,"id":105874657,"diff_hunk":"@@ -433,15 +434,21 @@ impl HTMLImageElement {\n         };\n \n         let map = self.upcast::<Node>()\n-                      .following_siblings()\n+                      .GetRootNode()\n+                      .traverse_preorder()\n                       .filter_map(Root::downcast::<HTMLMapElement>)\n                       .find(|n| n.upcast::<Element>().get_string_attribute(&LocalName::from(\"name\")) == last);\n \n-        let elements: Vec<Root<HTMLAreaElement>> = map.unwrap().upcast::<Node>()\n-                      .children()\n+        match map {\n+            None => None,\n+            Some(mapElem) => {\n+                let elements: Vec<Root<HTMLAreaElement>> = mapElem.upcast::<Node>()\n+                      .traverse_preorder()\n                       .filter_map(Root::downcast::<HTMLAreaElement>)\n                       .collect();\n-        Some(elements)\n+                Some(elements)\n+            }\n+        }","path":"components/script/dom/htmlimageelement.rs","position":30,"original_position":30,"commit_id":"c69e01bbabef257e6a71e60bd8a7e66088720e70","original_commit_id":"c69e01bbabef257e6a71e60bd8a7e66088720e70","user":{"login":"nox","id":123095,"avatar_url":"https://avatars3.githubusercontent.com/u/123095?v=3","gravatar_id":"","url":"https://api.github.com/users/nox","html_url":"https://github.com/nox","followers_url":"https://api.github.com/users/nox/followers","following_url":"https://api.github.com/users/nox/following{/other_user}","gists_url":"https://api.github.com/users/nox/gists{/gist_id}","starred_url":"https://api.github.com/users/nox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nox/subscriptions","organizations_url":"https://api.github.com/users/nox/orgs","repos_url":"https://api.github.com/users/nox/repos","events_url":"https://api.github.com/users/nox/events{/privacy}","received_events_url":"https://api.github.com/users/nox/received_events","type":"User","site_admin":false},"body":"This would be shorter as `map.map(|elem| { ... })`, probably with a different name for `map`, for clarity.","created_at":"2017-03-14T10:43:45Z","updated_at":"2017-03-14T10:45:11Z","html_url":"https://github.com/servo/servo/pull/15904#discussion_r105874657","pull_request_url":"https://api.github.com/repos/servo/servo/pulls/15904","_links":{"self":{"href":"https://api.github.com/repos/servo/servo/pulls/comments/105874657"},"html":{"href":"https://github.com/servo/servo/pull/15904#discussion_r105874657"},"pull_request":{"href":"https://api.github.com/repos/servo/servo/pulls/15904"}}},"pull_request":{"url":"https://api.github.com/repos/servo/servo/pulls/15904","id":110066274,"html_url":"https://github.com/servo/servo/pull/15904","diff_url":"https://github.com/servo/servo/pull/15904.diff","patch_url":"https://github.com/servo/servo/pull/15904.patch","issue_url":"https://api.github.com/repos/servo/servo/issues/15904","number":15904,"state":"open","locked":false,"title":"making image element areas good at finding areas","user":{"login":"sendilkumarn","id":12471122,"avatar_url":"https://avatars3.githubusercontent.com/u/12471122?v=3","gravatar_id":"","url":"https://api.github.com/users/sendilkumarn","html_url":"https://github.com/sendilkumarn","followers_url":"https://api.github.com/users/sendilkumarn/followers","following_url":"https://api.github.com/users/sendilkumarn/following{/other_user}","gists_url":"https://api.github.com/users/sendilkumarn/gists{/gist_id}","starred_url":"https://api.github.com/users/sendilkumarn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sendilkumarn/subscriptions","organizations_url":"https://api.github.com/users/sendilkumarn/orgs","repos_url":"https://api.github.com/users/sendilkumarn/repos","events_url":"https://api.github.com/users/sendilkumarn/events{/privacy}","received_events_url":"https://api.github.com/users/sendilkumarn/received_events","type":"User","site_admin":false},"body":"<!-- Please describe your changes on the following line: -->\r\n\r\n\r\n---\r\n<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->\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 #15884\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/servo/servo/15904)\n<!-- Reviewable:end -->\n","created_at":"2017-03-10T05:58:42Z","updated_at":"2017-03-14T10:45:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"676d2e741bf78ac8dbffe84d181a42e7b4cb05f4","assignee":{"login":"asajeffrey","id":403333,"avatar_url":"https://avatars2.githubusercontent.com/u/403333?v=3","gravatar_id":"","url":"https://api.github.com/users/asajeffrey","html_url":"https://github.com/asajeffrey","followers_url":"https://api.github.com/users/asajeffrey/followers","following_url":"https://api.github.com/users/asajeffrey/following{/other_user}","gists_url":"https://api.github.com/users/asajeffrey/gists{/gist_id}","starred_url":"https://api.github.com/users/asajeffrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asajeffrey/subscriptions","organizations_url":"https://api.github.com/users/asajeffrey/orgs","repos_url":"https://api.github.com/users/asajeffrey/repos","events_url":"https://api.github.com/users/asajeffrey/events{/privacy}","received_events_url":"https://api.github.com/users/asajeffrey/received_events","type":"User","site_admin":false},"assignees":[{"login":"asajeffrey","id":403333,"avatar_url":"https://avatars2.githubusercontent.com/u/403333?v=3","gravatar_id":"","url":"https://api.github.com/users/asajeffrey","html_url":"https://github.com/asajeffrey","followers_url":"https://api.github.com/users/asajeffrey/followers","following_url":"https://api.github.com/users/asajeffrey/following{/other_user}","gists_url":"https://api.github.com/users/asajeffrey/gists{/gist_id}","starred_url":"https://api.github.com/users/asajeffrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asajeffrey/subscriptions","organizations_url":"https://api.github.com/users/asajeffrey/orgs","repos_url":"https://api.github.com/users/asajeffrey/repos","events_url":"https://api.github.com/users/asajeffrey/events{/privacy}","received_events_url":"https://api.github.com/users/asajeffrey/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/servo/servo/pulls/15904/commits","review_comments_url":"https://api.github.com/repos/servo/servo/pulls/15904/comments","review_comment_url":"https://api.github.com/repos/servo/servo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/servo/servo/issues/15904/comments","statuses_url":"https://api.github.com/repos/servo/servo/statuses/c69e01bbabef257e6a71e60bd8a7e66088720e70","head":{"label":"sendilkumarn:image-area","ref":"image-area","sha":"c69e01bbabef257e6a71e60bd8a7e66088720e70","user":{"login":"sendilkumarn","id":12471122,"avatar_url":"https://avatars3.githubusercontent.com/u/12471122?v=3","gravatar_id":"","url":"https://api.github.com/users/sendilkumarn","html_url":"https://github.com/sendilkumarn","followers_url":"https://api.github.com/users/sendilkumarn/followers","following_url":"https://api.github.com/users/sendilkumarn/following{/other_user}","gists_url":"https://api.github.com/users/sendilkumarn/gists{/gist_id}","starred_url":"https://api.github.com/users/sendilkumarn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sendilkumarn/subscriptions","organizations_url":"https://api.github.com/users/sendilkumarn/orgs","repos_url":"https://api.github.com/users/sendilkumarn/repos","events_url":"https://api.github.com/users/sendilkumarn/events{/privacy}","received_events_url":"https://api.github.com/users/sendilkumarn/received_events","type":"User","site_admin":false},"repo":{"id":83688540,"name":"servo","full_name":"sendilkumarn/servo","owner":{"login":"sendilkumarn","id":12471122,"avatar_url":"https://avatars3.githubusercontent.com/u/12471122?v=3","gravatar_id":"","url":"https://api.github.com/users/sendilkumarn","html_url":"https://github.com/sendilkumarn","followers_url":"https://api.github.com/users/sendilkumarn/followers","following_url":"https://api.github.com/users/sendilkumarn/following{/other_user}","gists_url":"https://api.github.com/users/sendilkumarn/gists{/gist_id}","starred_url":"https://api.github.com/users/sendilkumarn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sendilkumarn/subscriptions","organizations_url":"https://api.github.com/users/sendilkumarn/orgs","repos_url":"https://api.github.com/users/sendilkumarn/repos","events_url":"https://api.github.com/users/sendilkumarn/events{/privacy}","received_events_url":"https://api.github.com/users/sendilkumarn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sendilkumarn/servo","description":"The Servo Browser Engine","fork":true,"url":"https://api.github.com/repos/sendilkumarn/servo","forks_url":"https://api.github.com/repos/sendilkumarn/servo/forks","keys_url":"https://api.github.com/repos/sendilkumarn/servo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sendilkumarn/servo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sendilkumarn/servo/teams","hooks_url":"https://api.github.com/repos/sendilkumarn/servo/hooks","issue_events_url":"https://api.github.com/repos/sendilkumarn/servo/issues/events{/number}","events_url":"https://api.github.com/repos/sendilkumarn/servo/events","assignees_url":"https://api.github.com/repos/sendilkumarn/servo/assignees{/user}","branches_url":"https://api.github.com/repos/sendilkumarn/servo/branches{/branch}","tags_url":"https://api.github.com/repos/sendilkumarn/servo/tags","blobs_url":"https://api.github.com/repos/sendilkumarn/servo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sendilkumarn/servo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sendilkumarn/servo/git/refs{/sha}","trees_url":"https://api.github.com/repos/sendilkumarn/servo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sendilkumarn/servo/statuses/{sha}","languages_url":"https://api.github.com/repos/sendilkumarn/servo/languages","stargazers_url":"https://api.github.com/repos/sendilkumarn/servo/stargazers","contributors_url":"https://api.github.com/repos/sendilkumarn/servo/contributors","subscribers_url":"https://api.github.com/repos/sendilkumarn/servo/subscribers","subscription_url":"https://api.github.com/repos/sendilkumarn/servo/subscription","commits_url":"https://api.github.com/repos/sendilkumarn/servo/commits{/sha}","git_commits_url":"https://api.github.com/repos/sendilkumarn/servo/git/commits{/sha}","comments_url":"https://api.github.com/repos/sendilkumarn/servo/comments{/number}","issue_comment_url":"https://api.github.com/repos/sendilkumarn/servo/issues/comments{/number}","contents_url":"https://api.github.com/repos/sendilkumarn/servo/contents/{+path}","compare_url":"https://api.github.com/repos/sendilkumarn/servo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sendilkumarn/servo/merges","archive_url":"https://api.github.com/repos/sendilkumarn/servo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sendilkumarn/servo/downloads","issues_url":"https://api.github.com/repos/sendilkumarn/servo/issues{/number}","pulls_url":"https://api.github.com/repos/sendilkumarn/servo/pulls{/number}","milestones_url":"https://api.github.com/repos/sendilkumarn/servo/milestones{/number}","notifications_url":"https://api.github.com/repos/sendilkumarn/servo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sendilkumarn/servo/labels{/name}","releases_url":"https://api.github.com/repos/sendilkumarn/servo/releases{/id}","deployments_url":"https://api.github.com/repos/sendilkumarn/servo/deployments","created_at":"2017-03-02T14:44:38Z","updated_at":"2017-03-02T14:25:51Z","pushed_at":"2017-03-14T05:42:59Z","git_url":"git://github.com/sendilkumarn/servo.git","ssh_url":"git@github.com:sendilkumarn/servo.git","clone_url":"https://github.com/sendilkumarn/servo.git","svn_url":"https://github.com/sendilkumarn/servo","homepage":"https://servo.org/","size":243697,"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":"72128de68189a9cd03050b3b0dc8278b4ca376e9","user":{"login":"servo","id":2566135,"avatar_url":"https://avatars2.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://avatars2.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":"2017-03-14T09:16:57Z","pushed_at":"2017-03-14T09:39:23Z","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":301529,"stargazers_count":8947,"watchers_count":8947,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1520,"mirror_url":null,"open_issues_count":2131,"forks":1520,"open_issues":2131,"watchers":8947,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/servo/servo/pulls/15904"},"html":{"href":"https://github.com/servo/servo/pull/15904"},"issue":{"href":"https://api.github.com/repos/servo/servo/issues/15904"},"comments":{"href":"https://api.github.com/repos/servo/servo/issues/15904/comments"},"review_comments":{"href":"https://api.github.com/repos/servo/servo/pulls/15904/comments"},"review_comment":{"href":"https://api.github.com/repos/servo/servo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/servo/servo/pulls/15904/commits"},"statuses":{"href":"https://api.github.com/repos/servo/servo/statuses/c69e01bbabef257e6a71e60bd8a7e66088720e70"}}}}
{"actor":{"display_login":"nox"}}