mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00: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
|
@ -27,7 +27,7 @@ use crate::dom::window::Window;
|
|||
use crate::script_runtime::CanGc;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct MouseEvent {
|
||||
pub(crate) struct MouseEvent {
|
||||
uievent: UIEvent,
|
||||
screen_x: Cell<i32>,
|
||||
screen_y: Cell<i32>,
|
||||
|
@ -51,7 +51,7 @@ pub struct MouseEvent {
|
|||
}
|
||||
|
||||
impl MouseEvent {
|
||||
pub fn new_inherited() -> MouseEvent {
|
||||
pub(crate) fn new_inherited() -> MouseEvent {
|
||||
MouseEvent {
|
||||
uievent: UIEvent::new_inherited(),
|
||||
screen_x: Cell::new(0),
|
||||
|
@ -75,7 +75,7 @@ impl MouseEvent {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn new_uninitialized(window: &Window, can_gc: CanGc) -> DomRoot<MouseEvent> {
|
||||
pub(crate) fn new_uninitialized(window: &Window, can_gc: CanGc) -> DomRoot<MouseEvent> {
|
||||
Self::new_uninitialized_with_proto(window, None, can_gc)
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,7 @@ impl MouseEvent {
|
|||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn new(
|
||||
pub(crate) fn new(
|
||||
window: &Window,
|
||||
type_: DOMString,
|
||||
can_bubble: EventBubbles,
|
||||
|
@ -181,7 +181,7 @@ impl MouseEvent {
|
|||
|
||||
/// <https://w3c.github.io/uievents/#initialize-a-mouseevent>
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn initialize_mouse_event(
|
||||
pub(crate) fn initialize_mouse_event(
|
||||
&self,
|
||||
type_: DOMString,
|
||||
can_bubble: EventBubbles,
|
||||
|
@ -234,7 +234,7 @@ impl MouseEvent {
|
|||
self.point_in_target.set(point_in_target);
|
||||
}
|
||||
|
||||
pub fn point_in_target(&self) -> Option<Point2D<f32>> {
|
||||
pub(crate) fn point_in_target(&self) -> Option<Point2D<f32>> {
|
||||
self.point_in_target.get()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue