mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Auto merge of #20669 - simartin:issue_20623, r=jdm
Issue #20623: Check the input to WebGLRenderingContext's clear(). Validate the input to this function as per specifications. --- - [X] `./mach build -d` does not report any errors - [X] `./mach build-geckolib` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #20623 - [X] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20669) <!-- Reviewable:end -->
This commit is contained in:
commit
0b5720547e
3 changed files with 36 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue