[Webkit-unassigned] [Bug 70117] Expose HTMLCanvasElement supportsContext
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jun 3 16:24:49 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=70117
--- Comment #36 from Ruth Fong <ruthiecftg at gmail.com> 2013-06-03 16:23:20 PST ---
(From update of attachment 203625)
View in context: https://bugs.webkit.org/attachment.cgi?id=203625&action=review
>>>>> Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp:126
>>>>> + return jsUndefined();
>>>>
>>>> Is there any way we can test this code?
>>>
>>> Yes; I think modifying LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias for supportsContext. Ideally, this chunk of code should probably be refactored, as it's called in both getContext and supportsContext
>>
>> Actually, I think the best way to test this chunk of code is to use it in getContext and then run (and modifying as needed) LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html. I don't think testing it falls under the domain of supportsContext, since supportsContext doesn't actually create a context. I think we should siphon this exception handling as a separate bug, testing/handling it for both getContext and supportsContext, and simply using the non-exception handling version of the code (that's currently used in getContext) for this patch. Thoughts?
>
> It seems strange to just silently return undefined if one of these properties is missing. I could imagine instead raising an exception when this happens, or defining a default value for use when the property is not present. We need test cases covering that behavior.
Regarding undefined return, I agree. For getContext, the default values are set at WebGLRendering::create, line 423. Refactoring getContext's method of setting context attributes (starting at line 52) so both getContext and supportsContext can use it. Will add test cases to check that defaults are set properly in LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list