mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Make reflect_dom_object take a &GlobalScope
This commit is contained in:
parent
093b189b48
commit
fcb59d3057
132 changed files with 488 additions and 407 deletions
|
@ -6,10 +6,10 @@
|
|||
use canvas_traits::CanvasMsg;
|
||||
use dom::bindings::codegen::Bindings::WebGLProgramBinding;
|
||||
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::js::{JS, MutNullableHeap, Root};
|
||||
use dom::bindings::reflector::{Reflectable, reflect_dom_object};
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::globalscope::GlobalScope;
|
||||
use dom::webglactiveinfo::WebGLActiveInfo;
|
||||
use dom::webglobject::WebGLObject;
|
||||
use dom::webglrenderingcontext::MAX_UNIFORM_AND_ATTRIBUTE_LEN;
|
||||
|
@ -48,7 +48,7 @@ impl WebGLProgram {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn maybe_new(global: GlobalRef, renderer: IpcSender<CanvasMsg>)
|
||||
pub fn maybe_new(global: &GlobalScope, renderer: IpcSender<CanvasMsg>)
|
||||
-> Option<Root<WebGLProgram>> {
|
||||
let (sender, receiver) = ipc::channel().unwrap();
|
||||
renderer.send(CanvasMsg::WebGL(WebGLCommand::CreateProgram(sender))).unwrap();
|
||||
|
@ -57,7 +57,7 @@ impl WebGLProgram {
|
|||
result.map(|program_id| WebGLProgram::new(global, renderer, program_id))
|
||||
}
|
||||
|
||||
pub fn new(global: GlobalRef,
|
||||
pub fn new(global: &GlobalScope,
|
||||
renderer: IpcSender<CanvasMsg>,
|
||||
id: WebGLProgramId)
|
||||
-> Root<WebGLProgram> {
|
||||
|
@ -230,7 +230,7 @@ impl WebGLProgram {
|
|||
.unwrap();
|
||||
|
||||
receiver.recv().unwrap().map(|(size, ty, name)|
|
||||
WebGLActiveInfo::new(self.global().r(), size, ty, DOMString::from(name)))
|
||||
WebGLActiveInfo::new(self.global().r().as_global_scope(), size, ty, DOMString::from(name)))
|
||||
}
|
||||
|
||||
/// glGetActiveAttrib
|
||||
|
@ -244,7 +244,7 @@ impl WebGLProgram {
|
|||
.unwrap();
|
||||
|
||||
receiver.recv().unwrap().map(|(size, ty, name)|
|
||||
WebGLActiveInfo::new(self.global().r(), size, ty, DOMString::from(name)))
|
||||
WebGLActiveInfo::new(self.global().r().as_global_scope(), size, ty, DOMString::from(name)))
|
||||
}
|
||||
|
||||
/// glGetAttribLocation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue