mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +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
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue