aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
Diffstat (limited to 'components/script')
-rw-r--r--components/script/dom/webglrenderingcontext.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs
index 216d6779550..b8feeb9b93c 100644
--- a/components/script/dom/webglrenderingcontext.rs
+++ b/components/script/dom/webglrenderingcontext.rs
@@ -286,8 +286,6 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.14
fn GetExtension(&self, _cx: *mut JSContext, _name: DOMString) -> *mut JSObject {
- // TODO(ecoal95) we actually do not support extensions.
- // `getSupportedExtensions` cannot be implemented as of right now (see #544)
0 as *mut JSObject
}
@@ -640,8 +638,6 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
WebGLProgram::maybe_new(self.global().r(), self.ipc_renderer.clone())
}
- // TODO(ecoal95): Check if constants are cross-platform or if we must make a translation
- // between WebGL constants and native ones.
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9
fn CreateShader(&self, shader_type: u32) -> Option<Root<WebGLShader>> {
WebGLShader::maybe_new(self.global().r(), self.ipc_renderer.clone(), shader_type)
@@ -734,8 +730,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
return self.webgl_error(InvalidValue);
}
- // TODO ensure a non-null WebGLBuffer must be bound to the ELEMENT_ARRAY_BUFFER
- if self.current_program.get().is_none() {
+ if self.current_program.get().is_none() || self.bound_buffer_element_array.get().is_none() {
return self.webgl_error(InvalidOperation);
}