{"action":"created","comment":{"url":"https://api.github.com/repos/servo/servo/pulls/comments/91833751","pull_request_review_id":12346572,"id":91833751,"diff_hunk":"@@ -396,6 +399,7 @@ impl<Window: WindowMethods> IOCompositor<Window> {\n             last_composite_time: 0,\n             ready_to_save_state: ReadyState::Unknown,\n             scroll_in_progress: false,\n+            in_scroll_transaction: None,","path":"components/compositing/compositor.rs","position":21,"original_position":21,"commit_id":"c5b883489d7517e92d49ed749213db65697e007d","original_commit_id":"c5b883489d7517e92d49ed749213db65697e007d","user":{"login":"gterzian","id":2792687,"avatar_url":"https://avatars.githubusercontent.com/u/2792687?v=3","gravatar_id":"","url":"https://api.github.com/users/gterzian","html_url":"https://github.com/gterzian","followers_url":"https://api.github.com/users/gterzian/followers","following_url":"https://api.github.com/users/gterzian/following{/other_user}","gists_url":"https://api.github.com/users/gterzian/gists{/gist_id}","starred_url":"https://api.github.com/users/gterzian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gterzian/subscriptions","organizations_url":"https://api.github.com/users/gterzian/orgs","repos_url":"https://api.github.com/users/gterzian/repos","events_url":"https://api.github.com/users/gterzian/events{/privacy}","received_events_url":"https://api.github.com/users/gterzian/received_events","type":"User","site_admin":false},"body":"@mbrubeck Thank you for your suggestion. I have done some additional testing to be sure, and it seems that doing anything with `in_scroll_transaction` in those functions is unnecessary. \r\n\r\nThat is because, if those two functions are called (when the OS actually sends start/end events, which only Mac OS does at this point) the scroll transaction is, as far as I can tell, completely transparent.\r\n\r\nTo be precise, there is only one case in which the \"transaction\" will result in a change in the `ScrollZoomEvent` that will be sent to Webrender: When `scroll_in_progress` is false, and we receive a scroll after 80 ms. In this case a new \"start event\" is simulated by the transaction. \r\n\r\nThe only risk therefore, in my opinion, is that we would send inappropriate, or double, `ScrollEventPhase::Start`. This could happen if `on_scroll_start_window_event` were to be first called, followed by the transaction code sending another start phase after that. That is currently impossible, because `on_scroll_start_window_event` will always set `scroll_in_progress` to `true`. \r\n\r\nAn additional note: I have tried to implement the transactions with `scroll_in_progress`, however that field is used to implement a concept that overlaps, yet differs significantly from what those 'transactions' currently do. (For example, when the user has stopped actively scrolling, but Mac still sends additional scroll events that reflect the 'natural scrolling' on Mac, `scroll_in_progress` will be set to false, while we actually still need to keep the transaction open or else the scrolling will stop unnaturally on a Mac). ","created_at":"2016-12-10T11:32:11Z","updated_at":"2016-12-10T11:32:11Z","html_url":"https://github.com/servo/servo/pull/14470#discussion_r91833751","pull_request_url":"https://api.github.com/repos/servo/servo/pulls/14470","_links":{"self":{"href":"https://api.github.com/repos/servo/servo/pulls/comments/91833751"},"html":{"href":"https://github.com/servo/servo/pull/14470#discussion_r91833751"},"pull_request":{"href":"https://api.github.com/repos/servo/servo/pulls/14470"}}},"pull_request":{"url":"https://api.github.com/repos/servo/servo/pulls/14470","id":96775983,"html_url":"https://github.com/servo/servo/pull/14470","diff_url":"https://github.com/servo/servo/pull/14470.diff","patch_url":"https://github.com/servo/servo/pull/14470.patch","issue_url":"https://api.github.com/repos/servo/servo/issues/14470","number":14470,"state":"open","locked":false,"title":"Implement scroll transactions","user":{"login":"gterzian","id":2792687,"avatar_url":"https://avatars.githubusercontent.com/u/2792687?v=3","gravatar_id":"","url":"https://api.github.com/users/gterzian","html_url":"https://github.com/gterzian","followers_url":"https://api.github.com/users/gterzian/followers","following_url":"https://api.github.com/users/gterzian/following{/other_user}","gists_url":"https://api.github.com/users/gterzian/gists{/gist_id}","starred_url":"https://api.github.com/users/gterzian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gterzian/subscriptions","organizations_url":"https://api.github.com/users/gterzian/orgs","repos_url":"https://api.github.com/users/gterzian/repos","events_url":"https://api.github.com/users/gterzian/events{/privacy}","received_events_url":"https://api.github.com/users/gterzian/received_events","type":"User","site_admin":false},"body":"<!-- Please describe your changes on the following line: -->\r\n@glennw Here is a first pass at faking Start scroll events by way of 'transactions', as suggested by @mstange at https://github.com/servo/webrender/pull/599#issuecomment-263323105\r\n\r\nSince I still don't have a Linux environment available for testing(and my Mac doesn't have enough resources to run a VM at the moment), I tested this with both https://github.com/servo/webrender/pull/599 and https://github.com/servo/webrender/pull/600 on a Mac by:\r\n\r\n* disabling start and end events by removing the content of these two functions: https://github.com/servo/servo/blob/master/components/compositing/compositor.rs#L1080 and https://github.com/servo/servo/blob/master/components/compositing/compositor.rs#L1093\r\n\r\n* Setting `CAN_OVERSCROLL` to false for Mac OS in Webrender https://github.com/servo/webrender/blob/master/webrender/src/frame.rs#L29\r\n\r\n* This PR also requires a `./mach update-cargo -a`\r\n\r\nThe desired behavior of both Webrender PR's, based on my manual testing, now also works when there are no end or start scroll events provided by the os. The scroll transactions do not affect normal scrolling on Mac OS, and both PR still work as before on that platform.\r\n\r\nBoth PR in Webrender need some re-basing and cleaning up, as does this one, and I first wanted to put this proposal forward, and also ask if someone has the time to do some testing in a real Linux environment...\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 #13249 (github issue number if applicable).\r\n\r\n<!-- Either: -->\r\n- [ ] There are tests for these changes OR\r\n- [ ] These changes do not require tests because _____\r\n\r\n<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->\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/14470)\r\n<!-- Reviewable:end -->\r\n","created_at":"2016-12-06T18:08:16Z","updated_at":"2016-12-10T11:32:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d984f3fe40f616634cdb5035763b0135de2d1be4","assignee":{"login":"mbrubeck","id":5920,"avatar_url":"https://avatars.githubusercontent.com/u/5920?v=3","gravatar_id":"","url":"https://api.github.com/users/mbrubeck","html_url":"https://github.com/mbrubeck","followers_url":"https://api.github.com/users/mbrubeck/followers","following_url":"https://api.github.com/users/mbrubeck/following{/other_user}","gists_url":"https://api.github.com/users/mbrubeck/gists{/gist_id}","starred_url":"https://api.github.com/users/mbrubeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbrubeck/subscriptions","organizations_url":"https://api.github.com/users/mbrubeck/orgs","repos_url":"https://api.github.com/users/mbrubeck/repos","events_url":"https://api.github.com/users/mbrubeck/events{/privacy}","received_events_url":"https://api.github.com/users/mbrubeck/received_events","type":"User","site_admin":false},"assignees":[{"login":"mbrubeck","id":5920,"avatar_url":"https://avatars.githubusercontent.com/u/5920?v=3","gravatar_id":"","url":"https://api.github.com/users/mbrubeck","html_url":"https://github.com/mbrubeck","followers_url":"https://api.github.com/users/mbrubeck/followers","following_url":"https://api.github.com/users/mbrubeck/following{/other_user}","gists_url":"https://api.github.com/users/mbrubeck/gists{/gist_id}","starred_url":"https://api.github.com/users/mbrubeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbrubeck/subscriptions","organizations_url":"https://api.github.com/users/mbrubeck/orgs","repos_url":"https://api.github.com/users/mbrubeck/repos","events_url":"https://api.github.com/users/mbrubeck/events{/privacy}","received_events_url":"https://api.github.com/users/mbrubeck/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/servo/servo/pulls/14470/commits","review_comments_url":"https://api.github.com/repos/servo/servo/pulls/14470/comments","review_comment_url":"https://api.github.com/repos/servo/servo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/servo/servo/issues/14470/comments","statuses_url":"https://api.github.com/repos/servo/servo/statuses/c5b883489d7517e92d49ed749213db65697e007d","head":{"label":"gterzian:implement_scroll_transactions","ref":"implement_scroll_transactions","sha":"c5b883489d7517e92d49ed749213db65697e007d","user":{"login":"gterzian","id":2792687,"avatar_url":"https://avatars.githubusercontent.com/u/2792687?v=3","gravatar_id":"","url":"https://api.github.com/users/gterzian","html_url":"https://github.com/gterzian","followers_url":"https://api.github.com/users/gterzian/followers","following_url":"https://api.github.com/users/gterzian/following{/other_user}","gists_url":"https://api.github.com/users/gterzian/gists{/gist_id}","starred_url":"https://api.github.com/users/gterzian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gterzian/subscriptions","organizations_url":"https://api.github.com/users/gterzian/orgs","repos_url":"https://api.github.com/users/gterzian/repos","events_url":"https://api.github.com/users/gterzian/events{/privacy}","received_events_url":"https://api.github.com/users/gterzian/received_events","type":"User","site_admin":false},"repo":{"id":69109740,"name":"servo","full_name":"gterzian/servo","owner":{"login":"gterzian","id":2792687,"avatar_url":"https://avatars.githubusercontent.com/u/2792687?v=3","gravatar_id":"","url":"https://api.github.com/users/gterzian","html_url":"https://github.com/gterzian","followers_url":"https://api.github.com/users/gterzian/followers","following_url":"https://api.github.com/users/gterzian/following{/other_user}","gists_url":"https://api.github.com/users/gterzian/gists{/gist_id}","starred_url":"https://api.github.com/users/gterzian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gterzian/subscriptions","organizations_url":"https://api.github.com/users/gterzian/orgs","repos_url":"https://api.github.com/users/gterzian/repos","events_url":"https://api.github.com/users/gterzian/events{/privacy}","received_events_url":"https://api.github.com/users/gterzian/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gterzian/servo","description":"The Servo Browser Engine","fork":true,"url":"https://api.github.com/repos/gterzian/servo","forks_url":"https://api.github.com/repos/gterzian/servo/forks","keys_url":"https://api.github.com/repos/gterzian/servo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gterzian/servo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gterzian/servo/teams","hooks_url":"https://api.github.com/repos/gterzian/servo/hooks","issue_events_url":"https://api.github.com/repos/gterzian/servo/issues/events{/number}","events_url":"https://api.github.com/repos/gterzian/servo/events","assignees_url":"https://api.github.com/repos/gterzian/servo/assignees{/user}","branches_url":"https://api.github.com/repos/gterzian/servo/branches{/branch}","tags_url":"https://api.github.com/repos/gterzian/servo/tags","blobs_url":"https://api.github.com/repos/gterzian/servo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gterzian/servo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gterzian/servo/git/refs{/sha}","trees_url":"https://api.github.com/repos/gterzian/servo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gterzian/servo/statuses/{sha}","languages_url":"https://api.github.com/repos/gterzian/servo/languages","stargazers_url":"https://api.github.com/repos/gterzian/servo/stargazers","contributors_url":"https://api.github.com/repos/gterzian/servo/contributors","subscribers_url":"https://api.github.com/repos/gterzian/servo/subscribers","subscription_url":"https://api.github.com/repos/gterzian/servo/subscription","commits_url":"https://api.github.com/repos/gterzian/servo/commits{/sha}","git_commits_url":"https://api.github.com/repos/gterzian/servo/git/commits{/sha}","comments_url":"https://api.github.com/repos/gterzian/servo/comments{/number}","issue_comment_url":"https://api.github.com/repos/gterzian/servo/issues/comments{/number}","contents_url":"https://api.github.com/repos/gterzian/servo/contents/{+path}","compare_url":"https://api.github.com/repos/gterzian/servo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gterzian/servo/merges","archive_url":"https://api.github.com/repos/gterzian/servo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gterzian/servo/downloads","issues_url":"https://api.github.com/repos/gterzian/servo/issues{/number}","pulls_url":"https://api.github.com/repos/gterzian/servo/pulls{/number}","milestones_url":"https://api.github.com/repos/gterzian/servo/milestones{/number}","notifications_url":"https://api.github.com/repos/gterzian/servo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gterzian/servo/labels{/name}","releases_url":"https://api.github.com/repos/gterzian/servo/releases{/id}","deployments_url":"https://api.github.com/repos/gterzian/servo/deployments","created_at":"2016-09-24T15:15:52Z","updated_at":"2016-09-24T10:27:57Z","pushed_at":"2016-12-06T18:50:20Z","git_url":"git://github.com/gterzian/servo.git","ssh_url":"git@github.com:gterzian/servo.git","clone_url":"https://github.com/gterzian/servo.git","svn_url":"https://github.com/gterzian/servo","homepage":"https://servo.org/","size":229674,"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":"ce59cdd90b72354ec1f266ce00c18be422527648","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-12-10T05:41:45Z","pushed_at":"2016-12-10T11:21:42Z","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":317642,"stargazers_count":8395,"watchers_count":8395,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1383,"mirror_url":null,"open_issues_count":1945,"forks":1383,"open_issues":1945,"watchers":8395,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/servo/servo/pulls/14470"},"html":{"href":"https://github.com/servo/servo/pull/14470"},"issue":{"href":"https://api.github.com/repos/servo/servo/issues/14470"},"comments":{"href":"https://api.github.com/repos/servo/servo/issues/14470/comments"},"review_comments":{"href":"https://api.github.com/repos/servo/servo/pulls/14470/comments"},"review_comment":{"href":"https://api.github.com/repos/servo/servo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/servo/servo/pulls/14470/commits"},"statuses":{"href":"https://api.github.com/repos/servo/servo/statuses/c5b883489d7517e92d49ed749213db65697e007d"}}}}
{"actor":{"display_login":"gterzian"}}