aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webglrenderingcontext.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/webglrenderingcontext.rs')
-rw-r--r--components/script/dom/webglrenderingcontext.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs
index 4aa6c047a1b..bb1cace295e 100644
--- a/components/script/dom/webglrenderingcontext.rs
+++ b/components/script/dom/webglrenderingcontext.rs
@@ -3643,7 +3643,8 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
Float32ArrayOrUnrestrictedFloatSequence::UnrestrictedFloatSequence(v) => v,
};
if values.len() < 1 {
- return self.webgl_error(InvalidOperation);
+ // https://github.com/KhronosGroup/WebGL/issues/2700
+ return self.webgl_error(InvalidValue);
}
self.vertex_attrib(indx, values[0], 0f32, 0f32, 1f32);
}
@@ -3660,7 +3661,8 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
Float32ArrayOrUnrestrictedFloatSequence::UnrestrictedFloatSequence(v) => v,
};
if values.len() < 2 {
- return self.webgl_error(InvalidOperation);
+ // https://github.com/KhronosGroup/WebGL/issues/2700
+ return self.webgl_error(InvalidValue);
}
self.vertex_attrib(indx, values[0], values[1], 0f32, 1f32);
}
@@ -3677,7 +3679,8 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
Float32ArrayOrUnrestrictedFloatSequence::UnrestrictedFloatSequence(v) => v,
};
if values.len() < 3 {
- return self.webgl_error(InvalidOperation);
+ // https://github.com/KhronosGroup/WebGL/issues/2700
+ return self.webgl_error(InvalidValue);
}
self.vertex_attrib(indx, values[0], values[1], values[2], 1f32);
}
@@ -3694,7 +3697,8 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
Float32ArrayOrUnrestrictedFloatSequence::UnrestrictedFloatSequence(v) => v,
};
if values.len() < 4 {
- return self.webgl_error(InvalidOperation);
+ // https://github.com/KhronosGroup/WebGL/issues/2700
+ return self.webgl_error(InvalidValue);
}
self.vertex_attrib(indx, values[0], values[1], values[2], values[3]);
}