Filter out webidl files based on special comments, and feature-gate webxr interfaces. (#34348)

* Filter out webidl files based on skip-if directives.

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

* script: Don't build XR functionality without webxr feature.

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

* Fix tidy.

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

* script: Adjust imports for file movement.

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

* Fix clippy.

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

* Formatting.

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

* Clean up webxr module import.

Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>
Signed-off-by: Josh Matthews <josh@joshmatthews.net>

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
Josh Matthews 2024-11-24 13:01:35 -05:00 committed by GitHub
parent e956f3124c
commit 3faed9b921
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
94 changed files with 206 additions and 53 deletions

View file

@ -670,6 +670,7 @@ pub struct ScriptThread {
/// The WebXR device registry
#[no_trace]
#[cfg(feature = "webxr")]
webxr_registry: Option<webxr_api::Registry>,
/// The worklet thread pool
@ -1329,6 +1330,7 @@ impl ScriptThread {
system_font_service,
webgl_chan: state.webgl_chan,
#[cfg(feature = "webxr")]
webxr_registry: state.webxr_registry,
worklet_thread_pool: Default::default(),
@ -3751,6 +3753,7 @@ impl ScriptThread {
final_url.clone(),
incomplete.navigation_start,
self.webgl_chan.as_ref().map(|chan| chan.channel()),
#[cfg(feature = "webxr")]
self.webxr_registry.clone(),
self.microtask_queue.clone(),
self.webrender_document,