| Index: Source/WebCore/bindings/dart/custom/DartHTMLCanvasElementCustom.cpp
|
| diff --git a/Source/WebCore/bindings/dart/custom/DartHTMLCanvasElementCustom.cpp b/Source/WebCore/bindings/dart/custom/DartHTMLCanvasElementCustom.cpp
|
| index b66992010fe7c6ffe950396f28a94f84c7204081..7752d07441b40a5c10913e69751dcae8790dddfc 100644
|
| --- a/Source/WebCore/bindings/dart/custom/DartHTMLCanvasElementCustom.cpp
|
| +++ b/Source/WebCore/bindings/dart/custom/DartHTMLCanvasElementCustom.cpp
|
| @@ -30,6 +30,7 @@
|
| #include "config.h"
|
| #include "DartHTMLCanvasElement.h"
|
|
|
| +#include "CanvasContextAttributes.h"
|
| #include "CanvasRenderingContext.h"
|
| #include "CanvasRenderingContext2D.h"
|
| #include "DartDOMWrapper.h"
|
| @@ -40,10 +41,10 @@
|
| #include "HTMLCanvasElement.h"
|
| #if ENABLE(WEBGL)
|
| #include "DartUtilities.h"
|
| +#include "WebGLContextAttributes.h"
|
| #include "WebGLRenderingContext.h"
|
| #endif
|
|
|
| -
|
| namespace WebCore {
|
|
|
| namespace DartHTMLCanvasElementInternal {
|
| @@ -90,8 +91,17 @@ void getContextCallback(Dart_NativeArguments args)
|
| goto fail;
|
| }
|
|
|
| - // FIXME: implement support for CanvasContextAttributes.
|
| - CanvasRenderingContext* result = receiver->getContext(contextId, 0);
|
| + RefPtr<CanvasContextAttributes> attrs;
|
| +#if ENABLE(WEBGL)
|
| + const String& contextIdStr = contextId;
|
| + if (contextIdStr == "experimental-webgl" || contextIdStr == "webkit-3d") {
|
| + attrs = WebGLContextAttributes::create();
|
| + // FIXME: IDL doesn't mention second argument, but JS
|
| + // passes map with parameters describing desired context
|
| + // features.
|
| + }
|
| +#endif
|
| + CanvasRenderingContext* result = receiver->getContext(contextId, attrs.get());
|
| if (!result)
|
| return;
|
| if (result->is2d())
|
|
|