diff options
author | Josh Matthews <josh@joshmatthews.net> | 2025-01-10 03:19:19 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-10 08:19:19 +0000 |
commit | c94d909a8688589209cdf0c7ae58e40f9b8c411e (patch) | |
tree | 12febf23eed4438249fd4d276c4d8b35dee22a97 /components/script/dom/mediafragmentparser.rs | |
parent | f220d6d3a52296794cd19935e9e59cc75a179a44 (diff) | |
download | servo-c94d909a8688589209cdf0c7ae58e40f9b8c411e.tar.gz servo-c94d909a8688589209cdf0c7ae58e40f9b8c411e.zip |
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>
Diffstat (limited to 'components/script/dom/mediafragmentparser.rs')
-rw-r--r-- | components/script/dom/mediafragmentparser.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/components/script/dom/mediafragmentparser.rs b/components/script/dom/mediafragmentparser.rs index 0dc949b6eef..342ee894a0a 100644 --- a/components/script/dom/mediafragmentparser.rs +++ b/components/script/dom/mediafragmentparser.rs @@ -11,7 +11,7 @@ use servo_url::ServoUrl; use url::{form_urlencoded, Position, Url}; #[derive(Clone, Copy, Debug, Eq, PartialEq)] -pub enum SpatialRegion { +pub(crate) enum SpatialRegion { Pixel, Percent, } @@ -29,7 +29,7 @@ impl FromStr for SpatialRegion { } #[derive(Clone, Debug, Eq, PartialEq)] -pub struct SpatialClipping { +pub(crate) struct SpatialClipping { region: Option<SpatialRegion>, x: u32, y: u32, @@ -38,7 +38,7 @@ pub struct SpatialClipping { } #[derive(Clone, Debug, Default, PartialEq)] -pub struct MediaFragmentParser { +pub(crate) struct MediaFragmentParser { id: Option<String>, tracks: Vec<String>, spatial: Option<SpatialClipping>, @@ -47,20 +47,20 @@ pub struct MediaFragmentParser { } impl MediaFragmentParser { - pub fn id(&self) -> Option<String> { + pub(crate) fn id(&self) -> Option<String> { self.id.clone() } - pub fn tracks(&self) -> &Vec<String> { + pub(crate) fn tracks(&self) -> &Vec<String> { self.tracks.as_ref() } - pub fn start(&self) -> Option<f64> { + pub(crate) fn start(&self) -> Option<f64> { self.start } // Parse an str of key value pairs, a URL, or a fragment. - pub fn parse(input: &str) -> MediaFragmentParser { + pub(crate) fn parse(input: &str) -> MediaFragmentParser { let mut parser = MediaFragmentParser::default(); let (query, fragment) = split_url(input); let mut octets = decode_octets(query.as_bytes()); |