Hi Nita!
There are some existing pieces of code that should be good models for your work: * the Text API in components/script/dom/blob.rs shows how to return a new promise object * the RequestReferenceSpace API in components/script/dom/xrsession.rs shows how to reject a promise with an error * in components/script/canvas_state.rs, the `draw_image_internal` method accepts various kinds of input image sources and checks if they are usable * in components/script/dom/window.rs, the Scroll API shows how to access dictionary values passed as arguments (see components/script/dom/webidls/Window.webidl)

To manually test your work, you will want an HTML page with a <script> that verifies certain properties of your implementation: * does createImageBitmap with a HTMLCanvasElement argument return a promise that resolves successfully? * does createImageBitmap with an unsupported input type throw a JS exception?

There's example code at https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/createImageBitmap that should help, although it relies on createImageBitmap accepting an HTMLImageElement. If you're starting with supporting HTMLCanvasElement, you will need a <canvas> in the page like the JavaScript example at https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas .

Cheers,
Josh

On 2020-04-17 12:08 p.m., Nita Radhakrishnan wrote:
Good afternoon Josh,

I hope you are doing well.
We apologize for the long email.

We are working on implementing the createImageBitmap method without the
extra x/y/w/h parameters. We were trying to understand the code flow from
the previous team and from the links that you provided in the previous
team's issue. We just wanted to confirm that the following procedure
reflects our correct understanding of what has to be done for the project.

1. The WebIDL interface for createImageBitmap is added in
servo/components/script/dom/webidls/WindowOrWorkerGlobalScope.webidl
2. In the window.rs and  workerGlobalScope.rs files we are to include the
WebIDL interface and implement the algorithm for createImageBitmap in RUST.

We also had a few other questions.
1. Are there any similar implementations in RUST that we could use for
reference to help us?
2. How do we manually test if our implementations are working?

We are looking forward to hearing from you.

Thank you in advance for your help.

WIth best regards,
Team


On Tue, Apr 7, 2020 at 11:14 AM Nita Radhakrishnan <nradh...@ncsu.edu>
wrote:

Yes, we're a new team.

On Tue, Apr 7, 2020, 11:04 AM Josh Matthews <j...@joshmatthews.net> wrote:

To be clear, is this a different group than the one that implemented the
most basic new interface in https://github.com/servo/servo/pull/26009?

Cheers,
Josh

On 2020-04-06 8:10 p.m., Nita Radhakrishnan wrote:
Hi,

We are a group of 4 people and we have taken up the project to Implement
ImageBitmap in Mozilla. This is our introduction email.

The members of the team are as follows, along with our personal github
IDS.
Nita Radhakrishnan - (nradhak2)
Jayalakshmi Vishwanathan - (JayalakshmiV)
Sandeep Kundala - (sandeepkundala)
Ramya Ananth - (ramyananth)

We are eagerly looking forward to working on this project.


Regards,
Team




_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to