{"action":"created","comment":{"url":"https://api.github.com/repos/ampproject/amphtml/pulls/comments/199612040","pull_request_review_id":133766673,"id":199612040,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5OTYxMjA0MA==","diff_hunk":"@@ -0,0 +1,59 @@\n+<!doctype html>\n+<html ⚡>\n+<head>\n+  <meta charset=\"utf-8\">\n+  <title>AMP #0</title>\n+  <link rel=\"canonical\" href=\"amps.html\" >\n+  <meta name=\"viewport\" content=\"width=device-width,minimum-scale=1,initial-scale=1\">\n+  <link href='https://fonts.googleapis.com/css?family=Questrial' rel='stylesheet' type='text/css'>\n+  <style amp-custom>\n+    body {\n+      font-family: 'Questrial', Arial;\n+    }\n+\n+    amp-img img {\n+      margin: 30px;\n+      padding: 30px;\n+      border: 10px solid red;\n+    }\n+  </style>\n+  <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>\n+  <script async src=\"https://cdn.ampproject.org/v0.js\"></script>\n+</head>\n+<body>\n+  <h1>amp-image</h1>\n+  <!-- <h2>Unsupported formats</h2>","path":"test/manual/amp-img-fallback.amp.html","position":25,"original_position":25,"commit_id":"749a3f923a26f3e394fcd7cadecd33130509fe81","original_commit_id":"749a3f923a26f3e394fcd7cadecd33130509fe81","user":{"login":"aghassemi","id":2099009,"node_id":"MDQ6VXNlcjIwOTkwMDk=","avatar_url":"https://avatars3.githubusercontent.com/u/2099009?v=4","gravatar_id":"","url":"https://api.github.com/users/aghassemi","html_url":"https://github.com/aghassemi","followers_url":"https://api.github.com/users/aghassemi/followers","following_url":"https://api.github.com/users/aghassemi/following{/other_user}","gists_url":"https://api.github.com/users/aghassemi/gists{/gist_id}","starred_url":"https://api.github.com/users/aghassemi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aghassemi/subscriptions","organizations_url":"https://api.github.com/users/aghassemi/orgs","repos_url":"https://api.github.com/users/aghassemi/repos","events_url":"https://api.github.com/users/aghassemi/events{/privacy}","received_events_url":"https://api.github.com/users/aghassemi/received_events","type":"User","site_admin":false},"body":"uncomment","created_at":"2018-07-02T20:30:42Z","updated_at":"2018-07-02T20:33:05Z","html_url":"https://github.com/ampproject/amphtml/pull/16404#discussion_r199612040","pull_request_url":"https://api.github.com/repos/ampproject/amphtml/pulls/16404","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/comments/199612040"},"html":{"href":"https://github.com/ampproject/amphtml/pull/16404#discussion_r199612040"},"pull_request":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/16404"}}},"pull_request":{"url":"https://api.github.com/repos/ampproject/amphtml/pulls/16404","id":197577703,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3NTc3NzAz","html_url":"https://github.com/ampproject/amphtml/pull/16404","diff_url":"https://github.com/ampproject/amphtml/pull/16404.diff","patch_url":"https://github.com/ampproject/amphtml/pull/16404.patch","issue_url":"https://api.github.com/repos/ampproject/amphtml/issues/16404","number":16404,"state":"open","locked":false,"title":"Remove native srcset experiment and update fallback logic","user":{"login":"cathyxz","id":1528181,"node_id":"MDQ6VXNlcjE1MjgxODE=","avatar_url":"https://avatars1.githubusercontent.com/u/1528181?v=4","gravatar_id":"","url":"https://api.github.com/users/cathyxz","html_url":"https://github.com/cathyxz","followers_url":"https://api.github.com/users/cathyxz/followers","following_url":"https://api.github.com/users/cathyxz/following{/other_user}","gists_url":"https://api.github.com/users/cathyxz/gists{/gist_id}","starred_url":"https://api.github.com/users/cathyxz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cathyxz/subscriptions","organizations_url":"https://api.github.com/users/cathyxz/orgs","repos_url":"https://api.github.com/users/cathyxz/repos","events_url":"https://api.github.com/users/cathyxz/events{/privacy}","received_events_url":"https://api.github.com/users/cathyxz/received_events","type":"User","site_admin":false},"body":"This PR deletes the experiment specific code for `amp-img-native-srcset` so that we're running native `srcset` permanently instead of doing our own `srcset` logic (closes https://github.com/ampproject/amphtml/issues/11575). The experiment / prod/canary-config.json files now have to be edited as a separate PR per new build rules. Turns out that it broke the fallback image logic (which was dependent on checking whether the src should change on resize), so I refactored `updateImageSrc` into two listeners for on `load` and `error`. Annotations inline.\r\n\r\nTesting: \r\n- [x] Chrome desktop\r\n- [x] Safari desktop\r\n- [x] FF desktop\r\n- [x] Chrome Android\r\n- [x] Chrome FF\r\n- [x] Safari Iphone\r\n- [x] Chrome Iphone\r\n- [x] IE Windows\r\n\r\n### In Summary\r\n1. We don’t show image fallbacks after first load due to performance reasons, per https://github.com/ampproject/amphtml/pull/2575. \r\n2. Since we no longer manually set the src, whether or not we show a fallback, solely depends on whether the image loaded correctly (i.e. whether `loadPromise(this.img_)` rejects), no more checking for whether selected `src` equals `this.img_.src`. \r\n3. There is a problem with solely using `loadPromise` for this check. Namely, that there can be a race condition between the resize which calls `layoutCallback` and tries to check for error / load in order to toggle the fallback, and the load / error event itself. This causes problematic behavior on Firefox/Safari/Chrome where they don't show the fallback image. \r\n4. To solve this problem, I refactored the loadPromise then/catch block into two listeners for `load` and `error` on the underlying `<img>`. \r\n\r\n### Not Addressed in this PR\r\n1. Illogical behavior of fallbacks / placeholders per https://github.com/ampproject/amphtml/issues/10321 \r\n2. Possibly revisiting the behavior of not toggling fallback images after first load. When resizing browsers, it seems like better UX to bring back the fallback image instead of showing a blank. But then again, I'm not sure what the performance concerns are, as well as how often people really play around with resizing browsers (or re-orienting their phones for that matter). Nonetheless, this is a bit of an edge case and will probably depend on actual usage. \r\n\r\nFurther details on the different behaviors of `srcset` per browser at: go/amp-img-srcset\r\n","created_at":"2018-06-26T23:20:36Z","updated_at":"2018-07-02T20:33:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"50cc483cc4d9e1886c626c44018961a6ae8cbfc2","assignee":null,"assignees":[],"requested_reviewers":[{"login":"erwinmombay","id":354746,"node_id":"MDQ6VXNlcjM1NDc0Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/354746?v=4","gravatar_id":"","url":"https://api.github.com/users/erwinmombay","html_url":"https://github.com/erwinmombay","followers_url":"https://api.github.com/users/erwinmombay/followers","following_url":"https://api.github.com/users/erwinmombay/following{/other_user}","gists_url":"https://api.github.com/users/erwinmombay/gists{/gist_id}","starred_url":"https://api.github.com/users/erwinmombay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erwinmombay/subscriptions","organizations_url":"https://api.github.com/users/erwinmombay/orgs","repos_url":"https://api.github.com/users/erwinmombay/repos","events_url":"https://api.github.com/users/erwinmombay/events{/privacy}","received_events_url":"https://api.github.com/users/erwinmombay/received_events","type":"User","site_admin":false},{"login":"bpaduch","id":1012254,"node_id":"MDQ6VXNlcjEwMTIyNTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/1012254?v=4","gravatar_id":"","url":"https://api.github.com/users/bpaduch","html_url":"https://github.com/bpaduch","followers_url":"https://api.github.com/users/bpaduch/followers","following_url":"https://api.github.com/users/bpaduch/following{/other_user}","gists_url":"https://api.github.com/users/bpaduch/gists{/gist_id}","starred_url":"https://api.github.com/users/bpaduch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bpaduch/subscriptions","organizations_url":"https://api.github.com/users/bpaduch/orgs","repos_url":"https://api.github.com/users/bpaduch/repos","events_url":"https://api.github.com/users/bpaduch/events{/privacy}","received_events_url":"https://api.github.com/users/bpaduch/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":596633554,"node_id":"MDU6TGFiZWw1OTY2MzM1NTQ=","url":"https://api.github.com/repos/ampproject/amphtml/labels/cla:%20yes","name":"cla: yes","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ampproject/amphtml/pulls/16404/commits","review_comments_url":"https://api.github.com/repos/ampproject/amphtml/pulls/16404/comments","review_comment_url":"https://api.github.com/repos/ampproject/amphtml/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ampproject/amphtml/issues/16404/comments","statuses_url":"https://api.github.com/repos/ampproject/amphtml/statuses/749a3f923a26f3e394fcd7cadecd33130509fe81","head":{"label":"cathyxz:feature/remove-srcset-experiment","ref":"feature/remove-srcset-experiment","sha":"749a3f923a26f3e394fcd7cadecd33130509fe81","user":{"login":"cathyxz","id":1528181,"node_id":"MDQ6VXNlcjE1MjgxODE=","avatar_url":"https://avatars1.githubusercontent.com/u/1528181?v=4","gravatar_id":"","url":"https://api.github.com/users/cathyxz","html_url":"https://github.com/cathyxz","followers_url":"https://api.github.com/users/cathyxz/followers","following_url":"https://api.github.com/users/cathyxz/following{/other_user}","gists_url":"https://api.github.com/users/cathyxz/gists{/gist_id}","starred_url":"https://api.github.com/users/cathyxz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cathyxz/subscriptions","organizations_url":"https://api.github.com/users/cathyxz/orgs","repos_url":"https://api.github.com/users/cathyxz/repos","events_url":"https://api.github.com/users/cathyxz/events{/privacy}","received_events_url":"https://api.github.com/users/cathyxz/received_events","type":"User","site_admin":false},"repo":{"id":108910422,"node_id":"MDEwOlJlcG9zaXRvcnkxMDg5MTA0MjI=","name":"amphtml","full_name":"cathyxz/amphtml","owner":{"login":"cathyxz","id":1528181,"node_id":"MDQ6VXNlcjE1MjgxODE=","avatar_url":"https://avatars1.githubusercontent.com/u/1528181?v=4","gravatar_id":"","url":"https://api.github.com/users/cathyxz","html_url":"https://github.com/cathyxz","followers_url":"https://api.github.com/users/cathyxz/followers","following_url":"https://api.github.com/users/cathyxz/following{/other_user}","gists_url":"https://api.github.com/users/cathyxz/gists{/gist_id}","starred_url":"https://api.github.com/users/cathyxz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cathyxz/subscriptions","organizations_url":"https://api.github.com/users/cathyxz/orgs","repos_url":"https://api.github.com/users/cathyxz/repos","events_url":"https://api.github.com/users/cathyxz/events{/privacy}","received_events_url":"https://api.github.com/users/cathyxz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cathyxz/amphtml","description":"AMP HTML source code, samples, and documentation.  See below for more info.","fork":true,"url":"https://api.github.com/repos/cathyxz/amphtml","forks_url":"https://api.github.com/repos/cathyxz/amphtml/forks","keys_url":"https://api.github.com/repos/cathyxz/amphtml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cathyxz/amphtml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cathyxz/amphtml/teams","hooks_url":"https://api.github.com/repos/cathyxz/amphtml/hooks","issue_events_url":"https://api.github.com/repos/cathyxz/amphtml/issues/events{/number}","events_url":"https://api.github.com/repos/cathyxz/amphtml/events","assignees_url":"https://api.github.com/repos/cathyxz/amphtml/assignees{/user}","branches_url":"https://api.github.com/repos/cathyxz/amphtml/branches{/branch}","tags_url":"https://api.github.com/repos/cathyxz/amphtml/tags","blobs_url":"https://api.github.com/repos/cathyxz/amphtml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cathyxz/amphtml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cathyxz/amphtml/git/refs{/sha}","trees_url":"https://api.github.com/repos/cathyxz/amphtml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cathyxz/amphtml/statuses/{sha}","languages_url":"https://api.github.com/repos/cathyxz/amphtml/languages","stargazers_url":"https://api.github.com/repos/cathyxz/amphtml/stargazers","contributors_url":"https://api.github.com/repos/cathyxz/amphtml/contributors","subscribers_url":"https://api.github.com/repos/cathyxz/amphtml/subscribers","subscription_url":"https://api.github.com/repos/cathyxz/amphtml/subscription","commits_url":"https://api.github.com/repos/cathyxz/amphtml/commits{/sha}","git_commits_url":"https://api.github.com/repos/cathyxz/amphtml/git/commits{/sha}","comments_url":"https://api.github.com/repos/cathyxz/amphtml/comments{/number}","issue_comment_url":"https://api.github.com/repos/cathyxz/amphtml/issues/comments{/number}","contents_url":"https://api.github.com/repos/cathyxz/amphtml/contents/{+path}","compare_url":"https://api.github.com/repos/cathyxz/amphtml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cathyxz/amphtml/merges","archive_url":"https://api.github.com/repos/cathyxz/amphtml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cathyxz/amphtml/downloads","issues_url":"https://api.github.com/repos/cathyxz/amphtml/issues{/number}","pulls_url":"https://api.github.com/repos/cathyxz/amphtml/pulls{/number}","milestones_url":"https://api.github.com/repos/cathyxz/amphtml/milestones{/number}","notifications_url":"https://api.github.com/repos/cathyxz/amphtml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cathyxz/amphtml/labels{/name}","releases_url":"https://api.github.com/repos/cathyxz/amphtml/releases{/id}","deployments_url":"https://api.github.com/repos/cathyxz/amphtml/deployments","created_at":"2017-10-30T21:27:41Z","updated_at":"2018-07-02T18:13:18Z","pushed_at":"2018-07-02T18:13:16Z","git_url":"git://github.com/cathyxz/amphtml.git","ssh_url":"git@github.com:cathyxz/amphtml.git","clone_url":"https://github.com/cathyxz/amphtml.git","svn_url":"https://github.com/cathyxz/amphtml","homepage":"https://www.ampproject.org","size":462311,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ampproject:master","ref":"master","sha":"8056021dd410f70727a0d853dae1272df81fc821","user":{"login":"ampproject","id":14114390,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTE0Mzkw","avatar_url":"https://avatars3.githubusercontent.com/u/14114390?v=4","gravatar_id":"","url":"https://api.github.com/users/ampproject","html_url":"https://github.com/ampproject","followers_url":"https://api.github.com/users/ampproject/followers","following_url":"https://api.github.com/users/ampproject/following{/other_user}","gists_url":"https://api.github.com/users/ampproject/gists{/gist_id}","starred_url":"https://api.github.com/users/ampproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ampproject/subscriptions","organizations_url":"https://api.github.com/users/ampproject/orgs","repos_url":"https://api.github.com/users/ampproject/repos","events_url":"https://api.github.com/users/ampproject/events{/privacy}","received_events_url":"https://api.github.com/users/ampproject/received_events","type":"Organization","site_admin":false},"repo":{"id":41766002,"node_id":"MDEwOlJlcG9zaXRvcnk0MTc2NjAwMg==","name":"amphtml","full_name":"ampproject/amphtml","owner":{"login":"ampproject","id":14114390,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTE0Mzkw","avatar_url":"https://avatars3.githubusercontent.com/u/14114390?v=4","gravatar_id":"","url":"https://api.github.com/users/ampproject","html_url":"https://github.com/ampproject","followers_url":"https://api.github.com/users/ampproject/followers","following_url":"https://api.github.com/users/ampproject/following{/other_user}","gists_url":"https://api.github.com/users/ampproject/gists{/gist_id}","starred_url":"https://api.github.com/users/ampproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ampproject/subscriptions","organizations_url":"https://api.github.com/users/ampproject/orgs","repos_url":"https://api.github.com/users/ampproject/repos","events_url":"https://api.github.com/users/ampproject/events{/privacy}","received_events_url":"https://api.github.com/users/ampproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ampproject/amphtml","description":"AMP HTML source code, samples, and documentation.  See below for more info.","fork":false,"url":"https://api.github.com/repos/ampproject/amphtml","forks_url":"https://api.github.com/repos/ampproject/amphtml/forks","keys_url":"https://api.github.com/repos/ampproject/amphtml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ampproject/amphtml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ampproject/amphtml/teams","hooks_url":"https://api.github.com/repos/ampproject/amphtml/hooks","issue_events_url":"https://api.github.com/repos/ampproject/amphtml/issues/events{/number}","events_url":"https://api.github.com/repos/ampproject/amphtml/events","assignees_url":"https://api.github.com/repos/ampproject/amphtml/assignees{/user}","branches_url":"https://api.github.com/repos/ampproject/amphtml/branches{/branch}","tags_url":"https://api.github.com/repos/ampproject/amphtml/tags","blobs_url":"https://api.github.com/repos/ampproject/amphtml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ampproject/amphtml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ampproject/amphtml/git/refs{/sha}","trees_url":"https://api.github.com/repos/ampproject/amphtml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ampproject/amphtml/statuses/{sha}","languages_url":"https://api.github.com/repos/ampproject/amphtml/languages","stargazers_url":"https://api.github.com/repos/ampproject/amphtml/stargazers","contributors_url":"https://api.github.com/repos/ampproject/amphtml/contributors","subscribers_url":"https://api.github.com/repos/ampproject/amphtml/subscribers","subscription_url":"https://api.github.com/repos/ampproject/amphtml/subscription","commits_url":"https://api.github.com/repos/ampproject/amphtml/commits{/sha}","git_commits_url":"https://api.github.com/repos/ampproject/amphtml/git/commits{/sha}","comments_url":"https://api.github.com/repos/ampproject/amphtml/comments{/number}","issue_comment_url":"https://api.github.com/repos/ampproject/amphtml/issues/comments{/number}","contents_url":"https://api.github.com/repos/ampproject/amphtml/contents/{+path}","compare_url":"https://api.github.com/repos/ampproject/amphtml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ampproject/amphtml/merges","archive_url":"https://api.github.com/repos/ampproject/amphtml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ampproject/amphtml/downloads","issues_url":"https://api.github.com/repos/ampproject/amphtml/issues{/number}","pulls_url":"https://api.github.com/repos/ampproject/amphtml/pulls{/number}","milestones_url":"https://api.github.com/repos/ampproject/amphtml/milestones{/number}","notifications_url":"https://api.github.com/repos/ampproject/amphtml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ampproject/amphtml/labels{/name}","releases_url":"https://api.github.com/repos/ampproject/amphtml/releases{/id}","deployments_url":"https://api.github.com/repos/ampproject/amphtml/deployments","created_at":"2015-09-01T22:10:53Z","updated_at":"2018-07-02T20:22:13Z","pushed_at":"2018-07-02T20:32:11Z","git_url":"git://github.com/ampproject/amphtml.git","ssh_url":"git@github.com:ampproject/amphtml.git","clone_url":"https://github.com/ampproject/amphtml.git","svn_url":"https://github.com/ampproject/amphtml","homepage":"https://www.ampproject.org","size":461667,"stargazers_count":11729,"watchers_count":11729,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":2476,"mirror_url":null,"archived":false,"open_issues_count":1332,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":2476,"open_issues":1332,"watchers":11729,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/16404"},"html":{"href":"https://github.com/ampproject/amphtml/pull/16404"},"issue":{"href":"https://api.github.com/repos/ampproject/amphtml/issues/16404"},"comments":{"href":"https://api.github.com/repos/ampproject/amphtml/issues/16404/comments"},"review_comments":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/16404/comments"},"review_comment":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/16404/commits"},"statuses":{"href":"https://api.github.com/repos/ampproject/amphtml/statuses/749a3f923a26f3e394fcd7cadecd33130509fe81"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"aghassemi"}}