Bug 107035 - [WK2] Expose WebGLErrorsToConsole settings in WebKit2
Summary: [WK2] Expose WebGLErrorsToConsole settings in WebKit2
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: arno.
URL:
Keywords:
Depends on:
Blocks: 104138
  Show dependency treegraph
 
Reported: 2013-01-16 11:05 PST by arno.
Modified: 2013-01-17 19:48 PST (History)
9 users (show)

See Also:


Attachments
patch proposal (4.82 KB, patch)
2013-01-16 11:11 PST, arno.
sam: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description arno. 2013-01-16 11:05:31 PST
Hi,
it would be nice to be able to set/get WebGLErrorsToConsole flag in WebKit2
Comment 1 arno. 2013-01-16 11:11:42 PST
Created attachment 183011 [details]
patch proposal
Comment 2 Benjamin Poulain 2013-01-16 13:56:36 PST
Curious: Why not just enable it by default? Is it too verbose or something?
Comment 3 Viatcheslav Ostapenko 2013-01-16 13:59:43 PST
(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.
Comment 4 arno. 2013-01-16 14:33:32 PST
(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.
Comment 5 Benjamin Poulain 2013-01-16 14:37:07 PST
> 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 :)
Comment 6 arno. 2013-01-16 15:17:57 PST
I don't known why this was chosen in the first place. Ccing people having worked on bug #77696
Comment 7 Kenneth Russell 2013-01-16 17:20:50 PST
The patch looks reasonable to me but someone who works on WebKit2 should review it.
Comment 8 Sam Weinig 2013-01-16 17:25:59 PST
I also don't understand what this switch is for.  What console do the errors go to?  The Web Inspector console?
Comment 9 arno. 2013-01-16 17:28:53 PST
(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.
Comment 10 Kenneth Russell 2013-01-16 17:29:59 PST
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 11 Sam Weinig 2013-01-16 20:04:39 PST
Comment on attachment 183011 [details]
patch proposal

This doesn't seem like a useful switch to have.
Comment 12 Kenneth Russell 2013-01-17 10:41:39 PST
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.
Comment 13 Sam Weinig 2013-01-17 13:46:42 PST
(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.
Comment 14 Kenneth Russell 2013-01-17 19:48:52 PST
(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.