LibWeb: Implement HTML::ImageBitmap creation from HTML::ImageData
Specification
See ImageData section at https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#dom-createimagebitmap
Demo
Happy Path
Sad Path
Updated Test Results
Also those are some interesting tests you posted. Might be good to get them into the repo. as RefTests, preferably, but could be one of the other two types as well.
@ADKaster Do we have any existing infrastructure for async Ref tests? Maybe I missed it but it doesn't seem like any Ref tests do async things. Same for Screenshot tests (I just searched for await and .then in their respective input directories and no hits came up).
My new Ref test was initially failing locally and in CI because the image/validation is captured and ran before the page was finished fully rendering. See the attached, this is what was put into test-dumps. You can see it was captured as it was in the middle of rendering the row and had more than half of the bitmap left to go.
I am using the asyncTest stuff in the new Text test I added via Text/input/include.js, so I tried just copying include.js to Ref/input/include.js and using it in my ref test, trying in CI to confirm.
If we're fine with this approach and CI is happy I can move include.js into the root Tests/LibWeb directory and refactor so all test types have access. Or maybe should this test be a Screenshot?
Okay that didn't work. I think I'll just move it to a Text test
Your pull request has conflicts that need to be resolved before it can be reviewed and merged. Make sure to rebase your branch on top of the latest master.