diff options
Diffstat (limited to 'components/script/dom/webglrenderingcontext.rs')
-rw-r--r-- | components/script/dom/webglrenderingcontext.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs index 32059db6302..6617e1b227f 100644 --- a/components/script/dom/webglrenderingcontext.rs +++ b/components/script/dom/webglrenderingcontext.rs @@ -1878,6 +1878,9 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { if !self.validate_framebuffer_complete() { return; } + if mask & !(constants::DEPTH_BUFFER_BIT | constants::STENCIL_BUFFER_BIT | constants::COLOR_BUFFER_BIT) != 0 { + return self.webgl_error(InvalidValue); + } self.send_command(WebGLCommand::Clear(mask)); self.mark_as_dirty(); |