mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +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
|
@ -33,7 +33,7 @@ use crate::script_runtime::JSContext;
|
|||
/// that throws security exceptions for most accessors. This is not a replacement
|
||||
/// for XOWs, but provides belt-and-braces security.
|
||||
#[dom_struct]
|
||||
pub struct DissimilarOriginWindow {
|
||||
pub(crate) struct DissimilarOriginWindow {
|
||||
/// The global for this window.
|
||||
globalscope: GlobalScope,
|
||||
|
||||
|
@ -46,7 +46,10 @@ pub struct DissimilarOriginWindow {
|
|||
|
||||
impl DissimilarOriginWindow {
|
||||
#[allow(unsafe_code)]
|
||||
pub fn new(global_to_clone_from: &GlobalScope, window_proxy: &WindowProxy) -> DomRoot<Self> {
|
||||
pub(crate) fn new(
|
||||
global_to_clone_from: &GlobalScope,
|
||||
window_proxy: &WindowProxy,
|
||||
) -> DomRoot<Self> {
|
||||
let cx = GlobalScope::get_cx();
|
||||
let win = Box::new(Self {
|
||||
globalscope: GlobalScope::new_inherited(
|
||||
|
@ -74,7 +77,7 @@ impl DissimilarOriginWindow {
|
|||
unsafe { DissimilarOriginWindowBinding::Wrap(cx, win) }
|
||||
}
|
||||
|
||||
pub fn window_proxy(&self) -> DomRoot<WindowProxy> {
|
||||
pub(crate) fn window_proxy(&self) -> DomRoot<WindowProxy> {
|
||||
DomRoot::from_ref(&*self.window_proxy)
|
||||
}
|
||||
}
|
||||
|
@ -211,7 +214,7 @@ impl DissimilarOriginWindow {
|
|||
}
|
||||
|
||||
/// <https://html.spec.whatwg.org/multipage/#window-post-message-steps>
|
||||
pub fn post_message(
|
||||
pub(crate) fn post_message(
|
||||
&self,
|
||||
target_origin: &USVString,
|
||||
data: StructuredSerializedData,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue