{"action":"created","comment":{"url":"https://api.github.com/repos/nvaccess/nvda/pulls/comments/207202759","pull_request_review_id":142763880,"id":207202759,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNzIwMjc1OQ==","diff_hunk":"@@ -114,20 +114,34 @@ class IA2TextTextInfo(textInfos.offsets.OffsetsTextInfo):\n \r\n \tdetectFormattingAfterCursorMaybeSlow=False\r\n \r\n-\tdef _getOffsetFromPoint(self,x,y):\r\n-\t\tif self.obj.IAccessibleTextObject.nCharacters>0:\r\n-\t\t\treturn self.obj.IAccessibleTextObject.OffsetAtPoint(x,y,IAccessibleHandler.IA2_COORDTYPE_SCREEN_RELATIVE)\r\n+\t@classmethod\r\n+\tdef _getOffsetFromPointInObject(cls,obj,x,y):\r","path":"source/NVDAObjects/IAccessible/__init__.py","position":null,"original_position":8,"commit_id":"5fc80c455f90bbc975e3b2a08ea1615f3fa57875","original_commit_id":"0202412d74b4a54f256f6f92bfdae9dea72cdeab","user":{"login":"leonardder","id":3049216,"node_id":"MDQ6VXNlcjMwNDkyMTY=","avatar_url":"https://avatars1.githubusercontent.com/u/3049216?v=4","gravatar_id":"","url":"https://api.github.com/users/leonardder","html_url":"https://github.com/leonardder","followers_url":"https://api.github.com/users/leonardder/followers","following_url":"https://api.github.com/users/leonardder/following{/other_user}","gists_url":"https://api.github.com/users/leonardder/gists{/gist_id}","starred_url":"https://api.github.com/users/leonardder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leonardder/subscriptions","organizations_url":"https://api.github.com/users/leonardder/orgs","repos_url":"https://api.github.com/users/leonardder/repos","events_url":"https://api.github.com/users/leonardder/events{/privacy}","received_events_url":"https://api.github.com/users/leonardder/received_events","type":"User","site_admin":false},"body":"Fixed, thanks for catching that.","created_at":"2018-08-02T12:12:38Z","updated_at":"2018-08-02T12:12:38Z","html_url":"https://github.com/nvaccess/nvda/pull/8479#discussion_r207202759","pull_request_url":"https://api.github.com/repos/nvaccess/nvda/pulls/8479","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/nvaccess/nvda/pulls/comments/207202759"},"html":{"href":"https://github.com/nvaccess/nvda/pull/8479#discussion_r207202759"},"pull_request":{"href":"https://api.github.com/repos/nvaccess/nvda/pulls/8479"}},"in_reply_to_id":206722859},"pull_request":{"url":"https://api.github.com/repos/nvaccess/nvda/pulls/8479","id":199244757,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5MjQ0NzU3","html_url":"https://github.com/nvaccess/nvda/pull/8479","diff_url":"https://github.com/nvaccess/nvda/pull/8479.diff","patch_url":"https://github.com/nvaccess/nvda/pull/8479.patch","issue_url":"https://api.github.com/repos/nvaccess/nvda/issues/8479","number":8479,"state":"open","locked":false,"title":"Get reliable points from offsets in virtual buffers","user":{"login":"leonardder","id":3049216,"node_id":"MDQ6VXNlcjMwNDkyMTY=","avatar_url":"https://avatars1.githubusercontent.com/u/3049216?v=4","gravatar_id":"","url":"https://api.github.com/users/leonardder","html_url":"https://github.com/leonardder","followers_url":"https://api.github.com/users/leonardder/followers","following_url":"https://api.github.com/users/leonardder/following{/other_user}","gists_url":"https://api.github.com/users/leonardder/gists{/gist_id}","starred_url":"https://api.github.com/users/leonardder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leonardder/subscriptions","organizations_url":"https://api.github.com/users/leonardder/orgs","repos_url":"https://api.github.com/users/leonardder/repos","events_url":"https://api.github.com/users/leonardder/events{/privacy}","received_events_url":"https://api.github.com/users/leonardder/received_events","type":"User","site_admin":false},"body":"First of all, many thanks to @jcsteh for sharing his ideas with regard to how to implement this.\r\n\r\n### Link to issue number:\r\nFixes #6460\r\n\r\n### Summary of the issue:\r\nWhen calculating the position of text in virtual buffers, NVDA uses the position of the object the text belongs to, rather than the real position of the offset you're retrieving the point for.\r\n\r\n### Description of how this pull request fixes the issue:\r\n1. Added two attributes to virtual buffer text nodes as discussed with @jcsteh:\r\n\r\n    * ia2TextOffset: holds the start offset for a TextFieldNode within the IAccessibleText of its associated object. This attribute is only added to text field nodes that originate from IAccessibleText.\r\n    * strippedCharsFromStart: When characters are stripped from the start of a text node (#2963) this attribute holds the amount of stripped chars from the start, in order for us to correct the ia2TextOffset.\r\n\r\n2. the Gecko virtual buffer text info now has its own _getPointFromOffset implementation that uses the new virtual buffer attributes.\r\n3. VirtualBufferTextInfo.getTextWithFields is now split up into a helper function _getFieldsInRange, similar to DisplayModelTextInfo. This allows for easy retrieval of control/format fields in a particular range, regardless where the text info is positioned.\r\n4. pointFromOffset in the adobe acrobat virtual buffer now uses the _indexINParent attribute. It seems Adobe Acrobat has separate dom nodes for every word, so pointFromOffset now gets the center point of the word, which is far better than it was before.\r\n\r\n### Testing performed:\r\n* Tested several pages in Chrome and Firefox. Made sure that NVDA properly falls back to the center of an object when it has no text (i.e. a graphic or a link with an overridden aria-label).\r\n* Tested with Adobe Reader 2018.011.20040. Though the implementation has some exception handling, testing with older versions might be a good thing to do. I have also tested with Adobe Reader XI, and This implementation  indeed, that doesn't provide per word objects.should handle that gracefully, though.\r\n\r\n### Known issues with pull request:\r\n* Chrome testing was somewhat limited because it seems that getOffsetFromPoint is broken for Chrome.\r\n\r\n### Change log entry:\r\n* Bug fixes\r\n    + In browse mode in Mozilla Firefox, Google Chrome and Adobe Reader, NVDA is now much more accurate when you use the move mouse to navigator object command. (#6460)\r\n    + In Mozilla Firefox and Google Chrome, filtering and retrieving items in the elements list should be more reliable. (#7853)","created_at":"2018-07-04T13:08:54Z","updated_at":"2018-08-02T12:12:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e9eb051074c6f8741dc13b7e1db37fbc099b1b31","assignee":null,"assignees":[],"requested_reviewers":[{"login":"michaelDCurran","id":14154141,"node_id":"MDQ6VXNlcjE0MTU0MTQx","avatar_url":"https://avatars0.githubusercontent.com/u/14154141?v=4","gravatar_id":"","url":"https://api.github.com/users/michaelDCurran","html_url":"https://github.com/michaelDCurran","followers_url":"https://api.github.com/users/michaelDCurran/followers","following_url":"https://api.github.com/users/michaelDCurran/following{/other_user}","gists_url":"https://api.github.com/users/michaelDCurran/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelDCurran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelDCurran/subscriptions","organizations_url":"https://api.github.com/users/michaelDCurran/orgs","repos_url":"https://api.github.com/users/michaelDCurran/repos","events_url":"https://api.github.com/users/michaelDCurran/events{/privacy}","received_events_url":"https://api.github.com/users/michaelDCurran/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":284594379,"node_id":"MDU6TGFiZWwyODQ1OTQzNzk=","url":"https://api.github.com/repos/nvaccess/nvda/labels/Browse%20mode","name":"Browse mode","color":"ffffff","default":false},{"id":591965337,"node_id":"MDU6TGFiZWw1OTE5NjUzMzc=","url":"https://api.github.com/repos/nvaccess/nvda/labels/Chrome","name":"Chrome","color":"fbca04","default":false},{"id":649115994,"node_id":"MDU6TGFiZWw2NDkxMTU5OTQ=","url":"https://api.github.com/repos/nvaccess/nvda/labels/Firefox","name":"Firefox","color":"e99695","default":false},{"id":937587242,"node_id":"MDU6TGFiZWw5Mzc1ODcyNDI=","url":"https://api.github.com/repos/nvaccess/nvda/labels/Text%20info","name":"Text info","color":"026d19","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/nvaccess/nvda/pulls/8479/commits","review_comments_url":"https://api.github.com/repos/nvaccess/nvda/pulls/8479/comments","review_comment_url":"https://api.github.com/repos/nvaccess/nvda/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nvaccess/nvda/issues/8479/comments","statuses_url":"https://api.github.com/repos/nvaccess/nvda/statuses/5fc80c455f90bbc975e3b2a08ea1615f3fa57875","head":{"label":"BabbageCom:geckoPointFromOffset","ref":"geckoPointFromOffset","sha":"5fc80c455f90bbc975e3b2a08ea1615f3fa57875","user":{"login":"BabbageCom","id":20060371,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwMDYwMzcx","avatar_url":"https://avatars0.githubusercontent.com/u/20060371?v=4","gravatar_id":"","url":"https://api.github.com/users/BabbageCom","html_url":"https://github.com/BabbageCom","followers_url":"https://api.github.com/users/BabbageCom/followers","following_url":"https://api.github.com/users/BabbageCom/following{/other_user}","gists_url":"https://api.github.com/users/BabbageCom/gists{/gist_id}","starred_url":"https://api.github.com/users/BabbageCom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BabbageCom/subscriptions","organizations_url":"https://api.github.com/users/BabbageCom/orgs","repos_url":"https://api.github.com/users/BabbageCom/repos","events_url":"https://api.github.com/users/BabbageCom/events{/privacy}","received_events_url":"https://api.github.com/users/BabbageCom/received_events","type":"Organization","site_admin":false},"repo":{"id":61607768,"node_id":"MDEwOlJlcG9zaXRvcnk2MTYwNzc2OA==","name":"nvda","full_name":"BabbageCom/nvda","owner":{"login":"BabbageCom","id":20060371,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwMDYwMzcx","avatar_url":"https://avatars0.githubusercontent.com/u/20060371?v=4","gravatar_id":"","url":"https://api.github.com/users/BabbageCom","html_url":"https://github.com/BabbageCom","followers_url":"https://api.github.com/users/BabbageCom/followers","following_url":"https://api.github.com/users/BabbageCom/following{/other_user}","gists_url":"https://api.github.com/users/BabbageCom/gists{/gist_id}","starred_url":"https://api.github.com/users/BabbageCom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BabbageCom/subscriptions","organizations_url":"https://api.github.com/users/BabbageCom/orgs","repos_url":"https://api.github.com/users/BabbageCom/repos","events_url":"https://api.github.com/users/BabbageCom/events{/privacy}","received_events_url":"https://api.github.com/users/BabbageCom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BabbageCom/nvda","description":"NVDA, the free and open source Screen Reader for Microsoft Windows","fork":true,"url":"https://api.github.com/repos/BabbageCom/nvda","forks_url":"https://api.github.com/repos/BabbageCom/nvda/forks","keys_url":"https://api.github.com/repos/BabbageCom/nvda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BabbageCom/nvda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BabbageCom/nvda/teams","hooks_url":"https://api.github.com/repos/BabbageCom/nvda/hooks","issue_events_url":"https://api.github.com/repos/BabbageCom/nvda/issues/events{/number}","events_url":"https://api.github.com/repos/BabbageCom/nvda/events","assignees_url":"https://api.github.com/repos/BabbageCom/nvda/assignees{/user}","branches_url":"https://api.github.com/repos/BabbageCom/nvda/branches{/branch}","tags_url":"https://api.github.com/repos/BabbageCom/nvda/tags","blobs_url":"https://api.github.com/repos/BabbageCom/nvda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BabbageCom/nvda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BabbageCom/nvda/git/refs{/sha}","trees_url":"https://api.github.com/repos/BabbageCom/nvda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BabbageCom/nvda/statuses/{sha}","languages_url":"https://api.github.com/repos/BabbageCom/nvda/languages","stargazers_url":"https://api.github.com/repos/BabbageCom/nvda/stargazers","contributors_url":"https://api.github.com/repos/BabbageCom/nvda/contributors","subscribers_url":"https://api.github.com/repos/BabbageCom/nvda/subscribers","subscription_url":"https://api.github.com/repos/BabbageCom/nvda/subscription","commits_url":"https://api.github.com/repos/BabbageCom/nvda/commits{/sha}","git_commits_url":"https://api.github.com/repos/BabbageCom/nvda/git/commits{/sha}","comments_url":"https://api.github.com/repos/BabbageCom/nvda/comments{/number}","issue_comment_url":"https://api.github.com/repos/BabbageCom/nvda/issues/comments{/number}","contents_url":"https://api.github.com/repos/BabbageCom/nvda/contents/{+path}","compare_url":"https://api.github.com/repos/BabbageCom/nvda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BabbageCom/nvda/merges","archive_url":"https://api.github.com/repos/BabbageCom/nvda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BabbageCom/nvda/downloads","issues_url":"https://api.github.com/repos/BabbageCom/nvda/issues{/number}","pulls_url":"https://api.github.com/repos/BabbageCom/nvda/pulls{/number}","milestones_url":"https://api.github.com/repos/BabbageCom/nvda/milestones{/number}","notifications_url":"https://api.github.com/repos/BabbageCom/nvda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BabbageCom/nvda/labels{/name}","releases_url":"https://api.github.com/repos/BabbageCom/nvda/releases{/id}","deployments_url":"https://api.github.com/repos/BabbageCom/nvda/deployments","created_at":"2016-06-21T06:24:23Z","updated_at":"2018-06-20T05:07:42Z","pushed_at":"2018-08-02T10:03:21Z","git_url":"git://github.com/BabbageCom/nvda.git","ssh_url":"git@github.com:BabbageCom/nvda.git","clone_url":"https://github.com/BabbageCom/nvda.git","svn_url":"https://github.com/BabbageCom/nvda","homepage":null,"size":145674,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"nvaccess:master","ref":"master","sha":"ef9be39243ed838691bb4bd1b4417cd5c5d77c53","user":{"login":"nvaccess","id":4166525,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxNjY1MjU=","avatar_url":"https://avatars2.githubusercontent.com/u/4166525?v=4","gravatar_id":"","url":"https://api.github.com/users/nvaccess","html_url":"https://github.com/nvaccess","followers_url":"https://api.github.com/users/nvaccess/followers","following_url":"https://api.github.com/users/nvaccess/following{/other_user}","gists_url":"https://api.github.com/users/nvaccess/gists{/gist_id}","starred_url":"https://api.github.com/users/nvaccess/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nvaccess/subscriptions","organizations_url":"https://api.github.com/users/nvaccess/orgs","repos_url":"https://api.github.com/users/nvaccess/repos","events_url":"https://api.github.com/users/nvaccess/events{/privacy}","received_events_url":"https://api.github.com/users/nvaccess/received_events","type":"Organization","site_admin":false},"repo":{"id":45885732,"node_id":"MDEwOlJlcG9zaXRvcnk0NTg4NTczMg==","name":"nvda","full_name":"nvaccess/nvda","owner":{"login":"nvaccess","id":4166525,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxNjY1MjU=","avatar_url":"https://avatars2.githubusercontent.com/u/4166525?v=4","gravatar_id":"","url":"https://api.github.com/users/nvaccess","html_url":"https://github.com/nvaccess","followers_url":"https://api.github.com/users/nvaccess/followers","following_url":"https://api.github.com/users/nvaccess/following{/other_user}","gists_url":"https://api.github.com/users/nvaccess/gists{/gist_id}","starred_url":"https://api.github.com/users/nvaccess/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nvaccess/subscriptions","organizations_url":"https://api.github.com/users/nvaccess/orgs","repos_url":"https://api.github.com/users/nvaccess/repos","events_url":"https://api.github.com/users/nvaccess/events{/privacy}","received_events_url":"https://api.github.com/users/nvaccess/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nvaccess/nvda","description":"NVDA, the free and open source Screen Reader for Microsoft Windows","fork":false,"url":"https://api.github.com/repos/nvaccess/nvda","forks_url":"https://api.github.com/repos/nvaccess/nvda/forks","keys_url":"https://api.github.com/repos/nvaccess/nvda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nvaccess/nvda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nvaccess/nvda/teams","hooks_url":"https://api.github.com/repos/nvaccess/nvda/hooks","issue_events_url":"https://api.github.com/repos/nvaccess/nvda/issues/events{/number}","events_url":"https://api.github.com/repos/nvaccess/nvda/events","assignees_url":"https://api.github.com/repos/nvaccess/nvda/assignees{/user}","branches_url":"https://api.github.com/repos/nvaccess/nvda/branches{/branch}","tags_url":"https://api.github.com/repos/nvaccess/nvda/tags","blobs_url":"https://api.github.com/repos/nvaccess/nvda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nvaccess/nvda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nvaccess/nvda/git/refs{/sha}","trees_url":"https://api.github.com/repos/nvaccess/nvda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nvaccess/nvda/statuses/{sha}","languages_url":"https://api.github.com/repos/nvaccess/nvda/languages","stargazers_url":"https://api.github.com/repos/nvaccess/nvda/stargazers","contributors_url":"https://api.github.com/repos/nvaccess/nvda/contributors","subscribers_url":"https://api.github.com/repos/nvaccess/nvda/subscribers","subscription_url":"https://api.github.com/repos/nvaccess/nvda/subscription","commits_url":"https://api.github.com/repos/nvaccess/nvda/commits{/sha}","git_commits_url":"https://api.github.com/repos/nvaccess/nvda/git/commits{/sha}","comments_url":"https://api.github.com/repos/nvaccess/nvda/comments{/number}","issue_comment_url":"https://api.github.com/repos/nvaccess/nvda/issues/comments{/number}","contents_url":"https://api.github.com/repos/nvaccess/nvda/contents/{+path}","compare_url":"https://api.github.com/repos/nvaccess/nvda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nvaccess/nvda/merges","archive_url":"https://api.github.com/repos/nvaccess/nvda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nvaccess/nvda/downloads","issues_url":"https://api.github.com/repos/nvaccess/nvda/issues{/number}","pulls_url":"https://api.github.com/repos/nvaccess/nvda/pulls{/number}","milestones_url":"https://api.github.com/repos/nvaccess/nvda/milestones{/number}","notifications_url":"https://api.github.com/repos/nvaccess/nvda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nvaccess/nvda/labels{/name}","releases_url":"https://api.github.com/repos/nvaccess/nvda/releases{/id}","deployments_url":"https://api.github.com/repos/nvaccess/nvda/deployments","created_at":"2015-11-10T03:47:11Z","updated_at":"2018-08-01T09:39:38Z","pushed_at":"2018-08-02T10:03:22Z","git_url":"git://github.com/nvaccess/nvda.git","ssh_url":"git@github.com:nvaccess/nvda.git","clone_url":"https://github.com/nvaccess/nvda.git","svn_url":"https://github.com/nvaccess/nvda","homepage":null,"size":149082,"stargazers_count":518,"watchers_count":518,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":218,"mirror_url":null,"archived":false,"open_issues_count":2279,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":218,"open_issues":2279,"watchers":518,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nvaccess/nvda/pulls/8479"},"html":{"href":"https://github.com/nvaccess/nvda/pull/8479"},"issue":{"href":"https://api.github.com/repos/nvaccess/nvda/issues/8479"},"comments":{"href":"https://api.github.com/repos/nvaccess/nvda/issues/8479/comments"},"review_comments":{"href":"https://api.github.com/repos/nvaccess/nvda/pulls/8479/comments"},"review_comment":{"href":"https://api.github.com/repos/nvaccess/nvda/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nvaccess/nvda/pulls/8479/commits"},"statuses":{"href":"https://api.github.com/repos/nvaccess/nvda/statuses/5fc80c455f90bbc975e3b2a08ea1615f3fa57875"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"leonardder"}}