Hi, it would be nice to be able to set/get WebGLErrorsToConsole flag in WebKit2
Created attachment 183011 [details] patch proposal
Curious: Why not just enable it by default? Is it too verbose or something?
(In reply to comment #2) > Curious: Why not just enable it by default? Is it too verbose or something? IMHO, could be enable by default for debug builds.
(In reply to comment #3) > (In reply to comment #2) > > Curious: Why not just enable it by default? Is it too verbose or something? > > IMHO, could be enable by default for debug builds. This feature is useful for web developers. So, even we if we enable it for debug builds, I think still need to enable it (either by default, or behind a flag) in "regular" builds.
> This feature is useful for web developers. So, even we if we enable it for debug builds, I think still need to enable it (either by default, or behind a flag) in "regular" builds. Agreed. Please answer my question :)
I don't known why this was chosen in the first place. Ccing people having worked on bug #77696
The patch looks reasonable to me but someone who works on WebKit2 should review it.
I also don't understand what this switch is for. What console do the errors go to? The Web Inspector console?
(In reply to comment #8) > I also don't understand what this switch is for. What console do the errors go to? The Web Inspector console? yes.
Also, answering the earlier question, I don't remember why this was made a page setting rather than enabled by default, but it can be too verbose for poorly written WebGL applications. For this reason WebGLRenderingContext contains a throttle which turns it off after a certain number of errors.
Comment on attachment 183011 [details] patch proposal This doesn't seem like a useful switch to have.
Thinking back, I am pretty sure this switch was added so that TestRunner/DumpRenderTree could turn off the logging of errors to the console. Some tests generate more than one kind of error. While a test can be written to check only for the one it wants, it can't prevent the WebGL implementation from logging all of the errors to the console, and those might vary between OpenGL implementations, leading to platform-specific text differences in the output.
(In reply to comment #12) > Thinking back, I am pretty sure this switch was added so that TestRunner/DumpRenderTree could turn off the logging of errors to the console. Some tests generate more than one kind of error. While a test can be written to check only for the one it wants, it can't prevent the WebGL implementation from logging all of the errors to the console, and those might vary between OpenGL implementations, leading to platform-specific text differences in the output. In that case, the switch should be switchable from window.internals.settings, and new API should not be necessary.
(In reply to comment #13) > (In reply to comment #12) > > Thinking back, I am pretty sure this switch was added so that TestRunner/DumpRenderTree could turn off the logging of errors to the console. Some tests generate more than one kind of error. While a test can be written to check only for the one it wants, it can't prevent the WebGL implementation from logging all of the errors to the console, and those might vary between OpenGL implementations, leading to platform-specific text differences in the output. > > In that case, the switch should be switchable from window.internals.settings, and new API should not be necessary. Thanks for the suggestion. Bug 107218 filed about doing this.