mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #26296 - ramyananth:master, r=jdm
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. -->
This commit is contained in:
commit
39e4eb43c3
73 changed files with 340 additions and 46 deletions
|
@ -7,6 +7,9 @@ use crate::dom::bindings::codegen::Bindings::DocumentBinding::{
|
|||
DocumentMethods, DocumentReadyState,
|
||||
};
|
||||
use crate::dom::bindings::codegen::Bindings::HistoryBinding::HistoryBinding::HistoryMethods;
|
||||
use crate::dom::bindings::codegen::Bindings::ImageBitmapBinding::{
|
||||
ImageBitmapOptions, ImageBitmapSource,
|
||||
};
|
||||
use crate::dom::bindings::codegen::Bindings::MediaQueryListBinding::MediaQueryListBinding::MediaQueryListMethods;
|
||||
use crate::dom::bindings::codegen::Bindings::RequestBinding::RequestInit;
|
||||
use crate::dom::bindings::codegen::Bindings::VoidFunctionBinding::VoidFunction;
|
||||
|
@ -889,6 +892,18 @@ impl WindowMethods for Window {
|
|||
.queue_function_as_microtask(callback);
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-createimagebitmap
|
||||
fn CreateImageBitmap(
|
||||
&self,
|
||||
image: ImageBitmapSource,
|
||||
options: &ImageBitmapOptions,
|
||||
) -> Rc<Promise> {
|
||||
let p = self
|
||||
.upcast::<GlobalScope>()
|
||||
.create_image_bitmap(image, options);
|
||||
p
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-window
|
||||
fn Window(&self) -> DomRoot<WindowProxy> {
|
||||
self.window_proxy()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue