Move more bindings code to script_bindings (#35578)

* Move JSContext wrapper to script_bindings.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Move webidl constant bindings to script_bindings.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Move CanGc to script_bindings.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Move Dom<T> and Root<T> types to script_bindings.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Formatting.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Extra docs for new traits.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Fix clippy warnings.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
Josh Matthews 2025-02-21 23:46:56 -05:00 committed by GitHub
parent 54286229ea
commit 35f21e426b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 788 additions and 641 deletions

View file

@ -97,6 +97,7 @@ pub(crate) mod module {
jsapi, typedarray, JSCLASS_GLOBAL_SLOT_COUNT, JSCLASS_IS_DOMJSCLASS, JSCLASS_IS_GLOBAL,
JSCLASS_RESERVED_SLOTS_MASK, JS_CALLEE,
};
pub(crate) use script_bindings::constant::{ConstantSpec, ConstantVal};
pub(crate) use servo_config::pref;
pub(crate) use super::base::*;
@ -109,7 +110,6 @@ pub(crate) mod module {
pub(crate) use crate::dom::bindings::codegen::{
InterfaceObjectMap, PrototypeList, RegisterBindings,
};
pub(crate) use crate::dom::bindings::constant::{ConstantSpec, ConstantVal};
pub(crate) use crate::dom::bindings::constructor::{
call_default_constructor, call_html_constructor, pop_current_element_queue,
push_new_element_queue,