mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
script: Limit public exports. (#34915)
* script: Restrict reexport visibility of DOM types. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Mass pub->pub(crate) conversion. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Hide existing dead code warnings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix clippy warnings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix unit tests. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix clippy. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * More formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
f220d6d3a5
commit
c94d909a86
585 changed files with 5411 additions and 5013 deletions
|
@ -28,7 +28,7 @@ use crate::dom::xrviewerpose::XRViewerPose;
|
|||
use crate::script_runtime::CanGc;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct XRFrame {
|
||||
pub(crate) struct XRFrame {
|
||||
reflector_: Reflector,
|
||||
session: Dom<XRSession>,
|
||||
#[ignore_malloc_size_of = "defined in webxr_api"]
|
||||
|
@ -49,7 +49,7 @@ impl XRFrame {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn new(global: &GlobalScope, session: &XRSession, data: Frame) -> DomRoot<XRFrame> {
|
||||
pub(crate) fn new(global: &GlobalScope, session: &XRSession, data: Frame) -> DomRoot<XRFrame> {
|
||||
reflect_dom_object(
|
||||
Box::new(XRFrame::new_inherited(session, data)),
|
||||
global,
|
||||
|
@ -58,20 +58,20 @@ impl XRFrame {
|
|||
}
|
||||
|
||||
/// <https://immersive-web.github.io/webxr/#xrframe-active>
|
||||
pub fn set_active(&self, active: bool) {
|
||||
pub(crate) fn set_active(&self, active: bool) {
|
||||
self.active.set(active);
|
||||
}
|
||||
|
||||
/// <https://immersive-web.github.io/webxr/#xrframe-animationframe>
|
||||
pub fn set_animation_frame(&self, animation_frame: bool) {
|
||||
pub(crate) fn set_animation_frame(&self, animation_frame: bool) {
|
||||
self.animation_frame.set(animation_frame);
|
||||
}
|
||||
|
||||
pub fn get_pose(&self, space: &XRSpace) -> Option<ApiPose> {
|
||||
pub(crate) fn get_pose(&self, space: &XRSpace) -> Option<ApiPose> {
|
||||
space.get_pose(&self.data)
|
||||
}
|
||||
|
||||
pub fn get_sub_images(&self, layer_id: LayerId) -> Option<&SubImages> {
|
||||
pub(crate) fn get_sub_images(&self, layer_id: LayerId) -> Option<&SubImages> {
|
||||
self.data
|
||||
.sub_images
|
||||
.iter()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue