Bug 117169 - HTMLCanvasElement should have helper method to check attributes
Summary: HTMLCanvasElement should have helper method to check attributes
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P4 Minor
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-06-03 14:20 PDT by Ruth Fong
Modified: 2013-08-08 07:56 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ruth Fong 2013-06-03 14:20:23 PDT
getContext and supportsContext, which will be implemented once the patch for bug 70117 is landed, each accept a contextId parameter (i.e. '2d', 'webkit-3d', etc.) and any number of attribute parameters. According to the WebGL specification, 3d attributes are currently the following booleans: 'alpha', 'depth', 'stencil', 'antialias', 'premultipliedAlpha', 'preserveDrawingBuffer' (http://www.khronos.org/registry/webgl/specs/latest/#context-creation-parameters).

A static helper function should be written that accepts the attributes that would be passed into getContext and supportsContext and checks that they are valid, i.e. they are the right type and right names. 

For instance, getContext('2d', {'not_alpha' -> true, 'alpha' -> 4}) has malformed attributes as its second parameter and should return false.
Comment 1 Radar WebKit Bug Importer 2013-06-03 14:20:31 PDT
<rdar://problem/14051244>