mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +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
|
@ -18,7 +18,7 @@ use crate::dom::webglrenderingcontext::{Operation, WebGLRenderingContext};
|
|||
use crate::script_runtime::CanGc;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct WebGLQuery {
|
||||
pub(crate) struct WebGLQuery {
|
||||
webgl_object: WebGLObject,
|
||||
#[no_trace]
|
||||
gl_id: WebGLQueryId,
|
||||
|
@ -40,7 +40,7 @@ impl WebGLQuery {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn new(context: &WebGLRenderingContext) -> DomRoot<Self> {
|
||||
pub(crate) fn new(context: &WebGLRenderingContext) -> DomRoot<Self> {
|
||||
let (sender, receiver) = webgl_channel().unwrap();
|
||||
context.send_command(WebGLCommand::GenerateQuery(sender));
|
||||
let id = receiver.recv().unwrap();
|
||||
|
@ -52,7 +52,7 @@ impl WebGLQuery {
|
|||
)
|
||||
}
|
||||
|
||||
pub fn begin(
|
||||
pub(crate) fn begin(
|
||||
&self,
|
||||
context: &WebGLRenderingContext,
|
||||
target: u32,
|
||||
|
@ -77,7 +77,7 @@ impl WebGLQuery {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn end(
|
||||
pub(crate) fn end(
|
||||
&self,
|
||||
context: &WebGLRenderingContext,
|
||||
target: u32,
|
||||
|
@ -100,7 +100,7 @@ impl WebGLQuery {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn delete(&self, operation_fallibility: Operation) {
|
||||
pub(crate) fn delete(&self, operation_fallibility: Operation) {
|
||||
if !self.marked_for_deletion.get() {
|
||||
self.marked_for_deletion.set(true);
|
||||
|
||||
|
@ -113,11 +113,11 @@ impl WebGLQuery {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn is_valid(&self) -> bool {
|
||||
pub(crate) fn is_valid(&self) -> bool {
|
||||
!self.marked_for_deletion.get() && self.target().is_some()
|
||||
}
|
||||
|
||||
pub fn target(&self) -> Option<u32> {
|
||||
pub(crate) fn target(&self) -> Option<u32> {
|
||||
self.gl_target.get()
|
||||
}
|
||||
|
||||
|
@ -146,7 +146,7 @@ impl WebGLQuery {
|
|||
}
|
||||
|
||||
#[rustfmt::skip]
|
||||
pub fn get_parameter(
|
||||
pub(crate) fn get_parameter(
|
||||
&self,
|
||||
context: &WebGLRenderingContext,
|
||||
pname: u32,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue