Chromium Code Reviews| Index: Source/core/html/HTMLCanvasElement.idl |
| diff --git a/Source/core/html/HTMLCanvasElement.idl b/Source/core/html/HTMLCanvasElement.idl |
| index 5f97987d6c470a235eaebfe8727debe77b9489e2..c509a959b5a86bec9a91cb3bfef538e8b4939ca5 100644 |
| --- a/Source/core/html/HTMLCanvasElement.idl |
| +++ b/Source/core/html/HTMLCanvasElement.idl |
| @@ -24,6 +24,8 @@ |
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| */ |
| +typedef (CanvasRenderingContext2D or WebGLRenderingContext) RenderingContext; |
| + |
| interface HTMLCanvasElement : HTMLElement { |
| attribute long width; |
| @@ -31,6 +33,8 @@ interface HTMLCanvasElement : HTMLElement { |
| [Custom, RaisesException] DOMString toDataURL([TreatUndefinedAs=NullString, Default=Undefined] optional DOMString? type); |
| - // The custom binding is needed to handle context creation attributes. |
| - [Custom] any getContext([Default=Undefined] optional DOMString contextId); |
| + // Note: this differs deliberately from the specified Web IDL for this function: |
| + // RenderingContext? getContext(DOMString contextId, any... arguments); |
| + // in order to eliminate the custom binding. It is functionally equivalent. |
| + RenderingContext getContext([Default=Undefined] optional DOMString contextId, optional CanvasContextCreationAttributes attributes); |
|
bashi
2014/12/12 00:35:24
The return value is not nullable. Is this intentio
Ken Russell (switch to Gerrit)
2014/12/12 06:59:31
No, that was an accident, and the code generator w
|
| }; |