script: Add CanvasContext trait (#35448)

* trait `CanvasContext`

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* fixup most stuff

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* explain and limit crown `allow(crown::unrooted_must_root)`

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
Samson 2025-02-21 21:26:27 +01:00 committed by GitHub
parent 084006abb6
commit a6f19c0092
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 317 additions and 210 deletions

View file

@ -12,6 +12,7 @@ use canvas_traits::webgl::{
use dom_struct::dom_struct;
use fnv::FnvHashSet;
use crate::canvas_context::CanvasContext;
use crate::dom::bindings::cell::{DomRefCell, Ref};
use crate::dom::bindings::codegen::Bindings::WebGL2RenderingContextBinding::WebGL2RenderingContextConstants as constants2;
use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;