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,10 +28,10 @@ use crate::dom::eventtarget::EventTarget;
|
|||
// 32 is the minimum required by the spec for createBuffer() and the deprecated
|
||||
// createScriptProcessor() and matches what is used by Blink and Gecko.
|
||||
// The limit protects against large memory allocations.
|
||||
pub const MAX_CHANNEL_COUNT: u32 = 32;
|
||||
pub(crate) const MAX_CHANNEL_COUNT: u32 = 32;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct AudioNode {
|
||||
pub(crate) struct AudioNode {
|
||||
eventtarget: EventTarget,
|
||||
#[ignore_malloc_size_of = "servo_media"]
|
||||
#[no_trace]
|
||||
|
@ -45,7 +45,7 @@ pub struct AudioNode {
|
|||
}
|
||||
|
||||
impl AudioNode {
|
||||
pub fn new_inherited(
|
||||
pub(crate) fn new_inherited(
|
||||
node_type: AudioNodeInit,
|
||||
context: &BaseAudioContext,
|
||||
options: UnwrappedAudioNodeOptions,
|
||||
|
@ -75,7 +75,7 @@ impl AudioNode {
|
|||
))
|
||||
}
|
||||
|
||||
pub fn new_inherited_for_id(
|
||||
pub(crate) fn new_inherited_for_id(
|
||||
node_id: NodeId,
|
||||
context: &BaseAudioContext,
|
||||
options: UnwrappedAudioNodeOptions,
|
||||
|
@ -94,7 +94,7 @@ impl AudioNode {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn message(&self, message: AudioNodeMessage) {
|
||||
pub(crate) fn message(&self, message: AudioNodeMessage) {
|
||||
self.context
|
||||
.audio_context_impl()
|
||||
.lock()
|
||||
|
@ -102,7 +102,7 @@ impl AudioNode {
|
|||
.message_node(self.node_id, message);
|
||||
}
|
||||
|
||||
pub fn node_id(&self) -> NodeId {
|
||||
pub(crate) fn node_id(&self) -> NodeId {
|
||||
self.node_id
|
||||
}
|
||||
}
|
||||
|
@ -388,7 +388,7 @@ impl Convert<ServoMediaChannelInterpretation> for ChannelInterpretation {
|
|||
}
|
||||
|
||||
impl AudioNodeOptions {
|
||||
pub fn unwrap_or(
|
||||
pub(crate) fn unwrap_or(
|
||||
&self,
|
||||
count: u32,
|
||||
mode: ChannelCountMode,
|
||||
|
@ -404,10 +404,10 @@ impl AudioNodeOptions {
|
|||
|
||||
/// Each node has a set of defaults, so this lets us work with them
|
||||
/// easily without having to deal with the Options
|
||||
pub struct UnwrappedAudioNodeOptions {
|
||||
pub count: u32,
|
||||
pub mode: ChannelCountMode,
|
||||
pub interpretation: ChannelInterpretation,
|
||||
pub(crate) struct UnwrappedAudioNodeOptions {
|
||||
pub(crate) count: u32,
|
||||
pub(crate) mode: ChannelCountMode,
|
||||
pub(crate) interpretation: ChannelInterpretation,
|
||||
}
|
||||
|
||||
impl Default for UnwrappedAudioNodeOptions {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue