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:
Josh Matthews 2025-01-10 03:19:19 -05:00 committed by GitHub
parent f220d6d3a5
commit c94d909a86
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
585 changed files with 5411 additions and 5013 deletions

View file

@ -29,7 +29,7 @@ enum Direction {
}
#[dom_struct]
pub struct Selection {
pub(crate) struct Selection {
reflector_: Reflector,
document: Dom<Document>,
range: MutNullableDom<Range>,
@ -48,7 +48,7 @@ impl Selection {
}
}
pub fn new(document: &Document) -> DomRoot<Selection> {
pub(crate) fn new(document: &Document) -> DomRoot<Selection> {
reflect_dom_object(
Box::new(Selection::new_inherited(document)),
&*document.global(),
@ -80,7 +80,7 @@ impl Selection {
}
}
pub fn queue_selectionchange_task(&self) {
pub(crate) fn queue_selectionchange_task(&self) {
if self.task_queued.get() {
// Spec doesn't specify not to queue multiple tasks,
// but it's much easier to code range operations if