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
|
@ -21,7 +21,7 @@ use crate::script_runtime::CanGc;
|
|||
|
||||
/// <https://url.spec.whatwg.org/#interface-urlsearchparams>
|
||||
#[dom_struct]
|
||||
pub struct URLSearchParams {
|
||||
pub(crate) struct URLSearchParams {
|
||||
reflector_: Reflector,
|
||||
/// <https://url.spec.whatwg.org/#concept-urlsearchparams-list>
|
||||
list: DomRefCell<Vec<(String, String)>>,
|
||||
|
@ -38,11 +38,15 @@ impl URLSearchParams {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn new(global: &GlobalScope, url: Option<&URL>, can_gc: CanGc) -> DomRoot<URLSearchParams> {
|
||||
pub(crate) fn new(
|
||||
global: &GlobalScope,
|
||||
url: Option<&URL>,
|
||||
can_gc: CanGc,
|
||||
) -> DomRoot<URLSearchParams> {
|
||||
Self::new_with_proto(global, None, url, can_gc)
|
||||
}
|
||||
|
||||
pub fn new_with_proto(
|
||||
pub(crate) fn new_with_proto(
|
||||
global: &GlobalScope,
|
||||
proto: Option<HandleObject>,
|
||||
url: Option<&URL>,
|
||||
|
@ -56,7 +60,7 @@ impl URLSearchParams {
|
|||
)
|
||||
}
|
||||
|
||||
pub fn set_list(&self, list: Vec<(String, String)>) {
|
||||
pub(crate) fn set_list(&self, list: Vec<(String, String)>) {
|
||||
*self.list.borrow_mut() = list;
|
||||
}
|
||||
}
|
||||
|
@ -211,7 +215,7 @@ impl URLSearchParamsMethods<crate::DomTypeHolder> for URLSearchParams {
|
|||
|
||||
impl URLSearchParams {
|
||||
/// <https://url.spec.whatwg.org/#concept-urlencoded-serializer>
|
||||
pub fn serialize_utf8(&self) -> String {
|
||||
pub(crate) fn serialize_utf8(&self) -> String {
|
||||
let list = self.list.borrow();
|
||||
form_urlencoded::Serializer::new(String::new())
|
||||
.extend_pairs(&*list)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue