-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make <img>.complete more reliable #4934
Conversation
These changes are in line with all three browsers. Chrome still diverges significantly from the standard & tests though on other aspects. Tests: web-platform-tests/wpt#19298. Fixes #1055, fixes #4475. #4476 remains outstanding.
Align them somewhat with more modern practices and fix one test that expects img.complete to change during a while loop. Helps with whatwg/html#1055 and issues pointed out from there. whatwg/html#4934 has proposed HTML Standard changes.
…tonly Automatic update from web-platform-tests HTML: update <img>.complete tests Align them somewhat with more modern practices and fix one test that expects img.complete to change during a while loop. Helps with whatwg/html#1055 and issues pointed out from there. whatwg/html#4934 has proposed HTML Standard changes. -- wpt-commits: dc2e245a955c832e88d24e6a1af5f718da5491bd wpt-pr: 19298
…tonly Automatic update from web-platform-tests HTML: update <img>.complete tests Align them somewhat with more modern practices and fix one test that expects img.complete to change during a while loop. Helps with whatwg/html#1055 and issues pointed out from there. whatwg/html#4934 has proposed HTML Standard changes. -- wpt-commits: dc2e245a955c832e88d24e6a1af5f718da5491bd wpt-pr: 19298
…tonly Automatic update from web-platform-tests HTML: update <img>.complete tests Align them somewhat with more modern practices and fix one test that expects img.complete to change during a while loop. Helps with whatwg/html#1055 and issues pointed out from there. whatwg/html#4934 has proposed HTML Standard changes. -- wpt-commits: dc2e245a955c832e88d24e6a1af5f718da5491bd wpt-pr: 19298 UltraBlame original commit: c775395917748fc6bf05f54e385767b974109d4a
…tonly Automatic update from web-platform-tests HTML: update <img>.complete tests Align them somewhat with more modern practices and fix one test that expects img.complete to change during a while loop. Helps with whatwg/html#1055 and issues pointed out from there. whatwg/html#4934 has proposed HTML Standard changes. -- wpt-commits: dc2e245a955c832e88d24e6a1af5f718da5491bd wpt-pr: 19298 UltraBlame original commit: c775395917748fc6bf05f54e385767b974109d4a
…tonly Automatic update from web-platform-tests HTML: update <img>.complete tests Align them somewhat with more modern practices and fix one test that expects img.complete to change during a while loop. Helps with whatwg/html#1055 and issues pointed out from there. whatwg/html#4934 has proposed HTML Standard changes. -- wpt-commits: dc2e245a955c832e88d24e6a1af5f718da5491bd wpt-pr: 19298 UltraBlame original commit: c775395917748fc6bf05f54e385767b974109d4a
Okay, comment removed, I think this is good now. I'll file a Chrome bug as the tests have landed already: |
@annevk Sorry for the lag here... These changes are fine as far as they go, but they still don't end up matching UAs, because in the spec the pending request is completed async, off a stable state, while all UAs start returning |
…-img-completion, r=<try> Account for pending request state in <img>.complete Per spec update, if the \<img\> current request is completely available or broken, `complete` is only `true` if the \<img\>'s pending request is also unavailable. > The IDL attribute complete must return true if any of the following conditions is true: * Both the src attribute and the srcset attribute are omitted. * The srcset attribute is omitted and the src attribute's value is the empty string. * **The img element's current request's state is completely available and its pending request is null.** * **The img element's current request's state is broken and its pending request is null.** Spec diff: https://whatpr.org/html/4934/1ab7c86...02772ea/embedded-content.html#the-img-element #24450 --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #24450. - [x] These changes do not require tests because they _should_ be covered by the automatically synced WPT associated with the spec update at whatwg/html#4934. However, the [test updated with the spec change](https://github.com/servo/servo/blob/master/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/img.complete.html) passes before and after this PR. Should another test be added? <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
…-img-completion, r=<try> Account for pending request state in <img>.complete Per spec update, if the \<img\> current request is completely available or broken, `complete` is only `true` if the \<img\>'s pending request is also unavailable. > The IDL attribute complete must return true if any of the following conditions is true: * Both the src attribute and the srcset attribute are omitted. * The srcset attribute is omitted and the src attribute's value is the empty string. * **The img element's current request's state is completely available and its pending request is null.** * **The img element's current request's state is broken and its pending request is null.** Spec diff: https://whatpr.org/html/4934/1ab7c86...02772ea/embedded-content.html#the-img-element #24450 --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #24450. - [x] These changes do not require tests because they _should_ be covered by the automatically synced WPT associated with the spec update at whatwg/html#4934. However, the [test updated with the spec change](https://github.com/servo/servo/blob/master/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/img.complete.html) passes before and after this PR. Should another test be added? <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
…-img-completion, r=<try> Account for pending request state in <img>.complete Per spec update, if the \<img\> current request is completely available or broken, `complete` is only `true` if the \<img\>'s pending request is also unavailable. > The IDL attribute complete must return true if any of the following conditions is true: * Both the src attribute and the srcset attribute are omitted. * The srcset attribute is omitted and the src attribute's value is the empty string. * **The img element's current request's state is completely available and its pending request is null.** * **The img element's current request's state is broken and its pending request is null.** Spec diff: https://whatpr.org/html/4934/1ab7c86...02772ea/embedded-content.html#the-img-element #24450 --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #24450. - [x] These changes do not require tests because they _should_ be covered by the automatically synced WPT associated with the spec update at whatwg/html#4934. However, the [test updated with the spec change](https://github.com/servo/servo/blob/master/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/img.complete.html) passes before and after this PR. Should another test be added? <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
…-img-completion, r=<try> Account for pending request state in <img>.complete Per spec update, if the \<img\> current request is completely available or broken, `complete` is only `true` if the \<img\>'s pending request is also unavailable. > The IDL attribute complete must return true if any of the following conditions is true: * Both the src attribute and the srcset attribute are omitted. * The srcset attribute is omitted and the src attribute's value is the empty string. * **The img element's current request's state is completely available and its pending request is null.** * **The img element's current request's state is broken and its pending request is null.** Spec diff: https://whatpr.org/html/4934/1ab7c86...02772ea/embedded-content.html#the-img-element #24450 --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #24450. - [x] These changes do not require tests because they _should_ be covered by the automatically synced WPT associated with the spec update at whatwg/html#4934. However, the [test updated with the spec change](https://github.com/servo/servo/blob/master/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/img.complete.html) passes before and after this PR. Should another test be added? <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
These changes are in line with all three browsers. Chrome still diverges significantly from the standard & tests though on other aspects.
Tests: web-platform-tests/wpt#19298.
Fixes #1055, fixes #4475. #4476 remains outstanding.
(See WHATWG Working Mode: Changes for more details.)
/embedded-content.html ( diff )