Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upUpdate img.complete implementation to match spec #24450
Open
Comments
|
I'll take a crack at this! @highfive: assign me? |
|
Hey @twilco! Thanks for your interest in working on this issue. It's now assigned to you! |
twilco
added a commit
to twilco/servo
that referenced
this issue
Oct 16, 2019
Per spec update, if the current request is completely available or broken, <img>.complete is only true if the pending request is unavailable. Issue servo#24450
twilco
added a commit
to twilco/servo
that referenced
this issue
Oct 29, 2019
The <img> spec frequently mentions setting and checking the null-status of pending request, but prior to this commit we did not have a consistent way to represent this. This commit changes the `pending_request` to be an DomRefCell<Option<ImageRequest>>, where a None value corresponds to a null pending request in the specification. <img>.complete is now only true if pending request is null (None). Issue servo#24450
bors-servo
added a commit
that referenced
this issue
Nov 2, 2019
…-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. -->
bors-servo
added a commit
that referenced
this issue
Nov 7, 2019
…-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. -->
bors-servo
added a commit
that referenced
this issue
Nov 12, 2019
…-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. -->
bors-servo
added a commit
that referenced
this issue
Nov 12, 2019
…-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. -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
whatwg/html#4934