mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Rename Root<T> to DomRoot<T>
In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>, where Root<T> will be able to handle all the things that need to be rooted that have a stable traceable address that doesn't move for the whole lifetime of the root. Stay tuned.
This commit is contained in:
parent
577370746e
commit
f87c2a8d76
291 changed files with 1774 additions and 1770 deletions
|
@ -8,7 +8,7 @@ use canvas_traits::webgl::webgl_channel;
|
|||
use dom::bindings::codegen::Bindings::WebGLProgramBinding;
|
||||
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
|
||||
use dom::bindings::reflector::{DomObject, reflect_dom_object};
|
||||
use dom::bindings::root::{MutNullableDom, Root};
|
||||
use dom::bindings::root::{DomRoot, MutNullableDom};
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::webglactiveinfo::WebGLActiveInfo;
|
||||
use dom::webglobject::WebGLObject;
|
||||
|
@ -48,7 +48,7 @@ impl WebGLProgram {
|
|||
}
|
||||
|
||||
pub fn maybe_new(window: &Window, renderer: WebGLMsgSender)
|
||||
-> Option<Root<WebGLProgram>> {
|
||||
-> Option<DomRoot<WebGLProgram>> {
|
||||
let (sender, receiver) = webgl_channel().unwrap();
|
||||
renderer.send(WebGLCommand::CreateProgram(sender)).unwrap();
|
||||
|
||||
|
@ -59,7 +59,7 @@ impl WebGLProgram {
|
|||
pub fn new(window: &Window,
|
||||
renderer: WebGLMsgSender,
|
||||
id: WebGLProgramId)
|
||||
-> Root<WebGLProgram> {
|
||||
-> DomRoot<WebGLProgram> {
|
||||
reflect_dom_object(box WebGLProgram::new_inherited(renderer, id),
|
||||
window,
|
||||
WebGLProgramBinding::Wrap)
|
||||
|
@ -219,7 +219,7 @@ impl WebGLProgram {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn get_active_uniform(&self, index: u32) -> WebGLResult<Root<WebGLActiveInfo>> {
|
||||
pub fn get_active_uniform(&self, index: u32) -> WebGLResult<DomRoot<WebGLActiveInfo>> {
|
||||
if self.is_deleted() {
|
||||
return Err(WebGLError::InvalidValue);
|
||||
}
|
||||
|
@ -233,7 +233,7 @@ impl WebGLProgram {
|
|||
}
|
||||
|
||||
/// glGetActiveAttrib
|
||||
pub fn get_active_attrib(&self, index: u32) -> WebGLResult<Root<WebGLActiveInfo>> {
|
||||
pub fn get_active_attrib(&self, index: u32) -> WebGLResult<DomRoot<WebGLActiveInfo>> {
|
||||
if self.is_deleted() {
|
||||
return Err(WebGLError::InvalidValue);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue