servoshell: Fix --no-default-features and make webxr optional on ohos/android (#34242)

* servoshell: fix --no-default-features

The Embeddertraits only contain `register_webxr` if the
webxr feature is enabled, hence we also need to guard
the trait implementation.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>

* ohos/android: Make webxr optional in servoshell

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This commit is contained in:
Jonathan Schwender 2024-11-13 21:02:30 +01:00 committed by GitHub
parent 47a243614f
commit 6b6697e97b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 16 additions and 4 deletions

View file

@ -42,6 +42,7 @@ impl EmbedderMethods for EmbedderCallbacks {
self.event_loop_waker.clone()
}
#[cfg(feature = "webxr")]
fn register_webxr(
&mut self,
xr: &mut webxr::MainThreadRegistry,