From 5c61c3941de41ffb551eb6eea83ad5aca3c2d38f Mon Sep 17 00:00:00 2001 From: Ken Russell Date: Thu, 22 Feb 2024 11:31:51 -0800 Subject: [PATCH] Remove default value for interface attributes. (#3624) Per the bug report, Web IDL syntax does not allow default values to be specified for these attributes. Instead, specify the initial values for the drawingBufferColorSpace and unpackColorSpace attributes as comments in the spec. Fixes #3407. --- specs/latest/1.0/index.html | 7 +++++-- specs/latest/1.0/webgl.idl | 9 ++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/specs/latest/1.0/index.html b/specs/latest/1.0/index.html index 407f5318a..74dc700a4 100644 --- a/specs/latest/1.0/index.html +++ b/specs/latest/1.0/index.html @@ -1773,8 +1773,11 @@

The WebGL context

readonly attribute GLsizei drawingBufferWidth; readonly attribute GLsizei drawingBufferHeight; readonly attribute GLenum drawingBufferFormat; - attribute PredefinedColorSpace drawingBufferColorSpace = "srgb"; - attribute PredefinedColorSpace unpackColorSpace = "srgb"; + + /* Upon context creation, drawingBufferColorSpace and unpackColorSpace both + default to the value "srgb". */ + attribute PredefinedColorSpace drawingBufferColorSpace; + attribute PredefinedColorSpace unpackColorSpace; [WebGLHandlesContextLoss] WebGLContextAttributes? getContextAttributes(); [WebGLHandlesContextLoss] boolean isContextLost(); diff --git a/specs/latest/1.0/webgl.idl b/specs/latest/1.0/webgl.idl index 98c08681e..919c49ea7 100644 --- a/specs/latest/1.0/webgl.idl +++ b/specs/latest/1.0/webgl.idl @@ -3,7 +3,7 @@ // WebGL IDL definitions scraped from the Khronos specification: // https://www.khronos.org/registry/webgl/specs/latest/ -// Copyright (c) 2023 The Khronos Group Inc. +// Copyright (c) 2024 The Khronos Group Inc. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and/or associated documentation files (the @@ -540,8 +540,11 @@ interface mixin WebGLRenderingContextBase readonly attribute GLsizei drawingBufferWidth; readonly attribute GLsizei drawingBufferHeight; readonly attribute GLenum drawingBufferFormat; - attribute PredefinedColorSpace drawingBufferColorSpace = "srgb"; - attribute PredefinedColorSpace unpackColorSpace = "srgb"; + + /* Upon context creation, drawingBufferColorSpace and unpackColorSpace both + default to the value "srgb". */ + attribute PredefinedColorSpace drawingBufferColorSpace; + attribute PredefinedColorSpace unpackColorSpace; [WebGLHandlesContextLoss] WebGLContextAttributes? getContextAttributes(); [WebGLHandlesContextLoss] boolean isContextLost();