mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Add CanGc argument to reflect_dom_object (#34606)
* applied mach fmt Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com> Refinements Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com> Modified reflect_dom_object signature and all its calls Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com> * fix function calls when parameter is passed up Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com> --------- Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com>
This commit is contained in:
parent
471d3572b7
commit
0e9746fbbe
207 changed files with 570 additions and 101 deletions
|
@ -12,6 +12,7 @@ use crate::dom::bindings::codegen::Bindings::ANGLEInstancedArraysBinding::{
|
|||
use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
use crate::dom::webglrenderingcontext::WebGLRenderingContext;
|
||||
use crate::script_runtime::CanGc;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct ANGLEInstancedArrays {
|
||||
|
@ -35,6 +36,7 @@ impl WebGLExtension for ANGLEInstancedArrays {
|
|||
reflect_dom_object(
|
||||
Box::new(ANGLEInstancedArrays::new_inherited(ctx)),
|
||||
&*ctx.global(),
|
||||
CanGc::note(),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ use super::{WebGLExtension, WebGLExtensionSpec, WebGLExtensions};
|
|||
use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::webglrenderingcontext::WebGLRenderingContext;
|
||||
use crate::script_runtime::CanGc;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct EXTBlendMinmax {
|
||||
|
@ -27,7 +28,11 @@ impl WebGLExtension for EXTBlendMinmax {
|
|||
type Extension = Self;
|
||||
|
||||
fn new(ctx: &WebGLRenderingContext) -> DomRoot<Self> {
|
||||
reflect_dom_object(Box::new(Self::new_inherited()), &*ctx.global())
|
||||
reflect_dom_object(
|
||||
Box::new(Self::new_inherited()),
|
||||
&*ctx.global(),
|
||||
CanGc::note(),
|
||||
)
|
||||
}
|
||||
|
||||
fn spec() -> WebGLExtensionSpec {
|
||||
|
|
|
@ -10,6 +10,7 @@ use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector};
|
|||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::webgl_extensions::ext::oestexturehalffloat::OESTextureHalfFloat;
|
||||
use crate::dom::webglrenderingcontext::WebGLRenderingContext;
|
||||
use crate::script_runtime::CanGc;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct EXTColorBufferHalfFloat {
|
||||
|
@ -30,6 +31,7 @@ impl WebGLExtension for EXTColorBufferHalfFloat {
|
|||
reflect_dom_object(
|
||||
Box::new(EXTColorBufferHalfFloat::new_inherited()),
|
||||
&*ctx.global(),
|
||||
CanGc::note(),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ use super::{WebGLExtension, WebGLExtensionSpec, WebGLExtensions};
|
|||
use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::webglrenderingcontext::WebGLRenderingContext;
|
||||
use crate::script_runtime::CanGc;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct EXTFragDepth {
|
||||
|
@ -27,7 +28,11 @@ impl WebGLExtension for EXTFragDepth {
|
|||
type Extension = Self;
|
||||
|
||||
fn new(ctx: &WebGLRenderingContext) -> DomRoot<Self> {
|
||||
reflect_dom_object(Box::new(Self::new_inherited()), &*ctx.global())
|
||||
reflect_dom_object(
|
||||
Box::new(Self::new_inherited()),
|
||||
&*ctx.global(),
|
||||
CanGc::note(),
|
||||
)
|
||||
}
|
||||
|
||||
fn spec() -> WebGLExtensionSpec {
|
||||
|
|
|
@ -9,6 +9,7 @@ use super::{WebGLExtension, WebGLExtensionSpec, WebGLExtensions};
|
|||
use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::webglrenderingcontext::WebGLRenderingContext;
|
||||
use crate::script_runtime::CanGc;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct EXTShaderTextureLod {
|
||||
|
@ -27,7 +28,11 @@ impl WebGLExtension for EXTShaderTextureLod {
|
|||
type Extension = Self;
|
||||
|
||||
fn new(ctx: &WebGLRenderingContext) -> DomRoot<Self> {
|
||||
reflect_dom_object(Box::new(Self::new_inherited()), &*ctx.global())
|
||||
reflect_dom_object(
|
||||
Box::new(Self::new_inherited()),
|
||||
&*ctx.global(),
|
||||
CanGc::note(),
|
||||
)
|
||||
}
|
||||
|
||||
fn spec() -> WebGLExtensionSpec {
|
||||
|
|
|
@ -10,6 +10,7 @@ use crate::dom::bindings::codegen::Bindings::EXTTextureFilterAnisotropicBinding:
|
|||
use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::webglrenderingcontext::WebGLRenderingContext;
|
||||
use crate::script_runtime::CanGc;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct EXTTextureFilterAnisotropic {
|
||||
|
@ -28,7 +29,11 @@ impl WebGLExtension for EXTTextureFilterAnisotropic {
|
|||
type Extension = EXTTextureFilterAnisotropic;
|
||||
|
||||
fn new(ctx: &WebGLRenderingContext) -> DomRoot<Self> {
|
||||
reflect_dom_object(Box::new(Self::new_inherited()), &*ctx.global())
|
||||
reflect_dom_object(
|
||||
Box::new(Self::new_inherited()),
|
||||
&*ctx.global(),
|
||||
CanGc::note(),
|
||||
)
|
||||
}
|
||||
|
||||
fn spec() -> WebGLExtensionSpec {
|
||||
|
|
|
@ -9,6 +9,7 @@ use super::{WebGLExtension, WebGLExtensionSpec, WebGLExtensions};
|
|||
use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::webglrenderingcontext::WebGLRenderingContext;
|
||||
use crate::script_runtime::CanGc;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct OESElementIndexUint {
|
||||
|
@ -30,6 +31,7 @@ impl WebGLExtension for OESElementIndexUint {
|
|||
reflect_dom_object(
|
||||
Box::new(OESElementIndexUint::new_inherited()),
|
||||
&*ctx.global(),
|
||||
CanGc::note(),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ use crate::dom::bindings::codegen::Bindings::OESStandardDerivativesBinding::OESS
|
|||
use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::webglrenderingcontext::WebGLRenderingContext;
|
||||
use crate::script_runtime::CanGc;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct OESStandardDerivatives {
|
||||
|
@ -30,6 +31,7 @@ impl WebGLExtension for OESStandardDerivatives {
|
|||
reflect_dom_object(
|
||||
Box::new(OESStandardDerivatives::new_inherited()),
|
||||
&*ctx.global(),
|
||||
CanGc::note(),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ use super::{constants as webgl, WebGLExtension, WebGLExtensionSpec, WebGLExtensi
|
|||
use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::webglrenderingcontext::WebGLRenderingContext;
|
||||
use crate::script_runtime::CanGc;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct OESTextureFloat {
|
||||
|
@ -26,7 +27,11 @@ impl OESTextureFloat {
|
|||
impl WebGLExtension for OESTextureFloat {
|
||||
type Extension = OESTextureFloat;
|
||||
fn new(ctx: &WebGLRenderingContext) -> DomRoot<OESTextureFloat> {
|
||||
reflect_dom_object(Box::new(OESTextureFloat::new_inherited()), &*ctx.global())
|
||||
reflect_dom_object(
|
||||
Box::new(OESTextureFloat::new_inherited()),
|
||||
&*ctx.global(),
|
||||
CanGc::note(),
|
||||
)
|
||||
}
|
||||
|
||||
fn spec() -> WebGLExtensionSpec {
|
||||
|
|
|
@ -8,6 +8,7 @@ use super::{constants as webgl, WebGLExtension, WebGLExtensionSpec, WebGLExtensi
|
|||
use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::webglrenderingcontext::WebGLRenderingContext;
|
||||
use crate::script_runtime::CanGc;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct OESTextureFloatLinear {
|
||||
|
@ -28,6 +29,7 @@ impl WebGLExtension for OESTextureFloatLinear {
|
|||
reflect_dom_object(
|
||||
Box::new(OESTextureFloatLinear::new_inherited()),
|
||||
&*ctx.global(),
|
||||
CanGc::note(),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ use crate::dom::bindings::codegen::Bindings::OESTextureHalfFloatBinding::OESText
|
|||
use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::webglrenderingcontext::WebGLRenderingContext;
|
||||
use crate::script_runtime::CanGc;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct OESTextureHalfFloat {
|
||||
|
@ -30,6 +31,7 @@ impl WebGLExtension for OESTextureHalfFloat {
|
|||
reflect_dom_object(
|
||||
Box::new(OESTextureHalfFloat::new_inherited()),
|
||||
&*ctx.global(),
|
||||
CanGc::note(),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ use crate::dom::bindings::codegen::Bindings::OESTextureHalfFloatBinding::OESText
|
|||
use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::webglrenderingcontext::WebGLRenderingContext;
|
||||
use crate::script_runtime::CanGc;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct OESTextureHalfFloatLinear {
|
||||
|
@ -29,6 +30,7 @@ impl WebGLExtension for OESTextureHalfFloatLinear {
|
|||
reflect_dom_object(
|
||||
Box::new(OESTextureHalfFloatLinear::new_inherited()),
|
||||
&*ctx.global(),
|
||||
CanGc::note(),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector};
|
|||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
use crate::dom::webglrenderingcontext::WebGLRenderingContext;
|
||||
use crate::dom::webglvertexarrayobjectoes::WebGLVertexArrayObjectOES;
|
||||
use crate::script_runtime::CanGc;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct OESVertexArrayObject {
|
||||
|
@ -57,6 +58,7 @@ impl WebGLExtension for OESVertexArrayObject {
|
|||
reflect_dom_object(
|
||||
Box::new(OESVertexArrayObject::new_inherited(ctx)),
|
||||
&*ctx.global(),
|
||||
CanGc::note(),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector};
|
|||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::webgl_extensions::ext::oestexturefloat::OESTextureFloat;
|
||||
use crate::dom::webglrenderingcontext::WebGLRenderingContext;
|
||||
use crate::script_runtime::CanGc;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct WEBGLColorBufferFloat {
|
||||
|
@ -30,6 +31,7 @@ impl WebGLExtension for WEBGLColorBufferFloat {
|
|||
reflect_dom_object(
|
||||
Box::new(WEBGLColorBufferFloat::new_inherited()),
|
||||
&*ctx.global(),
|
||||
CanGc::note(),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector};
|
|||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::webglrenderingcontext::WebGLRenderingContext;
|
||||
use crate::dom::webgltexture::{TexCompression, TexCompressionValidation};
|
||||
use crate::script_runtime::CanGc;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct WEBGLCompressedTextureETC1 {
|
||||
|
@ -30,6 +31,7 @@ impl WebGLExtension for WEBGLCompressedTextureETC1 {
|
|||
reflect_dom_object(
|
||||
Box::new(WEBGLCompressedTextureETC1::new_inherited()),
|
||||
&*ctx.global(),
|
||||
CanGc::note(),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector};
|
|||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::webglrenderingcontext::WebGLRenderingContext;
|
||||
use crate::dom::webgltexture::{TexCompression, TexCompressionValidation};
|
||||
use crate::script_runtime::CanGc;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct WEBGLCompressedTextureS3TC {
|
||||
|
@ -30,6 +31,7 @@ impl WebGLExtension for WEBGLCompressedTextureS3TC {
|
|||
reflect_dom_object(
|
||||
Box::new(WEBGLCompressedTextureS3TC::new_inherited()),
|
||||
&*ctx.global(),
|
||||
CanGc::note(),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue