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 upImplement ImageBitmap #20650
Implement ImageBitmap #20650
Comments
|
So far any process on this? Where would be the best place to implement it (I mean components, or maybe which file)? |
|
Since this requires implementing a new interface, it would be required to follow the docs (or this guide). This would also require implementing the createImageBitmap API for WindowOrWorkerGlobalScope. |
This should be fixed after servo#20650 done.
This should be fixed after servo#20650 done.
This should be fixed after servo#20650 done.
This should be fixed after servo#20650 done.
This should be fixed after servo#20650 done.
This should be fixed after servo#20650 done.
This should be fixed after servo#20650 done.
This should be fixed after servo#20650 done.
This should be fixed after servo#20650 done.
This should be fixed after servo#20650 done.
This should be fixed after servo#20650 done.
This should be fixed after servo#20650 done.
This should be fixed after servo#20650 done.
This should be fixed after servo#20650 done.
This should be fixed after servo#20650 done.
This should be fixed after servo#20650 done.
This should be fixed after servo#20650 done.
This should be fixed after servo#20650 done.
This should be fixed after servo#20650 done.
This should be fixed after servo#20650 done.
|
In addition to the expected places CYBAI noted, this also has WPT implications in places like html/webappapis/scripting/processingmodel-2/unhandled-promise-rejections, where it is an arbitrarily chosen example of something that returns via promise and has to care about the origin of its input. |
|
I along with two more guys are working on this issue as part of our NCSU Class Project. I understand that the wiki is quite elaborate but we are having trouble understanding what exactly needs to be done. It would be quite helpful if the steps to be taken are further elaborated so as to help us in successfully starting with our implementation. Thanks in advance. |
|
Could you be more specific about the steps that are unclear right now? What have you understood so far? What have you accomplished? |
Implementation for ImageBitmap <!-- Please describe your changes on the following line: --> Created the boilerplate code for the image bitmap implementation. --- <!-- 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 - [ ] These changes fix #20650 <!-- 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. -->
Implementation for ImageBitmap <!-- Please describe your changes on the following line: --> Created the boilerplate code for the image bitmap implementation. --- <!-- 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 - [ ] These changes fix #20650 <!-- 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. -->
|
From personal correspondence:
|
|
|
Thank you for the shared information. |
|
You should use the |
|
Hi Josh, we committed our progress and we had a few doubts regarding our work. We were confused about the following.
Thank you in advance for your help. |
|
|
Hi Josh, we pushed some more changes to the codes and have a couple of build issues that we are facing,
Thanks in advance for your help. |
|
@ramyananth If you look closely at the code, you will see that fetch_all_data returns an Option type, like the error message suggests. The reason that the code in fetch_all_data works is that it uses the ? operator to immediately return a None value when the return value is None, otherwise it extracts the contents of the Some and continues executing (see the std::option docs for more about Option types). Rather than attaching screenshots of errors, in the future please copy and paste the text from the terminal. It is easier for me to read that way. As for your second question, I think you will need to provide more information to help me diagnose what's going wrong. In general, for a struct S that has field F, the dot operator will allow you to access that field. Since that is not working, you presumably are either trying to access a non-public field of ImageBitmap from a file that is not imagebitmap.rs, or the field you are trying to access does not actually exist, or you are trying to access the field on a value that is not actually a ImageBitmap value. For further help diagnosing it, please push your code to a branch and link the line of code that is triggering the error, and provide the full error message that you are receiving. |
WIP: Implementing createImageBitmap <!-- Please describe your changes on the following line: --> Implementing createImageBitmap method for canvas image source. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #20650 (GitHub issue number if applicable) <!-- 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. -->
WIP: Implementing createImageBitmap <!-- Please describe your changes on the following line: --> Implementing createImageBitmap method for canvas image source. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #20650 (GitHub issue number if applicable) <!-- 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. -->
Implementing createImageBitmap <!-- Please describe your changes on the following line: --> Implementing createImageBitmap method for canvas image source. --- <!-- 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 - [ ] These changes fix #20650 (GitHub issue number if applicable) <!-- 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. -->
Implementing createImageBitmap <!-- Please describe your changes on the following line: --> Implementing createImageBitmap method for canvas image source. --- <!-- 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 - [ ] These changes fix #20650 (GitHub issue number if applicable) <!-- 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. -->
Implementing createImageBitmap <!-- Please describe your changes on the following line: --> Implementing createImageBitmap method for canvas image source. --- <!-- 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 - [ ] These changes fix #20650 (GitHub issue number if applicable) <!-- 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. -->
|
Hi Josh, We just had a few doubts regarding testing our functionalities manually. You had suggested having a HTML <script> to test it. Going through some material on this, we understood that this could be possible using the HTML!() macro within the RUST code and embedding the HTML script within it. Are we allowed to modify the RUST code with our code to manually test the functionalities or is there another way to do so? Any additional material on this matter would be really helpful. Thank you in advance for your help. |
|
No, you would need to create a real HTML file and run |

https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap
https://html.spec.whatwg.org/multipage/#imagebitmap